mirror of
https://github.com/rust-unofficial/awesome-rust
synced 2024-11-18 03:25:31 +00:00
42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
name: Rust
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
schedule:
|
|
- cron: 0 0 * * *
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@master
|
|
with:
|
|
toolchain: stable
|
|
components: rustfmt
|
|
- uses: Swatinem/rust-cache@v2
|
|
- name: Load results cache
|
|
uses: pat-s/always-upload-cache@v3.0.11
|
|
with:
|
|
path: results/*.yaml
|
|
key: results-${{ hashFiles('Cargo.lock') }}-${{ hashFiles('README.md') }}-${{ github.run_id }}
|
|
restore-keys: |
|
|
results-${{ hashFiles('Cargo.lock') }}-${{ hashFiles('README.md') }}-
|
|
results-${{ hashFiles('Cargo.lock') }}-
|
|
results-
|
|
- name: Check Format
|
|
run: cargo fmt -- --check
|
|
- name: Build
|
|
run: cargo build
|
|
- name: Run
|
|
run: cargo run
|
|
env:
|
|
USERNAME_FOR_GITHUB: ${{ secrets.USERNAME_FOR_GITHUB }}
|
|
TOKEN_FOR_GITHUB: ${{ secrets.TOKEN_FOR_GITHUB }}
|
|
RUST_LOG: warn
|