Skip to content

CI: only build without lockfile if dependencies changed #72

CI: only build without lockfile if dependencies changed

CI: only build without lockfile if dependencies changed #72

# 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