From 8c5d4b99f4a2626e75eb12d60b945dad9e09dd4b Mon Sep 17 00:00:00 2001 From: Michael Kriese Date: Fri, 1 Dec 2023 19:05:09 +0100 Subject: [PATCH] chore: cleanup --- .github/workflows/build.yml | 4 ++-- bin/build.sh | 11 +---------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b739b2f..6dfc88a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -56,12 +56,12 @@ jobs: with: node-version: ${{ env.NODE_VERSION }} - - name: Install arm64 dependencies + - name: Install dependencies for ${{ matrix.arch }} if: matrix.arch == 'aarch64' run: | sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu - - name: build for ${{ matrix.node-version }} ${{ matrix.arch }} + - name: Build for Node ${{ matrix.node-version }} run: ./bin/build.sh - name: Save artifacts diff --git a/bin/build.sh b/bin/build.sh index ab5d3c9..7f7dc4c 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -9,27 +9,19 @@ fi farch=x64 darch=linux/amd64 +# TODO: set mirror if [[ "$ARCH" = "aarch64" ]]; then farch=arm64 darch=linux/arm64 export CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ -# export DEVELOPMENT_SKIP_GETTING_ASSET=true fi -# echo "Prepare builder for ${ARCH}" -# docker build -t node-re2-builder --load --platform ${darch} . - mkdir .cache echo "Installing re2 v${VERSION} for Node v${NODE_VERSION} (${farch})" npm install "re2@${VERSION}" --save-exact --no-audit --no-fund --prefix .cache --no-progress --platform-arch=${farch} --arch=${farch} -# if [[ "$ARCH" = "aarch64" ]]; then - #echo "Rebuilding re2 v${VERSION} for Node v${NODE_VERSION} (${farch})" - #npm explore re2 --prefix .cache -- npm run rebuild --arch=${farch} -# fi - echo "Testing re2 v${VERSION} for Node v${NODE_VERSION} (${farch})" docker pull --platform ${darch} "node:${NODE_VERSION}" > /dev/null 2>&1 docker run --rm \ @@ -41,7 +33,6 @@ docker run --rm \ echo "Compressing re2 v${VERSION} for Node v${NODE_VERSION} (${farch})" mod=$(node -e 'console.log(process.versions.modules)') -#brotli -n -Z ".cache/linux-${farch}-${mod}" -o ".cache/linux-${farch}-${mod}.br" brotli -n -Z .cache/node_modules/re2/build/Release/re2.node -o ".cache/linux-${farch}-${mod}.br" ls -la .cache