Skip to content

Commit d7b914d

Browse files
authoredNov 10, 2024
ci: Test binary installation (shaka-project#200)
Closes shaka-project#197 Could have prevented shaka-project#194 For a test run with macOS arm64 enabled, showing how this would have caught shaka-project#194, see https://github.com/joeyparrish/shaka-streamer/actions/runs/11762714145/job/32765885894 Once shaka-project/static-ffmpeg-binaries#51 is closed, and we have new builds in the binary package, we can re-enable macOS arm64 testing for shaka-project#179.
1 parent 572826e commit d7b914d

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed
 

‎.github/workflows/build-and-test.yaml

+19-5
Original file line numberDiff line numberDiff line change
@@ -134,22 +134,36 @@ jobs:
134134
python3 -m pip install -r requirements.txt
135135
python3 -m pip install -r optional_requirements.txt
136136
137-
- name: Download binaries
137+
- name: Download and install binaries
138138
run: |
139139
# Fetch binaries locally instead of installing the release version of
140140
# the binary package. This lets us test changes to the binary package
141141
# before it is released.
142142
# In case of network flake, try it three times. This is arbitrary.
143143
python3 binaries/build_wheels.py || python3 binaries/build_wheels.py || python3 binaries/build_wheels.py
144+
145+
# Make sure the locally-created binary package for each platform can
146+
# be locally installed, so we know they are correctly formatted/named.
147+
# This also makes these binaries available for the test run.
144148
if [[ '${{ runner.os }}' == 'Windows' ]]; then
145-
echo "PYTHONPATH=$GITHUB_WORKSPACE\\binaries;$PYTHONPATH" >> $GITHUB_ENV
146-
else
147-
echo "PYTHONPATH=$GITHUB_WORKSPACE/binaries:$PYTHONPATH" >> $GITHUB_ENV
149+
python3 -m pip install binaries/dist/shaka_streamer_binaries*win*amd64.whl
150+
elif [[ '${{ runner.os }}' == 'Linux' ]]; then
151+
if [[ '${{ matrix.target_arch }}' == 'x64' ]]; then
152+
python3 -m pip install binaries/dist/shaka_streamer_binaries*linux*x86_64.whl
153+
elif [[ '${{ matrix.target_arch }}' == 'arm64' ]]; then
154+
python3 -m pip install binaries/dist/shaka_streamer_binaries*linux*aarch64.whl
155+
fi
156+
elif [[ '${{ runner.os }}' == 'macOS' ]]; then
157+
if [[ '${{ matrix.target_arch }}' == 'x64' ]]; then
158+
python3 -m pip install binaries/dist/shaka_streamer_binaries*mac*x86_64.whl
159+
elif [[ '${{ matrix.target_arch }}' == 'arm64' ]]; then
160+
python3 -m pip install binaries/dist/shaka_streamer_binaries*mac*arm64.whl
161+
fi
148162
fi
149163
150164
- name: Build docs (Linux only)
151-
run: bash docs/build.sh
152165
if: runner.os == 'Linux'
166+
run: bash docs/build.sh
153167

154168
- name: Run tests
155169
run: |

0 commit comments

Comments
 (0)