Skip to content

Commit

Permalink
wip(ci): test
Browse files Browse the repository at this point in the history
  • Loading branch information
YOU54F committed Feb 7, 2024
1 parent 901386e commit e648d8e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ jobs:
if: runner.os == 'Linux'
uses: docker/setup-buildx-action@v3

- if: runner.os == 'Linux'
name: prebuild linux arm64
run: docker run -v $PWD:/home --platform linux/arm64 --rm node:20 bin/bash -c 'cd /home && /home/script/ci/prebuild.sh'
# - if: runner.os == 'Linux'
# name: prebuild linux arm64
# run: docker run -v $PWD:/home --platform linux/arm64 --rm node:20 bin/bash -c 'cd /home && /home/script/ci/prebuild.sh'
- if: runner.os == 'Linux'
name: prebuild linux amd64 musl
run: docker run -v $PWD:/home --platform linux/amd64 --rm node:20-alpine bin/bash -c 'apk add bash curl python3 make g++ && cd /home && /home/script/ci/prebuild.sh && npm run build && npm test'
run: docker run -v $PWD:/home --platform linux/amd64 --rm node:20-alpine bin/bash -c 'cd /home && /home/script/ci/prebuild-alpine.sh && npm run build && npm test'
- if: runner.os == 'Linux'
name: prebuild linux arm64 musl
run: docker run -v $PWD:/home --platform linux/arm64 --rm node:20-alpine bin/bash -c 'apk add bash curl python3 make g++ && cd /home && /home/script/ci/prebuild.sh && npm run build && npm test'
run: docker run -v $PWD:/home --platform linux/arm64 --rm node:20-alpine bin/bash -c 'cd /home && /home/script/ci/prebuild-alpine.sh && npm run build && npm test'

- run: ./script/ci/prebuild.sh
- name: Upload prebuild for ${{ runner.os }}-${{ runner.arch }}
Expand Down
5 changes: 2 additions & 3 deletions script/ci/prebuild-alpine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ node --version
npm --version
PREBUILDIFY_VERSION=5.0.1

cd /home

. "${SCRIPT_DIR}/../lib/export-binary-versions.sh"
"${SCRIPT_DIR}/../lib/download-ffi.sh"
rm -rf build node_modules
apk add bash curl python3 make g++
npm ci --ignore-scripts
npx --yes prebuildify@${PREBUILDIFY_VERSION} --napi --libc musl --tag-libc
ls prebuilds/**/*
rm -rf ffi build
rm -rf build node_modules
8 changes: 1 addition & 7 deletions script/ci/prebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,7 @@ PREBUILDIFY_VERSION=5.0.1
./script/download-libs.sh
npm ci --ignore-scripts

IS_ALPINE=$(cat /etc/os-release | grep -i 'alpine')

if [[ $OS == 'linux' && $IS_ALPINE ]]; then
npx --yes prebuildify@${PREBUILDIFY_VERSION} --napi --libc musl --tag-libc
else
npx --yes prebuildify@${PREBUILDIFY_VERSION} --napi
fi
npx --yes prebuildify@${PREBUILDIFY_VERSION} --napi

ls prebuilds/**/*
case $OS in
Expand Down

0 comments on commit e648d8e

Please sign in to comment.