From d9214457e087bcdf83781a0d6fc5b4bf944f47bf Mon Sep 17 00:00:00 2001 From: Mathew Richmond Date: Fri, 13 Oct 2023 15:52:28 -0600 Subject: [PATCH] Add rust cache to static build --- .github/workflows/build_nix.yml | 8 +++++++- justfile | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_nix.yml b/.github/workflows/build_nix.yml index 0ac2206fbe..a60a1ddb51 100644 --- a/.github/workflows/build_nix.yml +++ b/.github/workflows/build_nix.yml @@ -5,6 +5,7 @@ on: branches: - 'develop' - 'main' + - 'nix*' schedule: - cron: '0 0 * * 1' workflow_dispatch: @@ -14,7 +15,7 @@ concurrency: cancel-in-progress: true jobs: - build: + nix-build: runs-on: ubuntu-latest timeout-minutes: 120 steps: @@ -28,6 +29,11 @@ jobs: authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' skipPush: ${{ github.actor == 'dependabot[bot]' }} + - name: Enable Rust Cache + uses: Swatinem/rust-cache@v2 + with: + cache-directories: "target_dirs/nix_rustc" + - name: Checkout Repository uses: actions/checkout@v4 diff --git a/justfile b/justfile index bcc9c424dd..07ec21631b 100644 --- a/justfile +++ b/justfile @@ -16,7 +16,7 @@ run_ci: lint build test export RUST_MIN_STACK=4194304 RUSTDOCFLAGS='--cfg async_executor_impl="async-std" --cfg async_channel_impl="async-std" {{original_rustdocflags}}' RUSTFLAGS='--cfg async_executor_impl="async-std" --cfg async_channel_impl="async-std" {{original_rustflags}}' && just {{target}} {{ARGS}} build: - cargo build --verbose --workspace --examples --bins --tests --lib --benches + cargo build --workspace --examples --bins --tests --lib --benches example *ARGS: cargo run --profile=release-lto --example {{ARGS}}