This repository was archived by the owner on Jul 6, 2024. It is now read-only.
feat: Nix Omni #7
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
name: Build Nix systems | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
nix-build: | |
strategy: | |
fail-fast: false # let it build all the targets | |
matrix: | |
include: | |
- system: todds-macbook | |
os: macos-14 | |
- system: nas | |
os: ubuntu-22.04 | |
- system: omni | |
os: ubuntu-22.04 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: cachix/install-nix-action@v26 | |
with: | |
extra_nix_config: | | |
auto-optimise-store = true | |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
experimental-features = nix-command flakes | |
- uses: DeterminateSystems/magic-nix-cache-action@main | |
- uses: cachix/cachix-action@v14 | |
if: ${{ !github.event.pull_request.head.repo.fork }} | |
with: | |
name: greyrock | |
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" | |
- name: Build ${{ matrix.system }} system | |
run: | | |
nix build \ | |
--print-build-logs \ | |
--builders "" \ | |
--max-jobs 2 \ | |
--eval-store auto \ | |
".#ciSystems.${{ matrix.system }}" | |
nix-build-success: | |
if: ${{ always() }} | |
needs: | |
- nix-build | |
name: Nix Build Successful | |
runs-on: ubuntu-latest | |
steps: | |
- if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }} | |
name: Check matrix status | |
run: exit 1 |