-
Notifications
You must be signed in to change notification settings - Fork 62
450 lines (383 loc) · 11.8 KB
/
nightly.yaml
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
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
name: Nighly build
on:
workflow_dispatch:
inputs:
macos:
description: 'macOS x86_64'
required: true
type: choice
options:
- 'yes'
- 'no'
default: 'yes'
macos-arm64:
description: 'macOS arm64'
required: true
type: choice
options:
- 'yes'
- 'no'
default: 'yes'
windows:
description: 'Windows'
required: true
type: choice
options:
- 'yes'
- 'no'
default: 'yes'
linux:
description: 'Linux x86_64'
required: true
type: choice
options:
- 'yes'
- 'no'
default: 'yes'
linux-arm64:
description: 'Linux aarch64'
required: true
type: choice
options:
- 'yes'
- 'no'
default: 'yes'
bsd:
description: '*BSD'
required: true
type: choice
options:
- 'yes'
- 'no'
default: 'yes'
deploy:
description: 'Deploy'
required: true
type: choice
options:
- 'yes'
- 'no'
default: 'yes'
schedule:
- cron: '30 5 * * *'
# =========================================================================
jobs:
debug:
runs-on: ubuntu-latest
if: always()
name: Parameters
steps:
- name: Input parameters
run: |
echo "macos: ${{ github.event.inputs.macos }}"
echo "windows: ${{ github.event.inputs.windows }}"
echo "linux: ${{ github.event.inputs.linux }}"
echo "macos-arm64: ${{ github.event.inputs.macos-arm64 }}"
echo "linux-arm64: ${{ github.event.inputs.linux-arm64 }}"
echo "deploy: ${{ github.event.inputs.deploy }}"
echo "macos: ${{ github.event.inputs.macos == 'yes' }}"
echo "windows: ${{ github.event.inputs.windows == 'yes' }}"
echo "linux: ${{ github.event.inputs.linux == 'yes' }}"
echo "macos-arm64: ${{ github.event.inputs.macos-arm64 == 'yes' }}"
echo "linux-arm64: ${{ github.event.inputs.linux-arm64 == 'yes' }}"
echo "bsd: ${{ github.event.inputs.bsd == 'yes' }}"
echo "deploy: ${{ github.event.inputs.deploy == 'yes' }}"
# -----------------------------------------------------------------------
macos:
runs-on: macos-12
if: ${{ github.event.inputs.macos == '' || github.event.inputs.macos == 'yes' }}
name: macOS x86_64
env:
# RVERSIONS: "3.5 3.6 4.0 4.1 4.2 4.3-x86_64 4.4-x86_64 4.5-x86_64"
RVERSION_DEFAULT: "4.3-x86_64"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 10
- name: Install rig
run: |
brew tap r-lib/rig
brew install r-lib/rig/rig
- name: Install R
run: |
sudo rig add 3.5
sudo rig add 3.6
sudo rig add 4.0
sudo rig add 4.1
sudo rig add 4.2
sudo rig add 4.3
sudo rig add release
sudo rig add devel
rig default release
- name: Install skopeo
run: |
brew install skopeo
brew link skopeo
skopeo --version
- name: Build pak binaries
run: |
cd tools/build/macos && make build
- name: Deploy packages
run: |
cd tools/build/macos && make deploy
env:
PAK_GHCR_TOKEN: ${{ secrets.PAK_GHCR_TOKEN }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
# -----------------------------------------------------------------------
macos-arm64:
runs-on: macos-latest
if: ${{ github.event.inputs.macos-arm64 == '' || github.event.inputs.macos-arm64 == 'yes' }}
name: macos arm64
env:
RVERSIONS: "4.1-arm64 4.2-arm64 4.3-arm64 4.4-arm64 4.5-arm64"
RVERSION_DEFAULT: "4.4-arm64"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 10
- name: Install rig
run: |
brew tap r-lib/rig
brew install r-lib/rig/rig
- name: Install R
run: |
sudo rig add 4.1
sudo rig add 4.2
sudo rig add 4.3
sudo rig add release
sudo rig add devel
rig default release
- name: Install skopeo
run: |
brew install skopeo
brew link skopeo
skopeo --version
- name: Build pak binaries
run: |
cd tools/build/macos && make build
- name: Deploy packages
run: |
cd tools/build/macos && make deploy
env:
PAK_GHCR_TOKEN: ${{ secrets.PAK_GHCR_TOKEN }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
# ------------------------------------------------------------------------
windows:
runs-on: windows-latest
if: ${{ github.event.inputs.windows == '' || github.event.inputs.windows == 'yes' }}
name: Windows x86_64
strategy:
fail-fast: false
matrix:
config:
- { r: '3.5' }
- { r: '3.6' }
- { r: '4.0' }
- { r: '4.1' }
- { r: '4.2' }
- { r: '4.3' }
- { r: next }
- { r: devel }
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 10
- name: git config
run: |
git config --global user.name "GHA nightly build"
git config --global user.email "[email protected]"
- name: Install rig
run: |
Invoke-WebRequest -Uri https://github.com/r-lib/rig/releases/download/v0.6.1pre/rig-windows-0.6.1pre.exe -OutFile rig-install.exe
Start-Process ".\rig-install.exe" -ArgumentList "/verysilent /suppressmsgboxes" -Wait -NoNewWindow
- name: Install skopeo
run: |
Invoke-WebRequest -Uri https://github.com/gaborcsardi/skopeo/releases/download/v1.6.0/skopeo-1.6.0.zip -OutFile skopeo.zip
New-Item "C:\Tools" -Force -ItemType Directory
Expand-Archive skopeo.zip -DestinationPath C:\Tools
echo "C:\Tools\skopeo" | Out-File -Append -FilePath $env:GITHUB_PATH
- name: Test skopeo
run: |
skopeo --version
# no P3M, because a pak bug fails to install [email protected] from PPM
- name: Install R and RTools
run: |
Foreach($ver in (rig ls --plain)) { rig rm $ver }
rig add ${{ matrix.config.r }} --without-p3m
rig add rtools
# For make and zip
echo "C:\rtools43\usr\bin" | Out-File -Append -FilePath $env:GITHUB_PATH
echo "C:\rtools44\usr\bin" | Out-File -Append -FilePath $env:GITHUB_PATH
- name: Build pak binaries
run: |
cd tools/build/windows && make build
- name: Deploy packages
run: |
cd tools/build/windows && make deploy
env:
PAK_GHCR_TOKEN: ${{ secrets.PAK_GHCR_TOKEN }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
TAR: internal
# -----------------------------------------------------------------------
linux:
runs-on: ubuntu-latest
if: ${{ github.event.inputs.linux == '' || github.event.inputs.linux == 'yes' }}
name: Linux x86_64 R ${{ matrix.config.r }}
strategy:
fail-fast: false
matrix:
config:
- { r: '4.5' }
- { r: '4.4' }
- { r: '4.3' }
- { r: '4.2' }
- { r: '4.1' }
- { r: '4.0' }
- { r: '3.6' }
- { r: '3.5' }
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 10
- name: Build and push
run: |
cd tools/build/linux && make
env:
RVERSIONS: ${{ matrix.config.r }}
GHCR_TOKEN: ${{ secrets.PAK_GHCR_TOKEN }}
# ------------------------------------------------------------------------
linux-arm64:
runs-on: ubuntu-latest
if: ${{ github.event.inputs.linux-arm64 == '' || github.event.inputs.linux-arm64 == 'yes' }}
name: Linux aarch64 R ${{ matrix.config.r }}
strategy:
fail-fast: false
matrix:
config:
- { r: '4.5' }
- { r: '4.4' }
- { r: '4.3' }
- { r: '4.2' }
- { r: '4.1' }
- { r: '4.0' }
- { r: '3.6' }
- { r: '3.5' }
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 10
- name: Build and push
run: |
cd tools/build/linux && make aarch64
env:
RVERSIONS: ${{ matrix.config.r }}
GHCR_TOKEN: ${{ secrets.PAK_GHCR_TOKEN }}
# ------------------------------------------------------------------------
bsd:
runs-on: ubuntu-latest
if: ${{ github.event.inputs.bsd == '' || github.event.inputs.bsd == 'yes' }}
name: BSD
strategy:
fail-fast: false
matrix:
config:
- { os: 'freebsd', release: '15.0' }
- { os: 'freebsd', release: '14.2-pre' }
- { os: 'freebsd', release: '14.1' }
- { os: 'freebsd', release: '13.4' }
- { os: 'openbsd', release: '7.6' }
- { os: 'openbsd', release: '7.5' }
- { os: 'openbsd', release: '7.4' }
- { os: 'netbsd' }
- { os: 'dragonflybsd' }
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 10
- uses: r-hub/actions/setup-r-freebsd@main
if: ${{ matrix.config.os == 'freebsd' }}
with:
release: ${{ matrix.config.release }}
- uses: r-hub/actions/setup-r-openbsd@v1
if: ${{ matrix.config.os == 'openbsd' }}
with:
release: ${{ matrix.config.release }}
- uses: r-hub/actions/setup-r-netbsd@v1
if: ${{ matrix.config.os == 'netbsd' }}
- uses: r-hub/actions/setup-r-dragonflybsd@v1
if: ${{ matrix.config.os == 'dragonflybsd' }}
- name: Build pak binary
run: |
# this runs on the VM
install.packages(".", repos = NULL, type = "source", INSTALL_opts = "--build")
shell: Rscript {0}
- name: Deploy pak binary
run: |
make -f tools/build/docker-deploy/Makefile
env:
PAK_GHCR_TOKEN: ${{ secrets.PAK_GHCR_TOKEN }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
shell: bash
# ------------------------------------------------------------------------
deploy:
runs-on: ubuntu-latest
if: ${{ (github.event.inputs.deploy == '' || github.event.inputs.deploy == 'yes') && always() }}
needs: [ macos, windows, linux, macos-arm64, linux-arm64 ]
steps:
- name: Update Ubuntu package db
run: |
sudo apt-get update
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 10
- name: Create user library
run: |
dir.create(Sys.getenv("R_LIBS_USER"), recursive = TRUE)
shell: Rscript {0}
- name: Dependencies
uses: r-lib/actions/setup-r-dependencies@v2
- name: Install local pak tree
run: R CMD INSTALL .
env:
PAK_BUNDLE: false
- name: Create repository
run: |
pak:::create_pak_repo("repo")
shell: Rscript {0}
- name: Deploy to GitHub pages (test)
if: github.event_name != 'pull_request'
uses: JamesIves/[email protected]
with:
repository-name: r-lib/r-lib.github.io
token: ${{ secrets.PAK_GHCR_TOKEN }}
single-commit: true
clean: true
branch: test
folder: repo
- name: Run tests
run: |
testthat::test_local(filter = "^repo$")
shell: Rscript {0}
env:
PAK_TESTS: true
- name: Deploy to GitHub Pages (prod)
if: github.event_name != 'pull_request'
uses: JamesIves/[email protected]
with:
repository-name: r-lib/r-lib.github.io
token: ${{ secrets.PAK_GHCR_TOKEN }}
single-commit: true
clean: true
branch: gh-pages
folder: repo