Skip to content

Commit

Permalink
build job: configure and use action for sccache
Browse files Browse the repository at this point in the history
Signed-off-by: Laurent Cheylus <[email protected]>
  • Loading branch information
lcheylus committed May 31, 2024
1 parent d4763d4 commit 0b70e77
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ jobs:
name: Build cargo-nextest
runs-on: ubuntu-latest
timeout-minutes: 90
env:
mem: 4096
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"

steps:
# Checkout only build script and script for CI
- name: Checkout build script
Expand Down Expand Up @@ -53,16 +58,20 @@ jobs:
echo "## rustc version for Ubuntu runner"
rustc -vV
# Use sccache for compilation cache (Rust)
- name: Configure sccache
uses: mozilla-actions/[email protected]

# Prepare OpenBSD-stable VM and run build
- name: Prepare OpenBSD VM and build
uses: vmactions/[email protected]
with:
usesh: true
sync: rsync
copyback: true
envs: 'NEXTEST_VERSION'
envs: "NEXTEST_VERSION SCCACHE_GHA_ENABLED RUSTC_WRAPPER ACTIONS_CACHE_URL ACTIONS_RUNTIME_TOKEN"
# Install requirements to build cargo-nextest
prepare: pkg_add -I bash curl rust zstd
prepare: pkg_add -I bash curl rust zstd sccache
# implementation modelled from https://github.com/rust-lang/rustup/blob/master/.github/workflows/ci.yaml
# * NOTE: All steps need to be run in this block, otherwise, we are operating back on the Ubuntu host
run: bash ci/openbsd_build.sh
Expand Down

0 comments on commit 0b70e77

Please sign in to comment.