-
-
Notifications
You must be signed in to change notification settings - Fork 817
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
automated arm/v7 and arm64 builds for alpine and linux built using docker buildx and github actions #1362
Closed
Closed
automated arm/v7 and arm64 builds for alpine and linux built using docker buildx and github actions #1362
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,57 @@ | ||
name: Build ARM bindings | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
nodeVersion: [10, 11, 12, 13, 14, 15, 16] | ||
platform: ["linux", "alpine"] | ||
arch: [linux/arm/v7, linux/arm64] | ||
include: | ||
- platform: "linux" | ||
variant: "stretch" | ||
- platform: "alpine" | ||
variant: "alpine" | ||
|
||
- arch: linux/arm/v7 | ||
archShort: armv7 | ||
- arch: linux/arm64 | ||
archShort: arm64 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup Docker Buildx | ||
uses: crazy-max/ghaction-docker-buildx@v1 | ||
with: | ||
buildx-version: latest | ||
qemu-version: latest | ||
- name: Build and Push | ||
run: | | ||
docker buildx build \ | ||
--file BinaryBuilder.Dockerfile \ | ||
--load \ | ||
--tag sqlite-builder \ | ||
--platform ${{ matrix.arch }} \ | ||
--no-cache \ | ||
--build-arg NODE_VERSION=${{ matrix.nodeVersion }} \ | ||
--build-arg VARIANT=${{ matrix.variant }} \ | ||
--build-arg AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }} \ | ||
--build-arg AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }} \ | ||
. | ||
CONTAINER_ID=$(docker create -it sqlite-builder) | ||
docker cp $CONTAINER_ID:/usr/src/build/build/ ./build | ||
|
||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: node${{ matrix.nodeVersion }}-${{ matrix.platform }}-${{ matrix.archShort }} | ||
path: "./build/" |
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,20 @@ | ||
ARG NODE_VERSION=12 | ||
ARG VARIANT=stretch | ||
FROM node:$NODE_VERSION-$VARIANT | ||
|
||
ARG VARIANT | ||
ARG AWS_ACCESS_KEY_ID=SKIP | ||
ARG AWS_SECRET_ACCESS_KEY=SKIP | ||
|
||
RUN if [ "$VARIANT" = "alpine" ] ; then apk add make g++ python ; fi | ||
|
||
WORKDIR /usr/src/build | ||
|
||
COPY . . | ||
RUN npm install --ignore-scripts | ||
RUN npx node-pre-gyp install --build-from-source | ||
RUN npm run test | ||
RUN npx node-pre-gyp package | ||
RUN if [ "$AWS_ACCESS_KEY_ID" = "SKIP" ] || [ "$AWS_SECRET_ACCESS_KEY" = "SKIP" ] ; then echo "SKIP S3 PUBLISH" ; else npx node-pre-gyp publish ; fi | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: I will change this if it eventually gets merged, we have a different mechanism to detect whether to publish or not. |
||
|
||
CMD ["sh"] |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: will change to every push.