.dotfiles/.forgejo/workflows/main.yml
Tyler Mayoff ee9613902b raw nix commands
readded macos and got the command working locally
2025-10-11 11:33:04 -04:00

75 lines
2 KiB
YAML

name: build flakes
on:
push:
# concurrency:
# group: ${{ github.workflow }}-${{ github.ref }}
# cancel-in-progress: true
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: linux
hostname: wash
arch: x86_64-linux
# - os: darwin
# hostname: MAC-C57KK2TC69
# arch: aarch64-darwin
runs-on: codeberg-tiny
continue-on-error: false
steps:
- uses: actions/checkout@v4
- name: install nix
uses: https://github.com/DeterminateSystems/nix-installer-action@main
- uses: https://github.com/DeterminateSystems/magic-nix-cache-action@main
with:
use-flakehub: false
# - name: Maximize build space
# if: runner.os == 'Linux'
# uses: ./.github/actions/disk_space
- uses: https://github.com/cachix/cachix-action@v16
with:
name: tmayoff
authToken: '${{ secrets.CACHIX_AUTH }}'
- name: build nixos
if: ${{ matrix.os }} == 'linux'
run: |
nix build ./dot_config/flake#nixosConfigurations.${{matrix.hostname}}.config.system.build.toplevel --cores 1 -j1
# - name: build darwin
# if: runner.os == 'macOS'
# run: |
# nix build ./dot_config/flake#darwinConfigurations.${{matrix.hostname}}.config.system.build.topLevel --cores 1 -j1
# - name: download last artifact
# uses: dawidd6/action-download-artifact@v11
# with:
# workflow: main.yml
# workflow_conclusion: success
# name: ${{ matrix.os }}-${{ matrix.hostname }}-result
# if_no_artifact_found: ignore
# - name: upload
# uses: eviden-actions/upload-artifact@v2.0.0
# with:
# name: ${{ matrix.os }}-${{ matrix.hostname }}-result
# path:
# result
# - name: extract result
# run: |
# tar -xvf ${{ matrix.os }}-${{ matrix.hostname }}-result.tar.gz last-result || true
# - name: diff
# run: |
# nix run nixpkgs#nvd -- diff last-result result || true