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

switch to native linux arm64 GH actions runner #23

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
49 changes: 18 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-20.04
- os: ubuntu-22.04
arch: x64
build-group: linux-x64
- os: ubuntu-20.04
arch: x64
- os: ubuntu-22.04-arm
arch: arm64
build-group: linux-arm64
- os: macos-11
- os: macos-13
arch: x64
build-group: darwin-universal
- os: windows-2019
Expand All @@ -36,57 +36,44 @@ jobs:
env:
BUILD_GROUP: ${{ matrix.build-group }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '20'
architecture: ${{ matrix.arch }}
- 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' }}
- name: Install linux dependencies
if: ${{ (matrix.build-group == 'linux-x64') || (matrix.build-group == 'linux-arm64') }}
run: sudo apt-get install libxtst-dev libpng++-dev
- 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@v3
- uses: actions/upload-artifact@v4
with:
name: prebuilds
name: prebuilds-${{ matrix.build-group }}
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
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: prebuilds
pattern: prebuilds-*
path: prebuilds
merge-multiple: true
- uses: phips28/gh-action-bump-version@95099cd5edcdae43499bc94202b9d907e739e9c8
with:
tag-prefix: 'v'
version-type: 'patch'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- run: npm publish --access public
env:
Expand Down
3 changes: 3 additions & 0 deletions binding.gyp
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
'variables': {
'openssl_fips': ''
},
'targets': [{
'target_name': 'robotjs',
'cflags!': [ '-fno-exceptions' ],
Expand Down
80 changes: 27 additions & 53 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@
},
"homepage": "https://github.com/jitsi/robotjs",
"dependencies": {
"node-addon-api": "^4.2.0",
"node-gyp-build": "^4.3.0"
"node-addon-api": "^8.3.0",
"node-gyp-build": "^4.8.4"
},
"devDependencies": {
"jasmine": "^2.99.0",
"prebuildify": "^5.0.0",
"prebuildify": "^6.0.1",
"run-script-os": "^1.0.3",
"tape": "^4.8.0",
"targetpractice": "0.0.7"
Expand Down