Skip to content

Commit

Permalink
Merge pull request #362 from julianhille/feature/361-add-newer-node-e…
Browse files Browse the repository at this point in the history
…lectron

Add newer node and electron versions
  • Loading branch information
julianhille authored Sep 8, 2024
2 parents bb5222f + 6a9d7aa commit 796669d
Show file tree
Hide file tree
Showing 31 changed files with 348 additions and 115 deletions.
268 changes: 234 additions & 34 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,13 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [17.6.0, 18.8.0, 19.0.0, 20.0.0, 21.0.0]
node: [17.6.0, 18.8.0, 19.0.0, 20.0.0, 21.0.0, 22.0.0]
include:
- architecture: arm64
architecture_node: x64
target_architecture: arm64
extra_compile_flags: -march=armv8-a
- python_version: 3
node: 17.6.0
- python_version: 3
node: 18.8.0
- python_version: 3
node: 19.0.0
- python_version: 3
node: 20.0.0
- python_version: 3
node: 21.0.0
runs-on: ubuntu-latest
container:
image: dockcross/linux-arm64-musl
Expand Down Expand Up @@ -86,18 +77,9 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [17.6.0, 18.8.0, 19.0.0, 20.0.0, 21.0.0]
node: [17.6.0, 18.8.0, 19.0.0, 20.0.0, 21.0.0, 22.0.0]
include:
- python_version: 3
node: 17.6.0
- python_version: 3
node: 18.8.0
- python_version: 3
node: 19.0.0
- python_version: 3
node: 20.0.0
- python_version: 3
node: 21.0.0
runs-on: ubuntu-latest
container:
image: node:${{ matrix.node }}-alpine
Expand Down Expand Up @@ -138,24 +120,185 @@ jobs:
architecture: [x64, ia32, arm64]
electron:
[
32.0.0,
31.0.0,
31.1.0,
31.2.0,
31.3.0,
31.4.0,
30.0.0,
30.1.0,
30.2.0,
30.3.0,
30.4.0,
29.0.0,
29.1.0,
29.2.0,
29.3.0,
29.4.0,
]
include:
- electron_mocha_version: ^13
python_version: "3.10"
- architecture: arm64
architecture_node: x64
target_architecture: arm64
extra_compile_flags: -arch arm64
- architecture: ia32
architecture_node: x86
target_architecture: ia32
- architecture: x64
architecture_node: x64
target_architecture: x64
- electron: 32.0.0
node: 20.16.0
- electron: 31.4.0
node: 20.16.0
- electron: 31.3.0
node: 20.16.0
- electron: 31.2.0
node: 20.16.0
- electron: 31.1.0
node: 20.16.0
- electron: 31.0.0
node: 20.16.0
- electron: 30.4.0
node: 20.15.1
- electron: 30.3.0
node: 20.15.1
- electron: 30.2.0
node: 20.15.1
- electron: 30.1.0
node: 20.15.1
- electron: 30.0.0
node: 20.15.1
- electron: 29.4.0
node: 20.9.0
- electron: 29.3.0
node: 20.9.0
- electron: 29.2.0
node: 20.9.0
- electron: 29.1.0
node: 20.9.0
- electron: 29.0.0
node: 20.9.0
exclude:
- os: macos-13
architecture: ia32
- os: ubuntu-20.04
architecture: arm64
- os: windows-2019
architecture: arm64
- os: ubuntu-20.04
architecture: ia32
runs-on: ${{ matrix.os }}
steps:
- name: Set up GCC
uses: egor-tensin/setup-gcc@v1
with:
version: 13
platform: ${{matrix.architecture}}
if: ${{ matrix.os == 'ubuntu-20.04' }}
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
architecture: ${{ matrix.architecture_node }}
- run: node --version
- run: npm --version
- name: Get npm cache directory
id: npm-cache-dir
shell: bash
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- uses: actions/cache@v4
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-electron-${{ matrix.target_architecture }}-${{ matrix.architecture }}-${{ matrix.electron }}-${{ hashFiles('**/package-lock.json') }}
- run: npm install --build-from-source
env:
npm_config_arch: ${{ matrix.architecture }}
npm_config_msbuild_path: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe'
npm_config_target_arch: ${{ matrix.target_architecture }}
npm_config_target: ${{ matrix.electron }}
npm_config_disturl: https://artifacts.electronjs.org/headers/dist
npm_config_runtime: electron
npm_config_python: python${{ matrix.python_version }}
CFLAGS: ${{ matrix.extra_compile_flags }}
CPPFLAGS: ${{ matrix.extra_compile_flags }}
- uses: Wandalen/wretry.action@v3
with:
command: npm install -g electron@${{ matrix.electron }} electron-mocha@${{ matrix.electron_mocha_version }}
attempt_limit: 3
attempt_delay: 10000
- name: Run test
uses: coactions/setup-xvfb@90473c3ebc69533a1a6e0505c36511b69c8c3135
with:
run: npm run test:electron
if: ${{ matrix.target_architecture != 'arm64' }}
- run: ./node_modules/.bin/node-pre-gyp package testpackage
env:
npm_config_runtime: electron
npm_config_target: ${{ matrix.electron }}
if: ${{ matrix.target_architecture != 'arm64' }}
- run: ./node_modules/.bin/node-pre-gyp package --target_arch=${{ matrix.target_architecture }}
if: ${{ matrix.target_architecture == 'arm64' }}
env:
npm_config_runtime: electron
npm_config_target: ${{ matrix.electron }}
- uses: actions/upload-artifact@v4
with:
path: build/stage/julianhille/MuhammaraJS/releases/download/**/*.gz
name: bindings-electron-${{ matrix.os }}-${{ matrix.target_architecture }}-${{matrix.electron}}
if-no-files-found: error
build-electron-outdated:
needs: [lint]
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, macos-13, windows-2019]
architecture: [x64, ia32, arm64]
electron:
[
28.0.0,
28.1.0,
28.2.0,
28.3.0,
27.0.0,
27.1.0,
27.2.0,
27.3.0,
26.0.0,
26.1.0,
26.2.0,
26.3.0,
26.4.0,
26.5.0,
26.6.0,
25.9.0,
25.8.0,
25.7.0,
25.6.0,
25.5.0,
25.4.0,
25.3.0,
25.2.0,
25.1.0,
25.0.0,
24.8.0,
24.7.0,
24.6.0,
24.5.0,
24.4.0,
24.3.0,
24.2.0,
24.1.0,
24.0.0,
23.3.0,
23.2.0,
23.1.0,
23.0.0,
]
include:
- electron_mocha_version: ^11
- electron_mocha_version: ^13
python_version: "3.10"
- architecture: arm64
architecture_node: x64
Expand All @@ -167,6 +310,48 @@ jobs:
- architecture: x64
architecture_node: x64
target_architecture: x64
- electron: 28.3.0
node: 18.18.2
- electron: 28.2.0
node: 18.18.2
- electron: 28.1.0
node: 18.18.2
- electron: 28.0.0
node: 18.18.2
- electron: 27.3.0
node: 18.17.1
- electron: 27.2.0
node: 18.17.1
- electron: 27.1.0
node: 18.17.1
- electron: 27.0.0
node: 18.17.1
- electron: 26.6.0
node: 18.16.0
- electron: 26.5.0
node: 18.16.0
- electron: 26.4.0
node: 18.16.0
- electron: 26.3.0
node: 18.16.0
- electron: 26.2.0
node: 18.16.0
- electron: 26.1.0
node: 18.16.0
- electron: 26.0.0
node: 18.16.0
- electron: 25.9.0
node: 18.15.0
- electron: 25.8.0
node: 18.15.0
- electron: 25.7.0
node: 18.15.0
- electron: 25.6.0
node: 18.15.0
- electron: 25.5.0
node: 18.15.0
- electron: 25.4.0
node: 18.15.0
- electron: 25.3.0
node: 18.15.0
- electron: 25.2.0
Expand All @@ -175,6 +360,10 @@ jobs:
node: 18.15.0
- electron: 25.0.0
node: 18.15.0
- electron: 24.8.0
node: 18.14.0
- electron: 24.7.0
node: 18.14.0
- electron: 24.6.0
node: 18.14.0
- electron: 24.5.0
Expand All @@ -189,14 +378,6 @@ jobs:
node: 18.14.0
- electron: 24.0.0
node: 18.14.0
- electron: 23.3.0
node: 18.12.1
- electron: 23.2.0
node: 18.12.1
- electron: 23.1.0
node: 18.12.1
- electron: 23.0.0
node: 18.12.1
exclude:
- os: macos-13
architecture: ia32
Expand All @@ -209,6 +390,12 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up GCC
uses: egor-tensin/setup-gcc@v1
with:
version: 13
platform: ${{matrix.architecture}}
if: ${{ matrix.os == 'ubuntu-20.04' }}
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}
Expand Down Expand Up @@ -294,6 +481,12 @@ jobs:
architecture: ia32
runs-on: ${{ matrix.os }}
steps:
- name: Set up GCC
uses: egor-tensin/setup-gcc@v1
if: ${{ matrix.os == 'ubuntu-20.04' }}
with:
version: 13
platform: ${{matrix.architecture}}
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -330,7 +523,14 @@ jobs:
name: bindings-electron-${{ matrix.os }}-${{ matrix.target_architecture }}-${{matrix.node}}
if-no-files-found: error
publish:
needs: [build-musl, build-musl-arm, build-electron, build-node]
needs:
[
build-musl,
build-musl-arm,
build-electron,
build-electron-outdated,
build-node,
]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Added

- Add electron 24.7 and 24.8
- Add electron 25.4, 25.5, 25.6, 25.7, 25.8 and 25.9
- Add electron 26.0, 26.1, 26.2, 26.3, 26.4, 26.5, 26.6
- Add electron 27.0, 27.1, 27.2 and 27.3
- Add electron 28.0, 28.1, 28.2 and 28.3
- Add electron 29.0, 29.1, 29.2, 29.3 and 29.4
- Add electron 30.0, 30.1, 30.2, 30.3 and 30.4
- Add electron 31.0, 31.1, 31.2, 31.3 and 31.4
- Add electron 32.0
- Add node v22.0.0

### Remove

- Outdated electron 23.x versions

## [4.1.0] - 2023-12-13

### Fixed
Expand Down
Loading

0 comments on commit 796669d

Please sign in to comment.