Skip to content

Commit 0f66d21

Browse files
committed
Add tools for our self-hosted m1 runner
1 parent c78f37f commit 0f66d21

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

.github/workflows/push.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,14 @@ jobs:
9898
uses: actions/checkout@v2
9999
- name: Install dependencies
100100
run: |
101+
source ci/osx_ci.sh
102+
arm64_set_path_and_python_version 3.9.7
101103
brew install autoconf automake libtool openssl pkg-config
102104
make --file ci/makefiles/osx.mk
103105
- name: Build multi-arch apk Python 3 (armeabi-v7a, arm64-v8a, x86_64, x86)
104106
run: |
107+
source ci/osx_ci.sh
108+
arm64_set_path_and_python_version 3.9.7
105109
make testapps-with-numpy
106110
107111
ubuntu_build_aab:
@@ -155,10 +159,14 @@ jobs:
155159
uses: actions/checkout@v2
156160
- name: Install dependencies
157161
run: |
162+
source ci/osx_ci.sh
163+
arm64_set_path_and_python_version 3.9.7
158164
brew install autoconf automake libtool openssl pkg-config
159165
make --file ci/makefiles/osx.mk
160166
- name: Build multi-arch apk Python 3 (armeabi-v7a, arm64-v8a, x86_64, x86)
161167
run: |
168+
source ci/osx_ci.sh
169+
arm64_set_path_and_python_version 3.9.7
162170
make testapps-with-numpy-aab
163171
164172
ubuntu_rebuild_updated_recipes:
@@ -209,10 +217,14 @@ jobs:
209217
uses: actions/checkout@v2
210218
- name: Install dependencies
211219
run: |
220+
source ci/osx_ci.sh
221+
arm64_set_path_and_python_version 3.9.7
212222
brew install autoconf automake libtool openssl pkg-config
213223
make --file ci/makefiles/osx.mk
214224
- name: Build multi-arch apk Python 3 (armeabi-v7a, arm64-v8a, x86_64, x86)
215225
run: |
226+
source ci/osx_ci.sh
227+
arm64_set_path_and_python_version 3.9.7
216228
make rebuild_updated_recipes
217229
218230
coveralls_finish:

ci/osx_ci.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
set -e -x
3+
4+
arm64_set_path_and_python_version(){
5+
python_version="$1"
6+
if [[ $(/usr/bin/arch) = arm64 ]]; then
7+
export PATH=/opt/homebrew/bin:$PATH
8+
eval "$(pyenv init --path)"
9+
pyenv install $python_version -s
10+
pyenv global $python_version
11+
export PATH=$(pyenv prefix)/bin:$PATH
12+
fi
13+
}

0 commit comments

Comments
 (0)