Skip to content

Commit

Permalink
Add rust cache to static build
Browse files Browse the repository at this point in the history
  • Loading branch information
Ancient123 committed Oct 13, 2023
1 parent c8571a8 commit d921445
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/build_nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- 'develop'
- 'main'
- 'nix*'
schedule:
- cron: '0 0 * * 1'
workflow_dispatch:
Expand All @@ -14,7 +15,7 @@ concurrency:
cancel-in-progress: true

jobs:
build:
nix-build:
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down

0 comments on commit d921445

Please sign in to comment.