Skip to content
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

ci: prebuildify for linux-arm64 #16

Merged
merged 2 commits into from
Jul 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 29 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ jobs:
- os: ubuntu-20.04
arch: x64
build-group: linux-x64
- os: ubuntu-20.04
arch: x64
build-group: linux-arm64
- os: macos-11
arch: x64
build-group: darwin-universal
Expand All @@ -33,39 +36,55 @@ jobs:
env:
BUILD_GROUP: ${{ matrix.build-group }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
architecture: ${{ matrix.arch }}
- name: Install linux dependencies
if: startsWith(matrix.os, 'ubuntu')
- name: Prebuildify for linux-arm64
if: ${{ matrix.build-group == 'linux-arm64' }}
uses: pguyot/arm-runner-action@v2
with:
base_image: raspios_lite_arm64:latest
image_additional_mb: 5000
copy_artifact_path: prebuilds
commands: |
curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
apt-get -y install nodejs libxtst-dev libpng++-dev
npm ci
npm run prebuild-$BUILD_GROUP
- name: Install linux x64 dependencies
if: ${{ matrix.build-group == 'linux-x64' }}
run: sudo apt-get install libxtst-dev libpng++-dev
- run: npm install
- run: npm ci
if: ${{ matrix.build-group != 'linux-arm64' }}
- name: Prebuildify
if: ${{ matrix.build-group != 'linux-arm64' }}
run: npm run prebuild-$BUILD_GROUP
shell: bash
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: prebuilds
path: prebuilds/
if-no-files-found: error
publish:
name: Publish to npm
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
runs-on: ubuntu-20.04
needs: build
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: prebuilds
path: prebuilds
- uses: phips28/gh-action-bump-version@608cab1205a5560a93eb66b4a64e4acf2119597b
- uses: phips28/gh-action-bump-version@95099cd5edcdae43499bc94202b9d907e739e9c8
with:
tag-prefix: 'v'
version-type: 'patch'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-node@v2
- uses: actions/setup-node@v3
with:
node-version: '16'
registry-url: 'https://registry.npmjs.org'
Expand Down
45 changes: 24 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"prebuild": "prebuildify -t 16.0.0 --napi --strip",
"prebuild-darwin-universal": "prebuildify -t 16.0.0 --napi --strip --arch x64+arm64",
"prebuild-linux-x64": "prebuildify -t 16.0.0 --napi --strip",
"prebuild-linux-arm64": "prebuildify -t 16.0.0 --napi --strip",
"prebuild-win32-x86": "prebuildify -t 16.0.0 --napi --strip",
"prebuild-win32-x64": "prebuildify -t 16.0.0 --napi --strip"
},
Expand Down