Skip to content

Commit 68b546e

Browse files
Run pipeline on all platforms
Signed-off-by: Jean-Christophe Morin <[email protected]>
1 parent ec7959a commit 68b546e

File tree

1 file changed

+52
-8
lines changed

1 file changed

+52
-8
lines changed

.github/workflows/wheel.yaml

Lines changed: 52 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,19 @@ jobs:
4848
wheel:
4949
name: Build wheel
5050
needs: ["launchers"]
51-
runs-on: "windows-latest"
51+
52+
runs-on: ${{ matrix.os }}
53+
54+
strategy:
55+
fail-fast: false
56+
matrix:
57+
os: [ubuntu-latest, windows-latest]
5258

5359
steps:
5460
- uses: actions/checkout@v4
5561

5662
- uses: actions/download-artifact@v3
63+
if: ${{ matrix.os == 'windows-latest' }}
5764
with:
5865
name: launchers
5966
path: launcher
@@ -67,24 +74,61 @@ jobs:
6774
run: |
6875
set -ex
6976
python -m pip install build
70-
python -m build -w .
77+
python -m build -w . --outdir ./dist
78+
79+
- uses: actions/upload-artifact@v3
80+
with:
81+
path: dist
82+
name: wheels
83+
84+
test:
85+
name: Test wheels
86+
needs: ["wheel"]
87+
88+
runs-on: ${{ matrix.os }}
89+
90+
strategy:
91+
fail-fast: false
92+
matrix:
93+
os: [macos-latest, ubuntu-latest, windows-latest]
94+
95+
env:
96+
CURRENT_PLATFORM: ${{ matrix.os }}
97+
98+
steps:
99+
- uses: actions/setup-python@v4
100+
with:
101+
python-version: 3.11
102+
103+
- uses: actions/download-artifact@v3
104+
with:
105+
name: wheels
106+
path: wheels
71107

72108
- name: Install wheel
73109
shell: bash
74110
run: |
75111
set -ex
76112
python -m venv .venv
77-
.venv/Scripts/python.exe -m pip install dist/*
78-
ls -la .venv/Scripts/
79-
ls -la .venv/Scripts/rez
113+
if [[ "${CURRENT_PLATFORM}" == "windows-latest" ]]; then
114+
.venv/Scripts/python.exe -m pip install rez --find-links ./wheels --no-index
115+
ls -la .venv/Scripts/
116+
ls -la .venv/Scripts/rez
117+
else
118+
.venv/bin/python -m pip install rez --find-links ./wheels --no-index
119+
ls -la .venv/bin/
120+
ls -la .venv/bin/rez
121+
fi
80122
81123
- name: Test commands
82124
shell: bash
83125
run: |
84-
export PATH=$(pwd)/.venv/Scripts/rez:$PATH
85126
set -ex
86-
cat .venv/Scripts/rez/rez-script.py
87-
cat .venv/Scripts/rez/jctest-script.py
127+
if [[ "${CURRENT_PLATFORM}" == "windows-latest" ]]; then
128+
export PATH=$(pwd)/.venv/Scripts/rez:$PATH
129+
else
130+
export PATH=$(pwd)/.venv/bin/rez:$PATH
131+
fi
88132
89133
echo 'Running jctest with REZ_LAUNCHER_DEBUG=1'
90134
export REZ_LAUNCHER_DEBUG=1

0 commit comments

Comments
 (0)