9 runs-on: ${{ matrix.os }}
14 os: [ubuntu-latest, macos-latest]
17 - uses: actions/checkout@v2
19 # https://github.com/actions/cache/issues/133
20 - name: Fixup owner of ~/.cargo/bin
21 run: sudo chown -R $(whoami):$(id -ng) ~/.cargo/bin
23 - name: Cache cargo installed crates
24 uses: actions/cache@v1.1.2
27 key: cargo-installed-crates-${{ matrix.os }}
29 - name: Cache cargo registry
30 uses: actions/cache@v1
32 path: ~/.cargo/registry
33 key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
35 - name: Cache cargo index
36 uses: actions/cache@v1
39 key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
41 - name: Cache cargo target dir
42 uses: actions/cache@v1.1.2
45 key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain') }}
47 - name: Prepare dependencies
49 git config --global user.email "user@example.com"
50 git config --global user.name "User"
53 # Compile is a separate step, as the actions-rs/cargo action supports error annotations
55 uses: actions-rs/cargo@v1.0.1
62 # Enable backtraces for easier debugging
63 export RUST_BACKTRACE=1
65 # Reduce amount of benchmark runs as they are slow