@@ -170,19 +170,12 @@ jobs:
170
170
name : Debian docker image
171
171
runs-on : ${{ matrix.os }}
172
172
strategy :
173
+ fail-fast : false
173
174
matrix :
174
- target :
175
- - x86_64-unknown-linux-gnu
176
- - aarch64-unknown-linux-gnu
177
175
include :
178
176
- os : ubuntu-20.04
179
177
target : x86_64-unknown-linux-gnu
180
- platforms : linux/amd64
181
- avx : 1
182
- - os : self-hosted
183
- target : aarch64-unknown-linux-gnu
184
- platforms : linux/arm64
185
- avx : 0
178
+ platforms : linux/amd64,linux/arm64
186
179
timeout-minutes : 30
187
180
steps :
188
181
- name : Check out the repo
@@ -220,6 +213,8 @@ jobs:
220
213
with :
221
214
username : ${{ secrets.DOCKERHUB_USERNAME }}
222
215
password : ${{ secrets.DOCKERHUB_TOKEN }}
216
+ - name : Set up QEMU
217
+ uses : docker/setup-qemu-action@v1
223
218
- name : Set up Docker Buildx
224
219
uses : docker/setup-buildx-action@v1
225
220
with :
@@ -242,7 +237,6 @@ jobs:
242
237
org.opencontainers.image.revision=${{ github.sha }}
243
238
org.opencontainers.image.licenses=${{ fromJson(steps.repo.outputs.result).license.spdx_id }}
244
239
build-args : |
245
- WITH_AVX2=${{ matrix.avx }}
246
240
IMAGE_VERSION=${{ steps.prep.outputs.version }}
247
241
248
242
docker-alpine :
@@ -319,23 +313,28 @@ jobs:
319
313
name : Cube Store Docker
320
314
runs-on : ${{ matrix.os }}
321
315
strategy :
316
+ fail-fast : false
322
317
matrix :
323
- target :
324
- - x86_64-unknown-linux-gnu
325
- - aarch64-unknown-linux-gnu
326
318
include :
327
319
- os : ubuntu-20.04
328
320
target : x86_64-unknown-linux-gnu
329
321
platforms : linux/amd64
330
- avx : 0
331
- - os : ubuntu-20.04
332
- target : x86_64-unknown-linux-gnu
333
- platforms : linux/amd64
334
- avx : 1
322
+ build-args : WITH_AVX2=1
323
+ postfix : " "
324
+ tag : " latest"
335
325
- os : self-hosted
336
326
target : aarch64-unknown-linux-gnu
337
327
platforms : linux/arm64
338
- avx : 0
328
+ build-args : WITH_AVX2=0
329
+ postfix : " -arm64v8"
330
+ tag : " arm64v8"
331
+ # Non AVX build
332
+ - os : ubuntu-20.04
333
+ target : x86_64-unknown-linux-gnu
334
+ platforms : linux/amd64
335
+ build-args : WITH_AVX2=0
336
+ postfix : " -non-avx"
337
+ tag : " non-avx"
339
338
timeout-minutes : 60
340
339
steps :
341
340
- name : Check out the repo
@@ -361,22 +360,15 @@ jobs:
361
360
elif [[ $GITHUB_REF == refs/tags/* ]]; then
362
361
VERSION=${GITHUB_REF#refs/tags/}
363
362
fi
364
- if [ ${{ matrix.avx }} == 1 ]; then
365
- TAGS="${DOCKER_IMAGE}:${VERSION}"
366
- elif [ ${{ matrix.avx }} == 0 ]; then
367
- TAGS="${DOCKER_IMAGE}:${VERSION}-non-avx"
368
- fi
363
+
364
+ TAGS="${DOCKER_IMAGE}:${VERSION}${{ matrix.postfix }}"
365
+
369
366
if [[ $VERSION =~ ^v[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
370
367
MINOR=${VERSION%.*}
371
368
MAJOR=${MINOR%.*}
372
- if [ ${{ matrix.avx }} == 1 ]; then
373
- TAGS="$TAGS,${DOCKER_IMAGE}:${MINOR},${DOCKER_IMAGE}:${MAJOR},${DOCKER_IMAGE}:latest"
374
- elif [ ${{ matrix.avx }} == 0 ]; then
375
- TAGS="$TAGS,${DOCKER_IMAGE}:${MINOR}-non-avx,${DOCKER_IMAGE}:${MAJOR}-non-avx,${DOCKER_IMAGE}:non-avx"
376
- fi
377
- elif [ "${{ github.event_name }}" = "push" && ${{ matrix.avx }} == 0 ]; then
378
- TAGS="$TAGS,${DOCKER_IMAGE}:sha-${GITHUB_SHA::8}-non-avx"
369
+ TAGS="$TAGS,${DOCKER_IMAGE}:${MINOR}${{ matrix.postfix }},${DOCKER_IMAGE}:${MAJOR}${{ matrix.postfix }},${DOCKER_IMAGE}:${{ matrix.tag }}"
379
370
fi
371
+
380
372
echo ::set-output name=version::${VERSION}
381
373
echo ::set-output name=tags::${TAGS}
382
374
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
@@ -393,17 +385,16 @@ jobs:
393
385
uses : actions/cache@v2
394
386
with :
395
387
path : /tmp/.buildx-cache
396
- key : ${{ runner.os }}-${{ matrix.target }}-buildx-${{ matrix.avx }}-${{ github.sha }}
388
+ key : ${{ runner.os }}-${{ matrix.target }}-buildx-${{ matrix.tag }}-${{ github.sha }}
397
389
restore-keys : |
398
- ${{ runner.os }}-${{ matrix.target }}-buildx-${{ matrix.avx }}-
390
+ ${{ runner.os }}-${{ matrix.target }}-buildx-${{ matrix.tag }}-
399
391
- name : Push to Docker Hub
400
392
uses : docker/build-push-action@v2
401
393
with :
402
394
context : ./rust/cubestore/
403
395
file : ./rust/cubestore/Dockerfile
404
396
platforms : ${{ matrix.platforms }}
405
- build-args : |
406
- WITH_AVX2=${{ matrix.avx }}
397
+ build-args : ${{ matrix.build-args }}
407
398
push : true
408
399
tags : ${{ steps.prep.outputs.tags }}
409
400
cache-from : type=local,src=/tmp/.buildx-cache
0 commit comments