name: Rust
on:
push:
branches: [ main ]
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
linux_job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache build
uses: actions/cache@v2
with:
path: ~/target
key: ${{ runner.os }}-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ hashFiles('**/Cargo.lock') }}
${{ runner.os }}-build-
${{ runner.os }}-
- run: cargo build --release
- run: cargo test --release
- name: Upload build file
uses: actions/upload-artifact@v2
name: linux
path: target/release/autoconfig
windows_job:
runs-on: windows-latest
name: windows
path: target/release/autoconfig.exe
macos_job:
runs-on: macos-latest
name: macos