2021-01-31 12:46:10 +00:00
|
|
|
name: Rust
|
|
|
|
on:
|
|
|
|
push:
|
2021-08-08 18:52:32 +00:00
|
|
|
branches:
|
|
|
|
- master
|
2021-01-31 12:46:10 +00:00
|
|
|
pull_request:
|
2021-08-08 18:52:32 +00:00
|
|
|
branches:
|
|
|
|
- master
|
2021-06-13 14:51:37 +00:00
|
|
|
schedule:
|
2021-08-08 18:52:32 +00:00
|
|
|
- cron: 0 0 * * *
|
2021-01-31 12:46:10 +00:00
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-08-08 18:52:32 +00:00
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
- uses: Swatinem/rust-cache@v1
|
|
|
|
- name: Get random cache id
|
|
|
|
run: echo "CACHE_ID=$((RANDOM))" >> $GITHUB_ENV
|
|
|
|
shell: bash
|
|
|
|
- uses: pat-s/always-upload-cache@v2.1.5
|
|
|
|
with:
|
2021-08-10 22:55:13 +00:00
|
|
|
path: results/*.yaml
|
2021-08-08 19:06:14 +00:00
|
|
|
key: results-${{ hashFiles('Cargo.lock') }}-${{ hashFiles('README.md') }}-${{ env.CACHE_ID }}
|
2021-08-08 18:52:32 +00:00
|
|
|
restore-keys: |
|
|
|
|
results-${{ hashFiles('Cargo.lock') }}-${{ hashFiles('README.md') }}-
|
|
|
|
results-${{ hashFiles('Cargo.lock') }}-
|
|
|
|
results-
|
|
|
|
- name: Build
|
|
|
|
run: cargo build
|
2021-08-16 19:21:50 +00:00
|
|
|
- name: Run
|
|
|
|
run: cargo run
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
RUST_LOG: warn
|