Repository navigation
152 lines (135 loc) · 5.18 KB
/
Copy pathci.yml
File metadata and controls
152 lines (135 loc) · 5.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
name: "CI"
on:
push:
branches:
- main
- master
- development
pull_request:
branches:
- main
- master
- development
workflow_dispatch:
jobs:
matrix:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: "mba (Darwin)"
os: macos-14
attr: "darwinConfigurations.mba.system"
- name: "mba-dark (Darwin)"
os: macos-14
attr: "darwinConfigurations.mba-dark.system"
- name: "nixos-test (NixOS)"
os: ubuntu-latest
attr: "nixosConfigurations.nixos-test.config.system.build.toplevel"
- name: "mba-asahi (NixOS ARM)"
os: ubuntu-22.04-arm
attr: "nixosConfigurations.mba-asahi.config.system.build.toplevel"
- name: "orb-wawona (NixOS ARM guest)"
os: ubuntu-22.04-arm
attr: "nixosConfigurations.orb-wawona.config.system.build.toplevel"
- name: "sliceanddice (NixOS x86_64)"
os: ubuntu-latest
attr: "nixosConfigurations.sliceanddice.config.system.build.toplevel"
- name: "sliceanddice-installer (NixOS x86_64)"
os: ubuntu-latest
attr: "nixosConfigurations.sliceanddice-installer.config.system.build.toplevel"
- name: "8amps-linux (Home Manager)"
os: ubuntu-latest
attr: "homeConfigurations.8amps-linux.activationPackage"
- name: "packages.dendritic (Darwin)"
os: macos-14
attr: "packages.aarch64-darwin.dendritic"
- name: "packages.dendritic-local-ai (Darwin)"
os: macos-14
attr: "packages.aarch64-darwin.dendritic-local-ai"
- name: "checks.treefmt (Darwin)"
os: macos-14
attr: "checks.aarch64-darwin.treefmt"
- name: "checks.hosts-eval (Darwin)"
os: macos-14
attr: "checks.aarch64-darwin.hosts-eval"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Rampage Mode (Nothing but Nix)
if: runner.os == 'Linux'
uses: wimpysworld/nothing-but-nix@main
with:
hatchet-protocol: "rampage"
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
with:
extra-conf: |
build-dir = /nix/build
- name: Set up Magic Nix Cache
if: runner.os == 'Linux'
uses: DeterminateSystems/magic-nix-cache-action@main
- name: Build ${{ matrix.name }}
run: |
# Use quotes for Home Manager config name with dashes
if [[ "${{ matrix.attr }}" == *"8amps-linux"* ]]; then
nix build .#homeConfigurations.\"8amps-linux\".activationPackage --print-build-logs
else
nix build .#${{ matrix.attr }} --print-build-logs
fi
secretspec-demo:
name: secretspec demo declarations
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Validate secretspec.toml declarations (no decrypt)
run: |
set -euo pipefail
nix profile install nixpkgs#secretspec
test -f testdata/secretspec-demo/secretspec.toml
# Ensure required keys are declared; do not require provider values in public CI.
grep -q 'DEMO_API_KEY' testdata/secretspec-demo/secretspec.toml
grep -q 'DEMO_DATABASE_URL' testdata/secretspec-demo/secretspec.toml
grep -q 'pass://secretspec/shared' testdata/secretspec-demo/secretspec.toml
if secretspec check --help >/dev/null 2>&1; then
(cd testdata/secretspec-demo && secretspec check) || true
fi
echo "OK secretspec demo declarations"
windows-dualboot:
name: windows dual-boot check
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Rampage Mode (Nothing but Nix)
uses: wimpysworld/nothing-but-nix@main
with:
hatchet-protocol: "rampage"
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
with:
extra-conf: |
build-dir = /nix/build
- name: Set up Magic Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@main
- name: Check windows-dualboot
run: nix build .#checks.x86_64-linux.windows-dualboot --print-build-logs
publish:
needs: [matrix, secretspec-demo, windows-dualboot]
if: github.event_name == 'push' && (github.ref == 'refs/heads/development' || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Publish to Upstream Development Channel
run: |
echo "All builds passed. The 'development' channel is now validated."
# If the user has a specific 'development' channel branch or FlakeHub integration:
# nix run .#publish-to-flakehub -- --channel development
# For now, we signal success.