Skip to content

Commit

Permalink
fix: use process.arch to determine default target arch (#85)
Browse files Browse the repository at this point in the history
* fix: use process.arch to determine default target arch

* rm target_arch from build-and-release

---------

Co-authored-by: Filipe Freire <livrofubia@gmail.com>
  • Loading branch information
hexchain and filfreire authored Jan 23, 2025
1 parent 3efbd14 commit e1caf5f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/build-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ jobs:
GIT_COMMIT=${{ github.sha }} \
GIT_TAG=$GIT_TAG \
RUNNER_OS=${{ matrix.os }} \
TARGET_ARCH=${{ matrix.os=='ubuntu-22.04-arm' && 'arm64' || 'x64' }} \
./scripts/ci/build.sh
- name: Upload artifacts
if: always()
Expand Down Expand Up @@ -167,7 +166,6 @@ jobs:
pip install packaging
GIT_COMMIT=${{ github.sha }} \
GIT_TAG=$GIT_TAG \
TARGET_ARCH=${{ matrix.os=='ubuntu-22.04-arm' && 'arm64' || 'x64' }} \
./scripts/ci/build.sh
- name: Upload artifacts
if: always()
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/build-lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ jobs:
RUN_TESTS=false \
RUN_PREGYP_CLEAN=false \
PUBLISH_BINARY=false \
TARGET_ARCH=${{ matrix.os=='ubuntu-22.04-arm' && 'arm64' || 'x64' }} \
./scripts/ci/build.sh
- name: 'Run lint'
if: matrix.run-lint-and-tsc && steps.run_result.outputs.run_result != 'success'
Expand Down Expand Up @@ -209,7 +208,6 @@ jobs:
RUN_TESTS=true \
RUN_PREGYP_CLEAN=false \
PUBLISH_BINARY=false \
TARGET_ARCH=${{ matrix.os=='ubuntu-22.04-arm' && 'arm64' || 'x64' }} \
./scripts/ci/build.sh
- name: Upload artifacts
if: always() && steps.run_result.outputs.run_result != 'success'
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ LOGS_FOLDER=${BUILD_LOGS_FOLDER:-./logs}
mkdir -p $LOGS_FOLDER

# ia32, x64, armv7, etc
target_arch=${TARGET_ARCH:-"x64"}
target_arch=${TARGET_ARCH:-"$(node -e 'console.log(process.arch)')"}
# the build system of some dependencies (e.g. zstd and openldap) seems to read
# and use this variable, so unset it here to avoid making them fail
unset TARGET_ARCH
Expand Down

0 comments on commit e1caf5f

Please sign in to comment.