mochi/.forgejo/workflows/build.yaml
Joseph Hanson 2f6ad4b034
All checks were successful
Build / nix-build (native-aarch64, varda) (push) Successful in 2m15s
Build / nix-build (native-x86_64, shadowfax) (push) Successful in 6m55s
Build / nix-build (native-x86_64, gandalf) (push) Successful in 7m22s
Build / nix-build (native-x86_64, telperion) (push) Successful in 3m40s
Build / nix-build (native-x86_64, telchar) (push) Successful in 14m6s
enable manual build.
2024-11-05 09:40:09 -06:00

56 lines
1.6 KiB
YAML

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: "Build"
on:
pull_request:
push:
branches:
- main
paths:
- ".forgejo/workflows/build.yaml"
- "flake.lock"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true
jobs:
nix-build:
if: github.event.pull_request.draft == false
strategy:
fail-fast: false
matrix:
include:
- system: varda
os: native-aarch64
- system: telchar
os: native-x86_64
- system: gandalf
os: native-x86_64
- system: telperion
os: native-x86_64
- system: shadowfax
os: native-x86_64
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:
fetch-depth: 0
- name: Set up Cachix
uses: https://github.com/cachix/cachix-action@v15
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: |
nix build ".#top.${{ matrix.system }}" --profile ./profile --fallback -v \
> >(tee stdout.log) 2> >(tee /tmp/nix-build-err.log >&2)