Skip to content

feat: enhance flake for build cache performance #13

feat: enhance flake for build cache performance

feat: enhance flake for build cache performance #13

Workflow file for this run

name: Nix
on:
workflow_dispatch:
push:
branches:
- master
paths:
- flake.nix
- flake.lock
- Cargo.toml
- Cargo.lock
- rust-toolchain.toml
- crates/**
pull_request:
paths:
- flake.nix
- flake.lock
- Cargo.toml
- Cargo.lock
- rust-toolchain.toml
- crates/**
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build (${{ matrix.system }})
strategy:
fail-fast: false
matrix:
include:
- system: x86_64-linux
runner: depot-ubuntu-24.04-8
- system: aarch64-linux
runner: depot-ubuntu-22.04-arm-8
- system: aarch64-darwin
runner: depot-macos-14
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v14
- uses: cachix/cachix-action@v17
with:
name: moonrepo
authToken: ${{ github.event_name != 'pull_request' && secrets.CACHIX_AUTH_TOKEN || '' }}
- name: Check flake
run: nix flake check --no-build --no-write-lock-file --accept-flake-config
- name: Build package
run: nix build .#packages.${{ matrix.system }}.default -L --accept-flake-config