From e648d8e7c327ddbc19afd8f576eb022bcb6f87b6 Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Wed, 7 Feb 2024 23:38:13 +0000 Subject: [PATCH] wip(ci): test --- .github/workflows/build-and-test.yml | 10 +++++----- script/ci/prebuild-alpine.sh | 5 ++--- script/ci/prebuild.sh | 8 +------- 3 files changed, 8 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index bc207e1a..da40e558 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -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 }} diff --git a/script/ci/prebuild-alpine.sh b/script/ci/prebuild-alpine.sh index 840c02cc..d428c708 100755 --- a/script/ci/prebuild-alpine.sh +++ b/script/ci/prebuild-alpine.sh @@ -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 \ No newline at end of file +rm -rf build node_modules \ No newline at end of file diff --git a/script/ci/prebuild.sh b/script/ci/prebuild.sh index c6a5be34..7b5f8bec 100755 --- a/script/ci/prebuild.sh +++ b/script/ci/prebuild.sh @@ -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