Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: CI: migrate ARM64 builds from TravisCI to CircleCI
- Loading branch information
Showing
1 changed file
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
version: 2.1 | ||
|
||
workflows: | ||
build: | ||
jobs: | ||
- linux-arm64-glibc-node-12: | ||
filters: | ||
tags: | ||
only: /^v.*/ | ||
- linux-arm64-musl-node-12: | ||
filters: | ||
tags: | ||
only: /^v.*/ | ||
- linux-arm64-glibc-node-16: | ||
filters: | ||
tags: | ||
only: /^v.*/ | ||
- linux-arm64-musl-node-16: | ||
filters: | ||
tags: | ||
only: /^v.*/ | ||
|
||
jobs: | ||
linux-arm64-glibc-node-12: | ||
resource_class: arm.medium | ||
machine: | ||
image: ubuntu-2004:202101-01 | ||
steps: | ||
- checkout | ||
- run: | | ||
sudo docker run -dit --name sharp --volume "${PWD}:/mnt/sharp" --workdir /mnt/sharp arm64v8/debian:bullseye | ||
sudo docker exec sharp sh -c "apt-get update && apt-get install -y build-essential git python3 curl" | ||
sudo docker exec sharp sh -c "curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -" | ||
sudo docker exec sharp sh -c "echo 'deb https://deb.nodesource.com/node_12.x sid main' >/etc/apt/sources.list.d/nodesource.list" | ||
sudo docker exec sharp sh -c "apt-get update && apt-get install -y nodejs" | ||
- run: sudo docker exec sharp sh -c "npm install --build-from-source --unsafe-perm" | ||
- run: sudo docker exec sharp sh -c "npm test" | ||
- run: "[[ -n $CIRCLE_TAG ]] && sudo docker exec --env prebuild_upload sharp sh -c \"npx prebuild --runtime napi --target 5\" || true" | ||
linux-arm64-glibc-node-16: | ||
resource_class: arm.medium | ||
machine: | ||
image: ubuntu-2004:202101-01 | ||
steps: | ||
- checkout | ||
- run: | | ||
sudo chown 0.0 ${PWD} | ||
sudo docker run -dit --name sharp --volume "${PWD}:/mnt/sharp" --workdir /mnt/sharp arm64v8/debian:bullseye | ||
sudo docker exec sharp sh -c "apt-get update && apt-get install -y build-essential git python3 curl" | ||
sudo docker exec sharp sh -c "curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -" | ||
sudo docker exec sharp sh -c "echo 'deb https://deb.nodesource.com/node_16.x sid main' >/etc/apt/sources.list.d/nodesource.list" | ||
sudo docker exec sharp sh -c "apt-get update && apt-get install -y nodejs" | ||
- run: sudo docker exec sharp sh -c "npm install --build-from-source --unsafe-perm" | ||
- run: sudo docker exec sharp sh -c "npm test" | ||
linux-arm64-musl-node-12: | ||
resource_class: arm.medium | ||
machine: | ||
image: ubuntu-2004:202101-01 | ||
steps: | ||
- checkout | ||
- run: | | ||
sudo docker run -dit --name sharp --volume "${PWD}:/mnt/sharp" --workdir /mnt/sharp node:12-alpine3.11 | ||
sudo docker exec sharp sh -c "apk add build-base git python3 --update-cache" | ||
- run: sudo docker exec sharp sh -c "npm install --build-from-source --unsafe-perm" | ||
- run: sudo docker exec sharp sh -c "npm test" | ||
- run: "[[ -n $CIRCLE_TAG ]] && sudo docker exec --env prebuild_upload sharp sh -c \"npx prebuild --runtime napi --target 5\" || true" | ||
linux-arm64-musl-node-16: | ||
resource_class: arm.medium | ||
machine: | ||
image: ubuntu-2004:202101-01 | ||
steps: | ||
- checkout | ||
- run: | | ||
sudo chown 0.0 ${PWD} | ||
sudo docker run -dit --name sharp --volume "${PWD}:/mnt/sharp" --workdir /mnt/sharp node:16-alpine3.11 | ||
sudo docker exec sharp sh -c "apk add build-base git python3 --update-cache" | ||
- run: sudo docker exec sharp sh -c "npm install --build-from-source --unsafe-perm" | ||
- run: sudo docker exec sharp sh -c "npm test" |