Skip to content

Commit

Permalink
Limit the number of initial build targets
Browse files Browse the repository at this point in the history
- Start-off with just two build targets.
- Cachix is pending subscription, remove the cachix cache while we
  don't have it yet. We'll add it back later.
- Rename the cachix authentication token. We don't have the token yet,
  but once we do, we'll add it by the name of 'CACHIX_AUTH_TOKEN '.
- Remove 'workflow_dispatch' event from the workflow triggers, to
  not allow manually re-triggering the action.

Signed-off-by: Henri Rosten <henri.rosten@unikie.com>
  • Loading branch information
henrirosten committed Sep 26, 2023
1 parent 9c92170 commit f9d4cd2
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions .github/workflows/nix-build-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
pull_request:
branches:
- main
workflow_dispatch:

jobs:
build_matrix:
Expand All @@ -14,16 +13,10 @@ jobs:
strategy:
matrix:
include:
- arch: x86_64-linux
target: generic-x86_64-debug
- arch: x86_64-linux
target: lenovo-x1-carbon-gen11-debug
- arch: x86_64-linux
target: nvidia-jetson-orin-agx-debug-nodemoapps-from-x86_64
- arch: x86_64-linux
target: nvidia-jetson-orin-nx-debug-nodemoapps-from-x86_64
- arch: riscv64-linux
target: microchip-icicle-kit-debug
steps:
- name: Maximize space available on rootfs
# Why not use https://github.com/easimon/maximize-build-space directly?
Expand Down Expand Up @@ -62,8 +55,8 @@ jobs:
uses: DeterminateSystems/nix-installer-action@main
with:
extra-conf: |
trusted-public-keys = ghaf-dev.cachix.org-1:IxMRy9D4TCXA/57XvtU0xrcEC0ErsnLvxJfPQe8O9pc= cache.vedenemo.dev:RGHheQnb6rXGK5v9gexJZ8iWTPX6OcSeS56YeXYzOcg= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
substituters = https://ghaf-dev.cachix.org?priority=20 https://cache.vedenemo.dev https://cache.nixos.org
trusted-public-keys = cache.vedenemo.dev:RGHheQnb6rXGK5v9gexJZ8iWTPX6OcSeS56YeXYzOcg= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
substituters = https://cache.vedenemo.dev https://cache.nixos.org
system-features = nixos-test benchmark big-parallel kvm
system = ${{ env.NIX_SYSTEM }}
- name: Print nix.conf
Expand All @@ -79,12 +72,12 @@ jobs:
cachix --version
- name: Build ${{ matrix.arch }}.${{ matrix.target }}
run: |
if [ "${{ secrets.CACHIX_AUTH_GHAF_DEV }}" = "" ]; then
if [ "${{ secrets.CACHIX_AUTH_TOKEN }}" = "" ]; then
echo "Running nix build, no cachix push"
time nix build .#packages.${{ matrix.arch }}.${{ matrix.target }}
echo "Skipping cachix push, no token"
else
cachix authtoken ${{ secrets.CACHIX_AUTH_GHAF_DEV }}
cachix authtoken ${{ secrets.CACHIX_AUTH_TOKEN }}
echo "Running nix build, with cachix watch-exec"
cachix watch-exec ghaf-dev -- \
time nix build .#packages.${{ matrix.arch }}.${{ matrix.target }}
Expand Down

0 comments on commit f9d4cd2

Please sign in to comment.