Skip to content
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
35 changes: 24 additions & 11 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,38 @@ on:
push:
branches:
- master
pull_request:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: MatteoH2O1999/setup-python@v1
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
python-version: "2.7.x"
- run: sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
- run: sudo apt-get update
- run: sudo apt-get install libxtst-dev libpng++-dev gcc-11 g++-11 -y
- run: sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 70 --slave /usr/bin/g++ g++ /usr/bin/g++-11
- run: npm install --loglevel verbose
node-version: 24
cache: npm
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: sudo apt-get update && sudo apt-get install gcc-12 g++-12 libxtst-dev libpng++-dev -y
- run: npm ci --loglevel verbose
- run: npm run clean-prebuilds
- run: npm run prebuild
env:
CC: gcc-12
CXX: g++-12
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- name: upload binaries
uses: actions/github-script@v6
- run: npm run verify-prebuilds
- name: retain pull request binaries
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v4
with:
name: prebuilds-linux-${{ github.sha }}
path: prebuilds
- name: upload release binaries
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: actions/github-script@v7
with:
script: |
const zip = require('cross-zip')
Expand Down
34 changes: 25 additions & 9 deletions .github/workflows/build-mac.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,50 @@
name: build-mac

on:
on:
push:
branches:
- master
pull_request:

jobs:
build:
runs-on: macos-11
runs-on: macos-14
steps:
- uses: actions/checkout@v3
- run: npm --version
- run: npm install --loglevel verbose
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: npm ci --loglevel verbose
- run: npm run clean-prebuilds
- run: npm run prebuild -- --arch x64
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- run: npm run prebuild -- --arch arm64
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- name: upload binaries
uses: actions/github-script@v6
- run: npm run verify-prebuilds -- x64 arm64
- name: retain pull request binaries
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v4
with:
name: prebuilds-mac-${{ github.sha }}
path: prebuilds
- name: upload release binaries
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: actions/github-script@v7
with:
script: |
const zip = require('cross-zip')

const script = require('./scripts/upload-binaries.js');

await script({
github,
context,
core,
zip
});
});
31 changes: 21 additions & 10 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,35 @@ on:
push:
branches:
- master
pull_request:

jobs:
build:
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
# - run: choco upgrade nodejs.install
# - run: choco install nodejs --version 20.0.0
- run: choco upgrade chocolatey --version 1.4.0 --allow-downgrade
- name: install visualstudio tools
run: choco install python visualstudio2022-workload-vctools -y
continue-on-error: true
- run: npm install
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: npm ci
- run: npm run clean-prebuilds
- run: npm run prebuild
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- name: upload binaries
uses: actions/github-script@v6
- run: npm run verify-prebuilds
- name: retain pull request binaries
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v4
with:
name: prebuilds-windows-${{ github.sha }}
path: prebuilds
- name: upload release binaries
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: actions/github-script@v7
with:
script: |
const zip = require('cross-zip')
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Please ensure you have the required dependencies before installing:
- Mac
- Xcode Command Line Tools.
- Linux
- Python (v2.7 recommended, v3.x.x is not supported).
- Python 3.
- make.
- A C/C++ compiler like GCC.
- libxtst-dev and libpng++-dev (`sudo apt-get install libxtst-dev libpng++-dev`).
Expand Down
5 changes: 4 additions & 1 deletion binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'target_name': 'robotjs',
'include_dirs': [
"<!(node -p \"require('node-addon-api').include_dir\")",
"<!(node -e \"require('@todesktop/nan')\")",
"<!(node -e \"require('nan')\")",
],
'cflags_cc': [
'-std=c++20',
Expand Down Expand Up @@ -42,6 +42,9 @@
}],

['OS == "linux"', {
'cflags_cc': [
'-UV8_DEPRECATION_WARNINGS'
],
'link_settings': {
'libraries': [
'-lpng',
Expand Down
Loading
Loading