2024-08-06 10:28:17 -05:00
|
|
|
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
2024-06-20 08:59:56 -05:00
|
|
|
name: "Build"
|
|
|
|
on:
|
2024-07-26 20:08:36 -05:00
|
|
|
push:
|
2024-08-06 10:28:17 -05:00
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
paths:
|
|
|
|
- ".forgejo/workflows/build.yaml"
|
|
|
|
- "flake.lock"
|
2024-11-05 09:40:09 -06:00
|
|
|
workflow_dispatch:
|
2024-08-06 10:28:17 -05:00
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2024-06-20 08:59:56 -05:00
|
|
|
jobs:
|
|
|
|
nix-build:
|
|
|
|
if: github.event.pull_request.draft == false
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- system: varda
|
|
|
|
os: native-aarch64
|
2024-08-05 14:06:30 -05:00
|
|
|
- system: gandalf
|
|
|
|
os: native-x86_64
|
2024-08-06 10:28:17 -05:00
|
|
|
- system: telperion
|
|
|
|
os: native-x86_64
|
2024-09-13 21:03:15 -05:00
|
|
|
- system: shadowfax
|
|
|
|
os: native-x86_64
|
2024-06-20 08:59:56 -05:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
env:
|
|
|
|
PATH: ${{ format('{0}:{1}', '/run/current-system/sw/bin', env.PATH) }}
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: https://github.com/actions/checkout@v4
|
|
|
|
with:
|
2024-08-05 14:06:30 -05:00
|
|
|
fetch-depth: 0
|
2024-08-06 10:28:17 -05:00
|
|
|
- name: Set up Cachix
|
|
|
|
uses: https://github.com/cachix/cachix-action@v15
|
2024-06-20 08:59:56 -05:00
|
|
|
if: ${{ !github.event.pull_request.head.repo.fork }}
|
|
|
|
with:
|
|
|
|
name: hsndev
|
|
|
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
|
|
|
|
|
|
|
- name: Garbage collect build dependencies
|
|
|
|
run: nix-collect-garbage
|
|
|
|
|
|
|
|
- name: Build new ${{ matrix.system }} system
|
|
|
|
shell: bash
|
|
|
|
run: |
|
2024-08-06 10:28:17 -05:00
|
|
|
nix build ".#top.${{ matrix.system }}" --profile ./profile --fallback -v \
|
|
|
|
> >(tee stdout.log) 2> >(tee /tmp/nix-build-err.log >&2)
|