Skip to content

Commit 44f212a

Browse files
authored
Try native arm64 runner
1 parent 4b3fea2 commit 44f212a

File tree

1 file changed

+39
-38
lines changed

1 file changed

+39
-38
lines changed

.github/workflows/daily-rocker-builds.yaml

Lines changed: 39 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,10 @@ jobs:
7373
buildrver:
7474
strategy:
7575
matrix:
76-
arch: [amd64, arm64]
77-
runs-on: ubuntu-latest
76+
build:
77+
- { arch: 'amd64', runner: 'ubuntu-latest' }
78+
- { arch: 'arm64', runner: 'ubuntu-latest-arm64' }
79+
runs-on: ${{ matrix.build.runner }}
7880
steps:
7981
- uses: actions/checkout@v3
8082

@@ -91,12 +93,6 @@ jobs:
9193
echo registryuser=$(echo ${{ github.repository_owner }} | awk '{print tolower($0)}') >> $GITHUB_OUTPUT
9294
echo rockerintermediateprefix=$(echo "ghcr.io/${{ github.repository_owner }}/rocker" | awk '{print tolower($0)}') >> $GITHUB_OUTPUT
9395
94-
- name: Set up QEMU
95-
uses: docker/setup-qemu-action@v2
96-
with:
97-
platforms: arm64
98-
if: matrix.arch == 'arm64'
99-
10096
- name: Login to GHCR
10197
uses: docker/login-action@v2
10298
with:
@@ -105,26 +101,29 @@ jobs:
105101
password: ${{ secrets.GITHUB_TOKEN }}
106102

107103
- name: Prep rocker rocker files
108-
run: bash .github/scripts/rocker_prep.sh ${{ steps.defs.outputs.rver }} ${{ steps.defs.outputs.biocver }} ${{ steps.defs.outputs.rockerintermediateprefix }} ${{ matrix.arch }}
104+
run: bash .github/scripts/rocker_prep.sh ${{ steps.defs.outputs.rver }} ${{ steps.defs.outputs.biocver }} ${{ steps.defs.outputs.rockerintermediateprefix }} ${{ matrix.build.arch }}
109105

110106
- name: Set up Docker Buildx
111107
uses: docker/setup-buildx-action@v2
112108
with:
113-
platforms: linux/${{ matrix.arch }}
109+
platforms: linux/${{ matrix.build.arch }}
114110

115111
- name: Build and push r-ver
116112
uses: docker/build-push-action@v3
117113
with:
118114
file: rocker-versioned2/dockerfiles/r-ver_${{ steps.defs.outputs.rver }}.Dockerfile
119115
context: rocker-versioned2
120116
push: true
121-
tags: ${{ steps.defs.outputs.rockerintermediateprefix }}-r-ver:${{ steps.defs.outputs.rver }}-${{ matrix.arch }}
122-
platforms: linux/${{ matrix.arch }}
117+
tags: ${{ steps.defs.outputs.rockerintermediateprefix }}-r-ver:${{ steps.defs.outputs.rver }}-${{ matrix.build.arch }}
118+
platforms: linux/${{ matrix.build.arch }}
123119

124120
buildrstudio:
125121
strategy:
126122
matrix:
127-
arch: [amd64, arm64]
123+
build:
124+
- { arch: 'amd64', runner: 'ubuntu-latest' }
125+
- { arch: 'arm64', runner: 'ubuntu-latest-arm64' }
126+
runs-on: ${{ matrix.build.runner }}
128127
needs: buildrver
129128
runs-on: ubuntu-latest
130129
steps:
@@ -147,7 +146,7 @@ jobs:
147146
uses: docker/setup-qemu-action@v2
148147
with:
149148
platforms: arm64
150-
if: matrix.arch == 'arm64'
149+
if: matrix.build.arch == 'arm64'
151150

152151
- name: Login to GHCR
153152
uses: docker/login-action@v2
@@ -158,34 +157,35 @@ jobs:
158157

159158
- name: Prep rocker rocker files
160159
run: |
161-
bash .github/scripts/rocker_prep.sh ${{ steps.defs.outputs.rver }} ${{ steps.defs.outputs.biocver }} ${{ steps.defs.outputs.rockerintermediateprefix }} ${{ matrix.arch }}
160+
bash .github/scripts/rocker_prep.sh ${{ steps.defs.outputs.rver }} ${{ steps.defs.outputs.biocver }} ${{ steps.defs.outputs.rockerintermediateprefix }} ${{ matrix.build.arch }}
162161
163162
164163
- name: Move some tidyverse builds to docker for arm64 to avoid timeout
165164
run: |
166165
head -n44 rocker-versioned2/scripts/install_tidyverse.sh >> rocker-versioned2/scripts/install_rstudio.sh
167166
sed -i "\|RUN /rocker_scripts/install_rstudio.sh|i COPY scripts /rocker_scripts" rocker-versioned2/dockerfiles/rstudio_${{ steps.defs.outputs.rver }}.Dockerfile
168-
if: matrix.arch == 'arm64'
167+
if: matrix.build.arch == 'arm64'
169168

170169
- name: Set up Docker Buildx
171170
uses: docker/setup-buildx-action@v2
172171
with:
173-
platforms: linux/${{ matrix.arch }}
172+
platforms: linux/${{ matrix.build.arch }}
174173

175174
- name: Build and push rstudio
176175
uses: docker/build-push-action@v3
177176
with:
178177
file: rocker-versioned2/dockerfiles/rstudio_${{ steps.defs.outputs.rver }}.Dockerfile
179178
context: rocker-versioned2
180179
push: true
181-
tags: ${{ steps.defs.outputs.rockerintermediateprefix }}-rstudio:${{ steps.defs.outputs.rver }}-${{ matrix.arch }}
182-
platforms: linux/${{ matrix.arch }}
180+
tags: ${{ steps.defs.outputs.rockerintermediateprefix }}-rstudio:${{ steps.defs.outputs.rver }}-${{ matrix.build.arch }}
181+
platforms: linux/${{ matrix.build.arch }}
183182

184183
buildtidyverse:
185184
strategy:
186185
matrix:
187-
arch: [amd64, arm64]
188-
runs-on: ubuntu-latest
186+
build:
187+
- { arch: 'amd64', runner: 'ubuntu-latest' }
188+
runs-on: ${{ matrix.build.runner }}
189189
needs: buildrstudio
190190
steps:
191191
- uses: actions/checkout@v3
@@ -207,7 +207,7 @@ jobs:
207207
uses: docker/setup-qemu-action@v2
208208
with:
209209
platforms: arm64
210-
if: matrix.arch == 'arm64'
210+
if: matrix.build.arch == 'arm64'
211211

212212
- name: Login to GHCR
213213
uses: docker/login-action@v2
@@ -217,27 +217,28 @@ jobs:
217217
password: ${{ secrets.GITHUB_TOKEN }}
218218

219219
- name: Prep rocker rocker files
220-
run: bash .github/scripts/rocker_prep.sh ${{ steps.defs.outputs.rver }} ${{ steps.defs.outputs.biocver }} ${{ steps.defs.outputs.rockerintermediateprefix }} ${{ matrix.arch }}
220+
run: bash .github/scripts/rocker_prep.sh ${{ steps.defs.outputs.rver }} ${{ steps.defs.outputs.biocver }} ${{ steps.defs.outputs.rockerintermediateprefix }} ${{ matrix.build.arch }}
221221

222222
- name: Set up Docker Buildx
223223
uses: docker/setup-buildx-action@v2
224224
with:
225-
platforms: linux/${{ matrix.arch }}
225+
platforms: linux/${{ matrix.build.arch }}
226226

227227
- name: Build and push tidyverse
228228
uses: docker/build-push-action@v3
229229
with:
230230
file: rocker-versioned2/dockerfiles/tidyverse_${{ steps.defs.outputs.rver }}.Dockerfile
231231
context: rocker-versioned2
232232
push: true
233-
tags: ${{ steps.defs.outputs.rockerintermediateprefix }}-tidyverse:${{ steps.defs.outputs.rver }}-${{ matrix.arch }}
234-
platforms: linux/${{ matrix.arch }}
233+
tags: ${{ steps.defs.outputs.rockerintermediateprefix }}-tidyverse:${{ steps.defs.outputs.rver }}-${{ matrix.build.arch }}
234+
platforms: linux/${{ matrix.build.arch }}
235235

236236
mlbuild:
237237
strategy:
238238
matrix:
239-
arch: [amd64]
240-
runs-on: ubuntu-latest
239+
build:
240+
- { arch: 'amd64', runner: 'ubuntu-latest' }
241+
runs-on: ${{ matrix.build.runner }}
241242
steps:
242243
- uses: actions/checkout@v3
243244

@@ -258,7 +259,7 @@ jobs:
258259
uses: docker/setup-qemu-action@v2
259260
with:
260261
platforms: arm64
261-
if: matrix.arch == 'arm64'
262+
if: matrix.build.arch == 'arm64'
262263

263264
- name: Login to GHCR
264265
uses: docker/login-action@v2
@@ -278,8 +279,8 @@ jobs:
278279
# Package archived from CRAN
279280
sed -i '/rmdshower/d' rocker-versioned2/scripts/install_verse.sh
280281
281-
sed -i 's#rocker/cuda:${{ steps.defs.outputs.rver }}#${{ steps.defs.outputs.rockerintermediateprefix }}-cuda:${{ steps.defs.outputs.rver }}-${{ matrix.arch }}#g' rocker-versioned2/dockerfiles/ml_${{ steps.defs.outputs.rver }}.Dockerfile
282-
sed -i 's#rocker/ml:${{ steps.defs.outputs.rver }}#${{ steps.defs.outputs.rockerintermediateprefix }}-ml:${{ steps.defs.outputs.rver }}-${{ matrix.arch }}#g' rocker-versioned2/dockerfiles/ml-verse_${{ steps.defs.outputs.rver }}.Dockerfile
282+
sed -i 's#rocker/cuda:${{ steps.defs.outputs.rver }}#${{ steps.defs.outputs.rockerintermediateprefix }}-cuda:${{ steps.defs.outputs.rver }}-${{ matrix.build.arch }}#g' rocker-versioned2/dockerfiles/ml_${{ steps.defs.outputs.rver }}.Dockerfile
283+
sed -i 's#rocker/ml:${{ steps.defs.outputs.rver }}#${{ steps.defs.outputs.rockerintermediateprefix }}-ml:${{ steps.defs.outputs.rver }}-${{ matrix.build.arch }}#g' rocker-versioned2/dockerfiles/ml-verse_${{ steps.defs.outputs.rver }}.Dockerfile
283284
284285
echo "Bioconductor Version: ${{ steps.defs.outputs.biocver }}"
285286
if [ "${{ steps.defs.outputs.rver }}" == "devel" ]; then
@@ -291,32 +292,32 @@ jobs:
291292
- name: Set up Docker Buildx
292293
uses: docker/setup-buildx-action@v2
293294
with:
294-
platforms: linux/${{ matrix.arch }}
295+
platforms: linux/${{ matrix.build.arch }}
295296

296297
- name: Build and load cuda
297298
uses: docker/build-push-action@v3
298299
with:
299300
file: rocker-versioned2/dockerfiles/cuda_${{ steps.defs.outputs.rver }}.Dockerfile
300301
context: rocker-versioned2
301302
push: true
302-
tags: ${{ steps.defs.outputs.rockerintermediateprefix }}-cuda:${{ steps.defs.outputs.rver }}-${{ matrix.arch }}
303-
platforms: linux/${{ matrix.arch }}
303+
tags: ${{ steps.defs.outputs.rockerintermediateprefix }}-cuda:${{ steps.defs.outputs.rver }}-${{ matrix.build.arch }}
304+
platforms: linux/${{ matrix.build.arch }}
304305

305306
- name: Build and load ml
306307
uses: docker/build-push-action@v3
307308
with:
308309
file: rocker-versioned2/dockerfiles/ml_${{ steps.defs.outputs.rver }}.Dockerfile
309310
context: rocker-versioned2
310311
push: true
311-
tags: ${{ steps.defs.outputs.rockerintermediateprefix }}-ml:${{ steps.defs.outputs.rver }}-${{ matrix.arch }}
312-
platforms: linux/${{ matrix.arch }}
312+
tags: ${{ steps.defs.outputs.rockerintermediateprefix }}-ml:${{ steps.defs.outputs.rver }}-${{ matrix.build.arch }}
313+
platforms: linux/${{ matrix.build.arch }}
313314

314315
- name: Build and load ml-verse
315316
uses: docker/build-push-action@v3
316317
with:
317318
file: rocker-versioned2/dockerfiles/ml-verse_${{ steps.defs.outputs.rver }}.Dockerfile
318319
context: rocker-versioned2
319320
push: true
320-
tags: ${{ steps.defs.outputs.rockerintermediateprefix }}-ml-verse:${{ steps.defs.outputs.rver }}-${{ matrix.arch }}
321-
platforms: linux/${{ matrix.arch }}
321+
tags: ${{ steps.defs.outputs.rockerintermediateprefix }}-ml-verse:${{ steps.defs.outputs.rver }}-${{ matrix.build.arch }}
322+
platforms: linux/${{ matrix.build.arch }}
322323

0 commit comments

Comments
 (0)