Skip to content

Commit 729e0d2

Browse files
committedJun 19, 2024
ci: use node arch for npm_config_arch values
1 parent b3b7895 commit 729e0d2

File tree

2 files changed

+7
-16
lines changed

2 files changed

+7
-16
lines changed
 

‎.github/workflows/CI.yml

+7-15
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ jobs:
2222
- x64
2323
cpp_arch:
2424
- x64
25-
arch:
26-
- x64
2725
docker:
2826
- ""
2927
docker_cmd:
@@ -32,8 +30,7 @@ jobs:
3230
include:
3331
- os: windows-2022
3432
node_version: 18
35-
node_arch: x86
36-
arch: x86
33+
node_arch: ia32
3734
cpp_arch: amd64_x86
3835

3936
# - os: windows-2022
@@ -45,13 +42,11 @@ jobs:
4542
- os: macos-13
4643
node_version: 18
4744
node_arch: x64
48-
arch: x86_64
4945
cpp_arch: x64
5046

5147
- os: macos-14
5248
node_version: 18
5349
node_arch: arm64
54-
arch: arm64
5550
cpp_arch: amd64_arm64
5651

5752
# Alpine
@@ -63,14 +58,13 @@ jobs:
6358
build.prebuild
6459
node_version: 18
6560
node_arch: x64
66-
arch: x64
6761
cpp_arch: x64
6862

6963
env:
7064
npm_config_zmq_draft: false
7165
npm_config_zmq_shared: false
72-
npm_config_arch: ${{ matrix.arch }}
73-
npm_config_target_arch: ${{ matrix.arch }}
66+
npm_config_arch: ${{ matrix.node_arch }}
67+
npm_config_target_arch: ${{ matrix.node_arch }}
7468
steps:
7569
- uses: actions/checkout@v4
7670

@@ -81,9 +75,8 @@ jobs:
8175
./node_modules/
8276
./build/
8377
key:
84-
"cache-OS:${{ matrix.os }}-arch:${{ matrix.node_arch
85-
}}-ZMQ_DRAFT:${{ env.npm_config_zmq_draft }}-Node:${{
86-
matrix.node_version }}-${{ hashFiles('./package.json') }}"
78+
# prettier-ignore
79+
"cache-OS:${{ matrix.os }}-arch:${{ matrix.node_arch}}-ZMQ_DRAFT:${{env.npm_config_zmq_draft }}-Node:${{ matrix.node_version}}-${{hashFiles('./package.json') }}"
8780
restore-keys: |
8881
"cache-OS:${{ matrix.os }}-arch:${{ matrix.node_arch }}-ZMQ_DRAFT:${{ env.npm_config_zmq_draft }}-Node:${{ matrix.node_version }}-"
8982
@@ -109,18 +102,17 @@ jobs:
109102
architecture: ${{ matrix.node_arch }}
110103

111104
- name: Install Mac-OS x86_64 Dependencies
112-
if: ${{ contains(matrix.os, 'macos') && matrix.arch == 'x86_64' }}
105+
if: ${{ contains(matrix.os, 'macos') && matrix.node_arch == 'x64' }}
113106
run: |
114107
brew install libsodium gnutls
115108
116109
- name: Install Mac-OS arm64 Dependencies
117-
if: ${{ contains(matrix.os, 'macos') && matrix.arch == 'arm64' }}
110+
if: ${{ contains(matrix.os, 'macos') && matrix.node_arch == 'arm64' }}
118111
run: |
119112
brew uninstall libsodium --force --ignore-dependencies
120113
source ./script/macos-arm-deps.sh
121114
echo "PATH=$PATH" >> $GITHUB_ENV
122115
echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> $GITHUB_ENV
123-
echo "npm_config_target_arch=$npm_config_target_arch" >> $GITHUB_ENV
124116
125117
- name: Install Dependencies and Build
126118
if: ${{ !matrix.docker }}

‎script/macos-arm-deps.sh

-1
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,3 @@ export PATH="$HOME/arm-target/lib/:$PATH"
4444
SODIUM_PATH=$(~/arm-target/bin/pkg-config libsodium --libs-only-L | sed -e 's/-L//g') # print only -L and replace "-L" itself
4545
export PATH="$SODIUM_PATH:$PATH"
4646
export PKG_CONFIG_PATH="$SODIUM_PATH:$PKG_CONFIG_PATH"
47-
export npm_config_target_arch=arm64

0 commit comments

Comments
 (0)
Please sign in to comment.