CI: only build without lockfile if dependencies changed #72
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow ensures that the nix dev env works on ARM based macOS. | |
name: Nix env macOS ARM | |
on: | |
push: | |
branches: | |
- main | |
- release-* | |
tags: | |
# YYYYMMDD | |
- "20[0-9][0-9][0-1][0-9][0-3][0-9]*" | |
pull_request: | |
branches: | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
RUST_LOG: info,libp2p=off | |
jobs: | |
nix-env-macos-arm: | |
timeout-minutes: 60 | |
runs-on: macos-latest | |
steps: | |
- name: Install Nix | |
uses: cachix/install-nix-action@v30 | |
- name: Enable Cachix | |
uses: cachix/cachix-action@v15 | |
# If PR is from a non-collaborator (e. g. dependabot) the secrets are missing and the login to cachix fails. | |
continue-on-error: true | |
with: | |
name: espresso-systems-private | |
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" | |
extraPullNames: nix-community | |
skipPush: ${{ github.actor == 'dependabot[bot]' }} | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: Swatinem/rust-cache@v2 | |
name: Enable Rust Caching | |
with: | |
prefix-key: v0-rust | |
- name: Activate nix env | |
run: nix develop --accept-flake-config -c echo Ok | |
- name: Build rust crates | |
run: nix develop --accept-flake-config -c just build | |
- name: Build contracts | |
run: nix develop --accept-flake-config -c forge build |