Skip to content

Remove x86_64-darwin from supported systems #861

Remove x86_64-darwin from supported systems

Remove x86_64-darwin from supported systems #861

Workflow file for this run

name: "build"
on:
pull_request:
push:
branches: [ "main" ]
jobs:
path-filter:
runs-on: ubuntu-latest
outputs:
changed: ${{ steps.filter.outputs.any_changed }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
- uses: tj-actions/changed-files@v47
id: filter
with:
files: |
lib/**
modules/**
tests/**
template/**
flake.lock
**/*.nix
.github/workflows/build.yaml
separator: "\n"
- env:
ALL_CHANGED_FILES: ${{ steps.filter.outputs.all_changed_files }}
run: |
echo $ALL_CHANGED_FILES
tests-matrix:
needs: [ "path-filter" ]
if: needs.path-filter.outputs.changed == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install Nix
uses: cachix/install-nix-action@v31.10.6
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
enable_kvm: true
extra_nix_config: |
keep-outputs = true
- name: Setup Caching
uses: cachix/cachix-action@v17
with:
name: selfhostblocks
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Generate Matrix
id: generate-matrix
run: |
set -eo pipefail
nix flake show --allow-import-from-derivation --json \
| jq -c '.["checks"]["x86_64-linux"] | keys' > .output
cat .output
echo dynamic_list="$(cat .output)" >> "$GITHUB_OUTPUT"
outputs:
check: ${{ steps.generate-matrix.outputs.dynamic_list }}
tests:
runs-on: ubuntu-latest
needs: [ "tests-matrix" ]
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
check: ${{ fromJson(needs.tests-matrix.outputs.check) }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install Nix
uses: cachix/install-nix-action@v31.10.6
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
enable_kvm: true
extra_nix_config: |
keep-outputs = true
- name: Setup Caching
uses: cachix/cachix-action@v17
with:
name: selfhostblocks
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Run test
if: ${{ matrix.check != 'lib' }}
run: |
(while true; do free -m; df -h; sleep 10; done)&
nix run .#checks.x86_64-linux.${{ matrix.check }}
- name: Run test
if: ${{ matrix.check == 'lib' }}
run: |
nix build .#checks.x86_64-linux.${{ matrix.check }}
manual:
runs-on: ubuntu-latest
outputs:
changed: ${{ steps.filter.outputs.any_changed }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install Nix
uses: cachix/install-nix-action@v31.10.6
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
enable_kvm: true
extra_nix_config: |
keep-outputs = true
- name: Setup Caching
uses: cachix/cachix-action@v17
with:
name: selfhostblocks
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Build manual
run: |
nix build .#manualHtml
result:
runs-on: ubuntu-latest
needs: [ tests, tests-matrix ]
if: '!cancelled()'
steps:
- run: |
if ! [[ ${{ needs.tests.result }} == "success" || ${{ needs.tests-matrix.result }} == "skipped" ]]; then
exit 1
fi
if ! [[ ${{ needs.tests-matrix.result }} == "success" || ${{ needs.tests-matrix.result }} == "skipped" ]]; then
exit 1
fi
exit 0