-
Notifications
You must be signed in to change notification settings - Fork 19
329 lines (319 loc) · 9 KB
/
ci.yml
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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
name: CI
on:
push:
branches: '*'
tags: v*
pull_request:
branches:
- master
jobs:
# build: # make sure build/ci work properly
# runs-on: ubuntu-latest
# timeout-minutes: 2
# steps:
# - uses: actions/checkout@v4
# - run: npm install
# - run: npm run all
#
# FreeBSD: # make sure the action works on a clean machine without building
# name: FreeBSD ${{ matrix.architecture.name }} ${{ matrix.version }} on ${{ matrix.host.name }}
# runs-on: ${{ matrix.host.name }}
# timeout-minutes: 5
# strategy:
# fail-fast: false
# matrix:
# version:
# - '13.2'
# - '13.1'
# - '13.0'
# - '12.4'
# - '12.2'
#
# architecture:
# - name: arm64
# - name: x86-64
# uname: amd64
#
# host:
# - name: ubuntu-latest
# # /home is symlinked to /usr/home. pwd will return the resolved path.
# work_directory: /usr/home/runner/work/action/action
#
# - name: macos-latest
# work_directory: /Users/runner/work/action/action
#
# exclude:
# - version: '12.2'
# architecture: { name: arm64 }
#
# - architecture: { name: arm64 }
# host: { name: macos-latest }
#
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# persist-credentials: false
#
# - name: test
# uses: ./.github/workflows/support/test
# with:
# name: FreeBSD
# architecture: ${{ matrix.architecture.name }}
# version: ${{ matrix.version }}
# uname_release: ${{ matrix.version}}-RELEASE
# uname_hardware: ${{ matrix.architecture.uname || matrix.architecture.name }}
# work_directory: ${{ matrix.host.work_directory }}
#
# OpenBSD:
# name: OpenBSD ${{ matrix.architecture.name }} ${{ matrix.version }} on ${{ matrix.host.name }}
# runs-on: ${{ matrix.host.name }}
# timeout-minutes: 5
# strategy:
# fail-fast: false
# matrix:
# version:
# - '7.4'
# - '7.3'
# - '7.2'
# - '7.1'
# - '6.9'
# - '6.8'
#
# architecture:
# - name: arm64
# - name: x86-64
# uname: amd64
#
# host:
# - name: ubuntu-latest
# work_directory: /home/runner/work/action/action
#
# - name: macos-latest
# work_directory: /Users/runner/work/action/action
#
# exclude:
# - version: '6.8'
# architecture: { name: arm64 }
#
# - architecture: { name: arm64 }
# host: { name: macos-latest }
#
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# persist-credentials: false
#
# - name: test
# uses: ./.github/workflows/support/test
# with:
# name: OpenBSD
# architecture: ${{ matrix.architecture.name }}
# version: ${{ matrix.version }}
# uname_hardware: ${{ matrix.architecture.uname || matrix.architecture.name }}
# work_directory: ${{ matrix.host.work_directory }}
#
# NetBSD:
# name: NetBSD ${{ matrix.architecture.name }} ${{ matrix.version }} on ${{ matrix.host.name }}
# runs-on: ${{ matrix.host.name }}
# timeout-minutes: 5
# strategy:
# fail-fast: false
# matrix:
# version:
# - '9.3'
# - '9.2'
#
# architecture:
# - name: x86-64
# uname: amd64
#
# host:
# - name: ubuntu-latest
# work_directory: /home/runner/work/action/action
#
# - name: macos-latest
# work_directory: /Users/runner/work/action/action
#
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# persist-credentials: false
#
# - name: test
# uses: ./.github/workflows/support/test
# with:
# name: NetBSD
# architecture: ${{ matrix.architecture.name }}
# version: ${{ matrix.version }}
# uname_hardware: ${{ matrix.architecture.uname || matrix.architecture.name }}
# work_directory: ${{ matrix.host.work_directory }}
#
# test-no-env:
# timeout-minutes: 5
# name: Test without environment variables
# runs-on: ubuntu-latest
#
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# persist-credentials: false
#
# - name: Test
# uses: ./
# with:
# operating_system: freebsd
# architecture: x86-64
# version: '13.0'
# run: env | sort
#
# test-cpu-count-config:
# timeout-minutes: 5
# name: Test configuring CPU count
# runs-on: ubuntu-latest
#
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# persist-credentials: false
#
# - name: Test
# uses: ./
# with:
# operating_system: freebsd
# architecture: x86-64
# version: '13.1'
# cpu_count: 8
# run: |
# sysctl hw.ncpu
# [ `sysctl -n hw.ncpu` = 8 ]
#
# # Does not automatically verify anything. Only for manual verification
# test-hypervisor-config:
# timeout-minutes: 5
# name: Test configuring hypervisor
# runs-on: macos-latest
#
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# persist-credentials: false
#
# - name: Test
# uses: ./
# with:
# operating_system: freebsd
# architecture: x86-64
# version: '13.1'
# hypervisor: qemu
# run: sysctl hw.model
#
# test-custom-vm-image:
# timeout-minutes: 5
# name: Test custom VM image
# runs-on: macos-latest
#
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# persist-credentials: false
#
# - name: Test
# uses: ./
# with:
# operating_system: openbsd
# architecture: x86-64
# version: '7.3'
# image_url: https://github.com/cross-platform-actions/test-custom-image-builder/releases/download/v1.0.0/openbsd-7.3-x86-64.qcow2
# run: test -f /foo
test-cpu-features:
timeout-minutes: 5
name: Test CPU features
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup RDP
run: |
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart \
-activate \
-restart -agent \
-configure \
-access -on \
-clientopts -setvnclegacy -vnclegacy yes \
-clientopts -setvncpw -vncpw foobar \
-privs -all
- name: Setup ngrok
run: |
brew install --cask ngrok
ngrok tcp 5900 \
--authtoken "${{ secrets.NGROK_TOKEN }}" \
--region eu &
# - name: Start SSH via ngrok
# uses: rdp-studio/ssh2actions@main
# with:
# mode: ngrok
# env:
# # After sign up on the https://ngrok.com
# # You can find this token here: https://dashboard.ngrok.com/auth/your-authtoken
# NGROK_TOKEN: ${{ secrets.NGROK_TOKEN }}
# NGROK_REGION: eu
# SSH_PASSWORD: foobar
- name: Test
uses: ./
with:
operating_system: openbsd
architecture: x86-64
version: '7.4'
run: ls
# test-sync-files:
# timeout-minutes: 5
# name: 'Test sync files: ${{ matrix.data.direction }}'
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix:
# data:
# - direction: runner-to-vm
# run: test -f foo.txt && touch bar.txt
# run_after: '! test -f bar.txt' # The new files from the VM should not sync back
#
# - direction: vm-to-runner
# run: '[ ! -f foo.txt ] && touch bar.txt'
# run_after: 'test -f bar.txt' # The new files from the VM should sync back
#
# - direction: false
# run: '[ ! -f foo.txt ] && touch bar.txt'
# run_after: '! test -f bar.txt' # The new files from the VM should not sync back
#
# - direction: true
# run: test -f foo.txt && touch bar.txt
# run_after: test -f bar.txt
#
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# persist-credentials: false
#
# - run: touch foo.txt
#
# - name: Test
# uses: ./
# with:
# operating_system: freebsd
# architecture: x86-64
# version: '13.2'
# sync_files: ${{ matrix.data.direction }}
# run: ${{ matrix.data.run }}
#
# - name: Run after
# run: ${{ matrix.data.run_after }}