@@ -22,186 +22,61 @@ jobs:
22
22
matrix :
23
23
system :
24
24
- aarch64
25
- - x86_64
26
25
nix-command :
27
- - fmt -- --check
28
26
- eval .#apps.$_system.nixos-shell.program
29
27
- eval .#apps.$_system.setup.program
30
28
31
29
include :
32
- - nix-command : develop .#jdk8 --profile profile
33
- system : x86_64
34
- - nix-command : develop .#jdk11 --profile profile
35
- system : x86_64
36
- - nix-command : develop .#jdk17 --profile profile
37
- system : x86_64
38
- - nix-command : develop .#php74 --profile profile
39
- system : x86_64
40
- - nix-command : develop .#php80 --profile profile
41
- system : x86_64
42
- - nix-command : develop .#php81 --profile profile
43
- system : x86_64
44
-
45
- - nix-command : build .#homeConfigurations."tobias@gamer".activationPackage
46
- system : x86_64
47
- - nix-command : build .#homeConfigurations."tobhap@M386".activationPackage
48
- system : x86_64
49
- deploy-agent : M386
50
- deploy-args : --async
51
-
52
- - nix-command : build .#nixOnDroidConfigurations.oneplus5.activationPackage --impure
53
- system : aarch64
54
-
55
- - nix-command : build .#nixosConfigurations.argon.config.system.build.toplevel
56
- system : aarch64
57
- deploy-agent : argon
58
- - nix-command : build .#nixosConfigurations.krypton.config.system.build.toplevel
59
- system : x86_64
60
- deploy-agent : krypton
61
- - nix-command : build .#nixosConfigurations.neon.config.system.build.toplevel
62
- system : x86_64
63
- deploy-agent : neon
64
- deploy-args : --async
65
- - nix-command : build .#nixosConfigurations.xenon.config.system.build.toplevel
30
+ - nix-command : build .#nixOnDroidConfigurations.sams9.activationPackage --impure --print-build-logs --log-lines 9999 --accept-flake-config
66
31
system : aarch64
67
- deploy-agent : xenon
68
-
69
- - nix-command : build .#packages.$_system.rpi-firmware
70
- system : aarch64
71
- - nix-command : build .#packages.$_system.rpi-image
72
- system : aarch64
73
- - nix-command : build .#packages.$_system.installer-image
74
- system : x86_64
32
+ deploy-agent : sams9
75
33
76
34
steps :
77
35
- name : Checkout repository
78
36
uses : actions/checkout@v3
79
37
with :
80
38
ref : ${{ inputs.branch }}
81
-
39
+ - name : Install qemu-user-static
40
+ run : sudo apt-get install -y qemu-user-static
82
41
- name : Install nix
83
- uses : cachix/install-nix-action@v20
42
+ uses : cachix/install-nix-action@v22
84
43
with :
85
44
extra_nix_config : |
86
45
keep-going = true
87
46
show-trace = true
88
-
47
+ access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
48
+ system = aarch64-linux # enables binfmt on that machine, see https://nixos.wiki/wiki/NixOS_on_ARM#Compiling_through_binfmt_QEMU
89
49
- name : Setup cachix
90
50
uses : cachix/cachix-action@v12
91
51
with :
92
- name : gerschtli
52
+ name : 573-bc
93
53
authToken : ${{ secrets.CACHIX_AUTH_TOKEN }}
94
-
95
54
- name : Build command (aarch64)
96
55
if : matrix.system == 'aarch64'
97
- # FIXME: use upstream once --tty is removed
98
- # uses: uraimo/run-on-arch-action@v2
99
- uses : Gerschtli/run-on-arch-action@tty
100
- with :
101
- arch : aarch64
102
- distro : alpine_latest
103
- githubToken : ${{ github.token }}
104
- dockerRunArgs : --volume /nix:/nix
105
- install : |
106
- apk --no-cache add curl git xz
107
- adduser --disabled-password ci
108
- env : |
109
- _system: ${{ matrix.system }}-linux
110
- CACHIX_ACTIVATE_TOKEN: ${{ secrets.CACHIX_ACTIVATE_TOKEN || 'no-value' }}
111
- CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
112
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
113
- run : |
114
- set -euo pipefail
115
-
116
- mkdir -p /home/ci/.config/nix
117
-
118
- cat <<EOF > /home/ci/.config/nix/nix.conf
119
- experimental-features = nix-command flakes
120
- keep-going = true
121
- show-trace = true
122
- access-tokens = github.com=$GITHUB_TOKEN
123
- EOF
124
-
125
- chown --recursive ci:ci /nix /home/ci
126
- chgrp --recursive ci "$(pwd)"
127
- chmod -R g+w "$(pwd)"
128
-
129
- echo "::group::Install nix"
130
-
131
- curl \
132
- --silent \
133
- --show-error \
134
- --output /tmp/install \
135
- --retry 5 \
136
- --retry-all-errors \
137
- --fail \
138
- --location \
139
- "https://nixos.org/nix/install"
140
-
141
- su ci -c "sh /tmp/install --no-channel-add --no-daemon"
142
- rm /tmp/install
143
-
144
- function run() {
145
- su ci -c ". /home/ci/.nix-profile/etc/profile.d/nix.sh; $*"
146
- }
147
-
148
- # FIXME: setting build-hook is needed because default hook `nix __build-remote` is not available
149
- function build_hook() {
150
- local nix_path="$(run which nix)"
151
- echo "${nix_path/bin\/nix/libexec/nix/build-remote}"
152
- }
153
- run echo "build-hook = $(build_hook)" >> /home/ci/.config/nix/nix.conf
154
-
155
-
156
- echo "::group::Setup cachix"
157
- run nix-env --quiet -j8 -iA cachix -f https://cachix.org/api/v1/install
158
- run cachix --version
159
- run cachix use gerschtli
160
- run cachix use nix-on-droid
161
-
162
-
163
- echo "::group::Build command"
164
- run git config --global --add safe.directory "$(pwd)"
165
-
166
- run nix ${{ matrix.nix-command }}
167
-
168
-
169
- ${{ github.ref == 'refs/heads/master' && inputs.branch == '' && matrix.deploy-agent &&
170
- format(
171
- '
172
- echo "::group::Build spec"
173
- spec="$(run nix build --print-out-paths ".#cachix-deploy-spec-{0}")"
174
-
175
- echo "::group::Upload spec"
176
- run cachix push gerschtli "$spec"
177
-
178
- echo "::group::Activate deployment"
179
- run cachix deploy activate --agent "{0}" {1} "$spec"
180
- ',
181
- matrix.deploy-agent,
182
- matrix.deploy-args
183
- )
184
- || 'echo "::group::Skip spec deploy"'
185
- }}
186
-
187
- - name : Build command (x86_64)
188
- if : matrix.system == 'x86_64'
189
56
env :
190
57
_system : ${{ matrix.system }}-linux
191
- run : nix ${{ matrix.nix-command }}
58
+ run : |
59
+ cachix use gerschtli
60
+ cachix use nix-on-droid
61
+ cachix use 573-bc
62
+ cachix use nix-community
63
+ cachix use tweag-jupyter
64
+ cachix use coq
65
+ cachix use nixpkgs-ruby
66
+ cachix use arm
67
+
68
+ echo "::group::Build command"
69
+ nix ${{ matrix.nix-command }}
192
70
193
- - name : Deploy cachix-agent spec (x86_64 )
194
- if : matrix.system == 'x86_64' && github.ref == 'refs/heads/master' && inputs.branch == ' ' && matrix.deploy-agent
71
+ - name : Deploy cachix-agent spec (aarch64 )
72
+ if : github.ref == 'refs/heads/wsl2 ' && matrix.deploy-agent
195
73
env :
196
74
CACHIX_ACTIVATE_TOKEN : ${{ secrets.CACHIX_ACTIVATE_TOKEN }}
197
75
run : |
198
- echo "::group::Build spec"
199
- spec="$(nix build --print-out-paths ".#cachix-deploy-spec-${{ matrix.deploy-agent }}")"
200
-
201
- echo "::group::Upload spec"
202
- cachix push gerschtli "$spec"
76
+ echo "::group::Build spec"
77
+ spec="$(nix build --print-out-paths ".#cachix-deploy-spec-${{ matrix.deploy-agent }}" --impure)"
203
78
204
- echo "::group::Activate deployment "
205
- cachix deploy activate --agent "${{ matrix.deploy-agent }}" ${{ matrix.deploy-args }} "$spec"
79
+ echo "::group::Upload spec "
80
+ cachix push 573-bc "$spec"
206
81
207
82
# vim: set sw=2:
0 commit comments