-
Notifications
You must be signed in to change notification settings - Fork 0
205 lines (180 loc) · 5.33 KB
/
ci.yml
File metadata and controls
205 lines (180 loc) · 5.33 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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
name: codedown-languages
on:
push:
workflow_dispatch:
jobs:
verify-nixpkgs-revs:
name: "verify-nixpkgs-revs (${{matrix.runs-on}})"
runs-on:
- self-hosted
- ${{matrix.runs-on}}
strategy:
fail-fast: false
matrix:
runs-on:
- macOS
- Linux
steps:
- uses: actions/checkout@v4
- name: verify-default-nix.sh
if: "!contains(github.event.head_commit.message, 'noci')"
run: ./.aliases/dev-verify-default-nix
nix-flake-check:
name: "nix-flake-check (${{matrix.runs-on}})"
runs-on:
- self-hosted
- ${{matrix.runs-on}}
strategy:
fail-fast: false
matrix:
runs-on:
- macOS
- Linux
steps:
- uses: actions/checkout@v4
- name: nix flake check
if: "!contains(github.event.head_commit.message, 'noci')"
run: nix flake check
build-ui-metadata:
name: "build-ui-metadata (${{matrix.runs-on.os}}, ${{matrix.runs-on.arch}})"
runs-on:
- self-hosted
- ${{matrix.runs-on.os}}
strategy:
fail-fast: false
matrix:
runs-on:
- os: macOS
arch: aarch64-darwin
- os: Linux
arch: x86_64-linux
- os: Linux
arch: aarch64-linux
steps:
- uses: actions/checkout@v4
- name: Build .#ui_metadata_farm
if: "!contains(github.event.head_commit.message, 'noci')"
run: |
nix build .#packages.${{matrix.runs-on.arch}}.ui_metadata_farm
build-sample-environments:
name: "build-sample-environments (${{matrix.runs-on.os}}, ${{matrix.runs-on.arch}})"
runs-on:
- self-hosted
- ${{matrix.runs-on.os}}
strategy:
fail-fast: false
matrix:
runs-on:
- os: macOS
arch: aarch64-darwin
- os: Linux
arch: x86_64-linux
- os: Linux
arch: aarch64-linux
steps:
- uses: actions/checkout@v4
- name: Build .#sample_environments_farm
if: "!contains(github.event.head_commit.message, 'noci')"
run: |
nix build .#packages.${{matrix.runs-on.arch}}.sample_environments_farm
test:
name: ${{ matrix.suite.name }} (${{ matrix.runs-on }}${{ matrix.suite.flags && format(', {0}', matrix.suite.flags) || '' }})
runs-on:
- self-hosted
- ${{matrix.runs-on}}
strategy:
fail-fast: false
matrix:
suite:
- name: bash
- name: clojure
- name: coq
- name: cpp
- name: go
- name: haskell
flags: "-f ghc96"
- name: haskell
flags: "-f ghc98"
- name: haskell
flags: "-f ghc910"
- name: haskell
flags: "-f ghc912"
- name: julia
flags: "-f julia_19"
- name: julia
flags: "-f julia_110"
- name: julia
flags: "-f julia_111"
- name: octave
- name: postgres
- name: python
- name: r
- name: ruby
- name: rust
- name: zsh
- name: spellchecker
- name: typst
- name: exporters
- name: sample-environments
- name: searchers
- name: settings-schemas
runs-on:
- macOS
- Linux
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Build tests
if: "!contains(github.event.head_commit.message, 'noci')"
run: |
cd tests
export NIX_PATH=nixpkgs=$(nix run .#nixpkgsPath)
export PATH=$(nix build --no-link .#stack --json | jq -r '.[0].outputs.out')/bin:$PATH
export PATH=$(nix build --no-link .#direnv --json | jq -r '.[0].outputs.out')/bin:$PATH
echo "Got path: $PATH"
direnv allow
direnv exec . stack build --nix --no-nix-pure
- name: Run tests
if: "!contains(github.event.head_commit.message, 'noci')"
run: |
cd tests
export TEST_ROOT=$(pwd)/test_root
echo "Got TEST_ROOT: $TEST_ROOT"
echo TEST_ROOT="$TEST_ROOT" >> $GITHUB_ENV
export NIX_PATH=nixpkgs=$(nix run .#nixpkgsPath)
export PATH=$(nix build --no-link .#stack --json | jq -r '.[0].outputs.out')/bin:$PATH
stack run --nix --no-nix-pure -- \
--print \
--fixed-root "$TEST_ROOT" \
--markdown-summary "$GITHUB_STEP_SUMMARY" \
--${{matrix.suite.name}} ${{matrix.suite.flags}}
- name: Upload test artifacts
if: always() && runner.os != 'macOS'
continue-on-error: true
shell: bash
run: |
DEST="tester@desktop1:/home/tester/all_test_runs/languages_${{github.workflow}}_${{github.run_number}}/${{matrix.suite.name}}-${{matrix.suite.flags}}"
DEST="${DEST// /_}"
echo "DEST: $DEST"
if [[ -n "$TEST_ROOT" ]]; then
rsync \
-e "ssh -F /secrets/ci_ssh_config" \
-azW --mkpath \
"$TEST_ROOT/" \
"$DEST"
fi
- name: Save test artifacts (macOS)
if: always() && runner.os == 'macOS'
continue-on-error: true
shell: bash
run: |
DEST="/Users/tester/all_test_runs/languages_${{github.workflow}}_${{github.run_number}}/${{matrix.suite.name}}-${{matrix.suite.flags}}"
DEST="${DEST// /_}"
echo "DEST: $DEST"
if [[ -n "$TEST_ROOT" ]]; then
rsync \
-azW --mkpath \
"$TEST_ROOT/" \
"$DEST"
fi