Skip to content

Add the rust cache back in. #106

Add the rust cache back in.

Add the rust cache back in. #106

Workflow file for this run

name: CI
on: [ push, workflow_dispatch ]
jobs:
build_and_test:
name: Build and Test Maelstrom
runs-on: ubuntu-latest
steps:
- name: Get Repository from Git
uses: actions/checkout@v3
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Set up Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@main
- name: Check Nixpkgs Inputs
uses: DeterminateSystems/flake-checker-action@main
with:
fail-mode: true
# For some reason, GitHub provides Rust for us. The problem is that, when
# executing the recursive cargo invocation, the cargo in ~/.cargo/bin ends
# up prepended to PATH, which then causes problems.
- name: Remove Rust provided by GitHub.
run: rm -rf ~/.cargo ~/.rustup
- name: Set up Rust Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: maelstrom-${{ hashFiles('**/Cargo.lock') }}
- name: Lint
run: ./scripts/lint.sh
- name: Test
run: ./scripts/run-tests-on-maelstrom.sh