n/zorigami: elly and mei are cats too #217
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [main] | |
jobs: | |
get-hosts: | |
if: "!contains(github.event.head_commit.message, '[skip-ci]')" | |
runs-on: self-hosted-x86_64-linux | |
outputs: | |
matrix: ${{ steps.hosts_out.outputs.matrix }} | |
steps: | |
- name: repository checkout | |
uses: actions/checkout@v4 | |
- id: hosts_out | |
name: set hosts var | |
run: | | |
{ | |
echo -n "matrix=" | |
nix eval --raw --impure --expr ' | |
let | |
groupHosts = hosts: | |
builtins.groupBy (n: hosts.${n}.system) | |
(builtins.filter (h: !hosts.${h}.ciSkip) | |
(builtins.attrNames hosts)); | |
hosts = (import ./meta.nix).hosts; | |
in | |
builtins.toJSON (groupHosts hosts)' | |
echo "" | |
} >> "$GITHUB_OUTPUT" | |
x86_64-linux: | |
if: | | |
!contains(github.event.head_commit.message, '[skip-ci x64]') | |
&& !contains(github.event.head_commit.message, '[skip-ci]') | |
runs-on: self-hosted-x86_64-linux | |
needs: [get-hosts] | |
strategy: | |
fail-fast: false | |
matrix: | |
host: ${{ fromJson(needs.get-hosts.outputs.matrix).x86_64-linux }} | |
steps: | |
- name: repository checkout | |
uses: actions/checkout@v4 | |
- name: build host configuration ${{ matrix.host }} | |
run: nixos-rebuild build --verbose --flake ".#${{ matrix.host }}" | |
aarch64-linux: | |
if: | | |
!contains(github.event.head_commit.message, '[skip-ci arm64]') | |
&& !contains(github.event.head_commit.message, '[skip-ci]') | |
runs-on: self-hosted-aarch64-linux | |
needs: [get-hosts] | |
strategy: | |
fail-fast: false | |
matrix: | |
host: ${{ fromJson(needs.get-hosts.outputs.matrix).aarch64-linux }} | |
steps: | |
- name: repository checkout | |
uses: actions/checkout@v4 | |
- name: build host configuration ${{ matrix.host }} | |
run: nixos-rebuild build --verbose --flake ".#${{ matrix.host }}" |