arm64-linux binaries are now available for all releases (#1369)
This commit is contained in:
@@ -213,48 +213,17 @@ jobs:
|
||||
executor: linux_arm64
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: check if emscripten-releases-tags.json has changed
|
||||
command: |
|
||||
CHANGED_FILES=$(git diff --name-only <<pipeline.git.base_revision>>..<<pipeline.git.revision>>)
|
||||
if [[ ! $CHANGED_FILES =~ "emscripten-releases-tags.json" ]]; then
|
||||
echo "emscripten-releases-tags.json has not changed, skipping build and publish"
|
||||
circleci-agent step halt
|
||||
fi
|
||||
- run:
|
||||
name: extract latest emscripten arm64 linux version
|
||||
command: |
|
||||
ARM64_VERSION=$(grep -oP '(?<="latest-arm64-linux": ")[^"]*' emscripten-releases-tags.json)
|
||||
ARM64_IMAGE_TAG=${ARM64_VERSION}-arm64
|
||||
echo "export ARM64_VERSION=$ARM64_VERSION" >> $BASH_ENV
|
||||
echo "export ARM64_IMAGE_TAG=$ARM64_IMAGE_TAG" >> $BASH_ENV
|
||||
echo "ARM64_VERSION=$ARM64_VERSION"
|
||||
echo "ARM64_IMAGE_TAG=$ARM64_IMAGE_TAG"
|
||||
- run:
|
||||
name: check if docker image already exists
|
||||
command: |
|
||||
if [ -z "$ARM64_VERSION" ]; then
|
||||
echo "ARM64_VERSION is empty, skipping publish"
|
||||
circleci-agent step halt
|
||||
exit 0
|
||||
fi
|
||||
DOCKER_IMAGE_EXISTS=$(curl -s -o /dev/null -w "%{http_code}" https://hub.docker.com/v2/repositories/emscripten/emsdk/tags/$ARM64_IMAGE_TAG)
|
||||
if [ "$DOCKER_IMAGE_EXISTS" = "200" ]; then
|
||||
echo "Docker image: $ARM64_VERSION"
|
||||
echo "Docker image already exists, skipping build and publish"
|
||||
circleci-agent step halt
|
||||
fi
|
||||
- run:
|
||||
name: build
|
||||
command: make -C ./docker version=${ARM64_VERSION} build
|
||||
command: make -C ./docker version=${CIRCLE_TAG} build
|
||||
- run:
|
||||
name: test
|
||||
command: make -C ./docker version=${ARM64_VERSION} test
|
||||
command: make -C ./docker version=${CIRCLE_TAG} test
|
||||
- run:
|
||||
name: push image
|
||||
command: |
|
||||
docker login -u "$DOCKER_USER" -p "$DOCKER_PASS"
|
||||
make -C ./docker version=${ARM64_VERSION} alias=${ARM64_IMAGE_TAG} only_alias=true push
|
||||
make -C ./docker version=${CIRCLE_TAG} alias=${CIRCLE_TAG}-arm64 only_alias=true push
|
||||
|
||||
test-bazel-linux:
|
||||
executor: bionic
|
||||
@@ -341,7 +310,9 @@ workflows:
|
||||
- publish-docker-image-arm64:
|
||||
filters:
|
||||
branches:
|
||||
only: main
|
||||
ignore: /.*/
|
||||
tags:
|
||||
only: /.*/
|
||||
test-bazel-linux:
|
||||
jobs:
|
||||
- test-bazel-linux
|
||||
|
||||
Reference in New Issue
Block a user