Skip to content

gh actions: namespacelabs/nscloud-cache-action -> actions/cache #428

gh actions: namespacelabs/nscloud-cache-action -> actions/cache

gh actions: namespacelabs/nscloud-cache-action -> actions/cache #428

Workflow file for this run

name: build packages (kernel etc.) and push to the cache
on:
push:
branches:
- 'ci-test'
jobs:
packages-main:
runs-on: namespace-profile-large-arm64
continue-on-error: true
strategy: &strategy-main
# avoid building things twice if nixos-unstable and master contain the same derivations
max-parallel: 1
matrix:
nixpkgs-override:
- ""
- "--override-input nixpkgs nixpkgs/nixos-unstable"
- "--override-input nixpkgs nixpkgs/nixos-unstable-small"
- "--override-input nixpkgs nixpkgs/master"
event_name:
- "${{ github.event_name }}"
ref:
- "refs/heads/main"
exclude:
- nixpkgs-override: ""
event_name: schedule
steps: &steps
- name: Checkout repository
uses: actions/checkout@v7
with:
ref: "${{ matrix.ref }}"
- name: Cache ~/.cache/nix
uses: actions/cache@v6
with:
key: cache-nix
path: ~/.cache/nix
- name: Install nix
uses: cachix/install-nix-action@v31
with:
extra_nix_config: |
experimental-features = nix-command flakes
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- uses: cachix/cachix-action@v17
with:
name: nixos-apple-silicon
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}"
- name: Build nix packages
run: |
nix run nixpkgs#nix-fast-build -- \
--no-nom --skip-cached \
-f .#packages \
${{ matrix.nixpkgs-override }} \
${{ matrix.nixpkgs-override != '' && '|| echo "::warning ::Build failed"' || '' }}
packages-release-2511:
runs-on: namespace-profile-large-arm64
continue-on-error: true
strategy: &strategy-release-2511
# avoid building things twice if nixos-unstable and master contain the same derivations
max-parallel: 1
matrix:
nixpkgs-override:
- ""
- "--override-input nixpkgs nixpkgs/nixos-25.11"
- "--override-input nixpkgs nixpkgs/nixos-25.11-small"
- "--override-input nixpkgs nixpkgs/release-25.11"
event_name:
- "${{ github.event_name }}"
ref:
- "refs/heads/release-25.11"
exclude:
- nixpkgs-override: ""
event_name: schedule
steps: *steps
# Also populate the cache for cross-compilation from x86_64 case
# Do this as a separate matrix job, so that the max-parallel applies per architecture
packages-cross-main:
if: github.ref == 'refs/heads/main'
runs-on: namespace-profile-large-x86
continue-on-error: true
strategy: *strategy-main
steps: *steps
packages-cross-release-2511:
if: github.ref == 'refs/heads/release-25.11' || github.event_name == 'schedule'
runs-on: namespace-profile-large-x86
continue-on-error: true
strategy: *strategy-release-2511
steps: *steps