Skip to content

feat: darwin

feat: darwin #314

Workflow file for this run

name: Build nix profile
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
paths:
- ".github/**"
- "**.nix"
- "flake.lock"
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: william
- os: ubuntu-latest
target: synopc
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: gitleaks/gitleaks-action@v2
if: ${{ github.ref == 'refs/heads/master' && matrix.target == 'synopc' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Insall nix
uses: cachix/install-nix-action@V27
with:
install_url: https://releases.nixos.org/nix/nix-2.18.2/install
extra_nix_config: |
accept-flake-config = true
- name: Check Nix flake inputs
uses: DeterminateSystems/flake-checker-action@v8
- name: Github actions built-in cache
uses: DeterminateSystems/magic-nix-cache-action@v7
- name: Setup cachix
uses: cachix/cachix-action@v15
with:
name: williamhsieh
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
skipPush: ${{ github.ref != 'refs/heads/master' }}
- name: Build target
run: |
set -o pipefail
nix build .#top.${{ matrix.target }} --fallback --show-trace -v --log-format raw > >(tee /tmp/nix-build-out.log) 2> >(tee /tmp/nix-build-err.log >&2)
- name: Output build failure
if: failure()
run: |
drv=$(grep "For full logs, run" /tmp/nix-build-err.log | grep -oE "/nix/store/.*.drv")
nix log $drv
echo $drv
exit 1