Skip to content

Commit 6112409

Browse files
committed
Run pip under correct arch in macOS CI
1 parent bd1f04d commit 6112409

File tree

1 file changed

+28
-3
lines changed

1 file changed

+28
-3
lines changed

.github/workflows/system.yml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,29 @@ jobs:
1515
matrix:
1616
os:
1717
- ubuntu-latest
18-
- macos-latest
1918
- windows-latest
2019
architecture: [x64]
2120
python-version: ['3.x']
2221
julia-version:
2322
- '1'
2423
- 'nightly'
2524
include:
25+
- os: macos-latest
26+
architecture: arm64
27+
python-version: '3.x'
28+
julia-version: '1'
29+
- os: macos-latest
30+
architecture: arm64
31+
python-version: '3.x'
32+
julia-version: 'nightly'
33+
- os: macos-latest
34+
architecture: x64 # agent is arm64 (runs under Rosetta)
35+
python-version: '3.x'
36+
julia-version: '1'
37+
- os: macos-latest
38+
architecture: x64 # agent is arm64 (runs under Rosetta)
39+
python-version: '3.x'
40+
julia-version: 'nightly'
2641
# 32 bit Windows:
2742
- os: windows-latest
2843
architecture: x86
@@ -53,8 +68,18 @@ jobs:
5368
with:
5469
python-version: ${{ matrix.python-version }}
5570
architecture: ${{ matrix.architecture }}
56-
- run: python -m pip install --user numpy
57-
- run: python -m pip install virtualenv
71+
- name: Install numpy
72+
run: python -m pip install --user numpy
73+
if: ${{ !(matrix.os == 'macos-latest' && matrix.architecture == 'x64') }}
74+
- name: Install numpy (Rosetta)
75+
run: arch -x86_64 python -m pip install --user numpy
76+
if: ${{ matrix.os == 'macos-latest' && matrix.architecture == 'x64' }}
77+
- name: Install virtualenv
78+
run: python -m pip install virtualenv
79+
if: ${{ !(matrix.os == 'macos-latest' && matrix.architecture == 'x64') }}
80+
- name: Install virtualenv (Rosetta)
81+
run: arch -x86_64 python -m pip install virtualenv
82+
if: ${{ matrix.os == 'macos-latest' && matrix.architecture == 'x64' }}
5883
- run: virtualenv --version
5984
- name: Setup julia
6085
uses: julia-actions/setup-julia@v1

0 commit comments

Comments
 (0)