Skip to content

Commit

Permalink
Build node on debian bookworm
Browse files Browse the repository at this point in the history
Fixes #423
  • Loading branch information
julianhille committed Oct 9, 2024
1 parent 4e6a4d8 commit 7e86d3c
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 11 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
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: '3.8'

services:
gcc-13-bookworm:
image: gcc:13-bookworm
container_name: gcc-13-bookworm
command: ["sleep", "infinity"]
volumes:
- .:/workspace
working_dir: /workspace
environment:
- CXX=g++-13

0 comments on commit 7e86d3c

Please sign in to comment.