Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
viceice committed Dec 1, 2023
1 parent f62b535 commit 8c5d4b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 1 addition & 10 deletions bin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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

0 comments on commit 8c5d4b9

Please sign in to comment.