Skip to content

Commit

Permalink
Build node on debian bookworm (#428)
Browse files Browse the repository at this point in the history
Update README and version 5 breaking changes

Fixes #423
  • Loading branch information
julianhille authored Oct 10, 2024
1 parent 4e6a4d8 commit 21058d5
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 14 deletions.
62 changes: 51 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -446,12 +446,62 @@ jobs:
path: build/stage/julianhille/MuhammaraJS/releases/download/**/*.gz
name: bindings-electron-${{ matrix.os }}-${{ matrix.target_architecture }}-${{matrix.electron}}
if-no-files-found: error
build-node-linux:
needs: [lint]
runs-on: ubuntu-20.04
container:
image: gcc:13-bookworm
credentials:
username: "${{ secrets.DOCKER_USERNAME }}"
password: "${{ secrets.DOCKER_PASSWORD }}"
strategy:
fail-fast: false
matrix:
node: [17.6.0, 18.8.0, 19.0.0, 20.0.0, 21.7.3, 22.9.0]
include:
- architecture: x64
python_version: "3.10"
architecture_node: x64
target_architecture: x64
steps:
- 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 }}-node-${{ matrix.architecture }}-${{ matrix.target_architecture }}-${{matrix.node}}-${{ hashFiles('**/package-lock.json') }}
- run: npm install --build-from-source
env:
npm_config_arch: ${{ matrix.architecture }}
npm_config_target_arch: ${{ matrix.target_architecture }}
npm_config_python: python${{ matrix.python_version }}
npm_config_msbuild_path: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe'
CFLAGS: ${{ matrix.extra_compile_flags }}
CPPFLAGS: ${{ matrix.extra_compile_flags }}
- run: ./node_modules/.bin/node-pre-gyp package testpackage
- uses: actions/upload-artifact@v4
with:
path: build/stage/julianhille/MuhammaraJS/releases/download/**/*.gz
name: bindings-electron-${{ matrix.os }}-${{ matrix.target_architecture }}-${{matrix.node}}
if-no-files-found: error
build-node:
needs: [lint]
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, macos-13, windows-2019]
os: [macos-13, windows-2019]
node: [17.6.0, 18.8.0, 19.0.0, 20.0.0, 21.7.3, 22.9.0]
architecture: [x64, ia32, arm64]
include:
Expand All @@ -468,22 +518,12 @@ jobs:
extra_compile_flags: -arch arm64
EXTRA_NODE_PRE_GYP_FLAGS: --target_arch=arm64
exclude:
- os: ubuntu-20.04
architecture: arm64
- os: windows-2019
architecture: arm64
- os: macos-13
architecture: ia32
- os: ubuntu-20.04
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

- Update PDRWriter to 4.6.7 (#410)

### Update

- Build linux on docker -> downgrade glibc for linux builds (#423)

## [5.0.1] - 2024-09-28

### Added
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@ This won't affect a lot of you but still.

### Version 5.x

- You may need to update your base linux distro where you use this as muhammara now needs GLIBCXX_3.4.31
Github removed ubuntu 18.04 runners and so we build on 20.04 now.
Ubuntu 20.04 comes with newer libstdc++6 and this brings newer glibc with it.
- ~You may need to update your base linux distro where you use this as muhammara now needs GLIBCXX_3.4.31
Github removed ubuntu 18.04 runners and so we build on 20.04 now.~
~Ubuntu 20.04 comes with newer libstdc++6 and this brings newer glibc with it.~
This has been tackled by building inside of docker using a gcc bookworm build.
That means it lowers the needed glibc version to GLIBCXX_3.4.30 and so official node:20 docker should work again.
- Node <= 16 pre-builts have been removed
- Electron <= 23 pre-builts have been removed
- GCC 13 needed / std ++ 20 (only needed if you compile yourself)
Expand Down

0 comments on commit 21058d5

Please sign in to comment.