File tree Expand file tree Collapse file tree 2 files changed +43
-2
lines changed Expand file tree Collapse file tree 2 files changed +43
-2
lines changed Original file line number Diff line number Diff line change @@ -106,11 +106,18 @@ jobs:
106
106
architecture : ${{ matrix.node_arch }}
107
107
cache : " pnpm"
108
108
109
- - name : Install Mac-OS Dependencies
110
- if : contains(matrix.os, 'macos')
109
+ - name : Install Mac-OS ${{ matrix.ARCH }} Dependencies
110
+ if : ${{ contains(matrix.os, 'macos') && matrix.ARCH == 'x86_64' }}
111
111
run : |
112
112
brew install libsodium gnutls
113
113
114
+ - name : Install Mac-OS ${{ matrix.ARCH }} Dependencies
115
+ if : ${{ contains(matrix.os, 'macos') && matrix.ARCH == 'arm64' }}
116
+ run : |
117
+ brew uninstall libsodium --force --ignore-dependencies
118
+ chmod +x ./script/macos-arm-deps.sh
119
+ ./script/macos-arm-deps.sh
120
+
114
121
- name : Install Dependencies and Build
115
122
if : ${{ !matrix.docker }}
116
123
run : pnpm install
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ set -e
3
+
4
+ #! Install arm-brew on x86 MacOS Arm
5
+ #! Based on https://github.com/Homebrew/discussions/discussions/2843#discussioncomment-2243610
6
+
7
+ bottle_tag=" arm64_big_sur" # Macos 11 is big sure
8
+ dependencies=" libsodium gnutls"
9
+
10
+ mkdir -p ~ /arm-target/bin
11
+ mkdir -p ~ /arm-target/brew-cache
12
+ export PATH=" $HOME /arm-target/bin:$PATH "
13
+
14
+ PREV_PWD=" $PWD "
15
+ cd ~ /arm-target
16
+
17
+ mkdir arm-homebrew
18
+ curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C arm-homebrew
19
+ ln -s ~ /arm-target/arm-homebrew/bin/brew ~ /arm-target/bin/arm-brew
20
+
21
+ export HOMEBREW_CACHE=~ /arm-target/brew-cache
22
+ export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
23
+
24
+ arm-brew fetch --deps --bottle-tag=$bottle_tag $dependencies |
25
+ grep -E " (Downloaded to:|Already downloaded:)" |
26
+ grep -v pkg-config |
27
+ awk ' { print $3 }' |
28
+ xargs -n 1 arm-brew install --ignore-dependencies --force-bottle
29
+
30
+ # Install host version of pkg-config so we can call it in the build system
31
+ arm-brew install pkg-config
32
+ ln -s ~ /arm-target/arm-homebrew/bin/pkg-config ~ /arm-target/bin/arm-pkg-config
33
+
34
+ cd " $PREV_PWD "
You can’t perform that action at this time.
0 commit comments