diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index ac18083..012b927 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -9,6 +9,7 @@ on: jobs: update: strategy: + fail-fast: false matrix: arch: [amd64, arm64] include: @@ -19,6 +20,17 @@ jobs: runs-on: ${{ matrix.os }} steps: + - name: Free Disk Space + uses: jlumbroso/free-disk-space@main + with: + tool-cache: true + android: true + dotnet: true + haskell: true + large-packages: true + docker-images: true + swap-storage: true + - uses: actions/checkout@v6 - name: Read version from version.txt @@ -52,8 +64,11 @@ jobs: export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" mkdir -p "$CCACHE_DIR" + export DEBUG=1 + export ASAN=1 bash scripts/build.sh + # TODO: Implement debug and release - name: Create archive run: | cd node/out/Release diff --git a/.github/workflows/macos-build.yml b/.github/workflows/macos-build.yml index 16bcabc..d6ae0ea 100644 --- a/.github/workflows/macos-build.yml +++ b/.github/workflows/macos-build.yml @@ -9,6 +9,7 @@ on: jobs: update: strategy: + fail-fast: false matrix: arch: [amd64, arm64] include: diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 9630050..b4535cd 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -10,6 +10,7 @@ jobs: update: name: Windows strategy: + fail-fast: false matrix: arch: [amd64, arm64] include: diff --git a/scripts/build.sh b/scripts/build.sh index a6d0c38..f01a5e6 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,10 +1,12 @@ #!/bin/bash set -e +# Version if [ -z "$NODE_VERSION" ]; then NODE_VERSION=$(head -n 1 version.txt | tr -d '\r\n') fi +# Operative System if [ -z "$OS" ]; then if [ "$(uname)" = "Darwin" ]; then OS="mac" @@ -12,22 +14,39 @@ if [ -z "$OS" ]; then OS="linux" fi fi + +# Architecture if [ "$ARCH" = "amd64" ]; then NODE_ARCH="x64" else NODE_ARCH="arm64" fi +# Cores if [ "$(uname)" = "Darwin" ]; then CORES=$(sysctl -n hw.ncpu) else CORES=$(nproc) fi +# Debug +if [ "${DEBUG+x}" ]; then + BUILD_DEBUG=--debug +else + BUILD_DEBUG= +fi + +# Address Sanitizer +if [ "${ASAN+x}" ]; then + BUILD_ASAN=--enable-asan +else + BUILD_ASAN= +fi + if [ ! -d "node" ]; then git clone https://github.com/nodejs/node --branch "$NODE_VERSION" --depth=1 fi cd node -./configure --shared --dest-cpu "$NODE_ARCH" --dest-os "$OS" +./configure --shared --dest-cpu "$NODE_ARCH" --dest-os "$OS" $BUILD_DEBUG $BUILD_ASAN make -j$CORES