Skip to content

Commit

Permalink
ci: Test binary installation (shaka-project#200)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
joeyparrish authored Nov 10, 2024
1 parent 572826e commit d7b914d
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,22 +134,36 @@ jobs:
python3 -m pip install -r requirements.txt
python3 -m pip install -r optional_requirements.txt
- name: Download binaries
- name: Download and install binaries
run: |
# Fetch binaries locally instead of installing the release version of
# the binary package. This lets us test changes to the binary package
# before it is released.
# In case of network flake, try it three times. This is arbitrary.
python3 binaries/build_wheels.py || python3 binaries/build_wheels.py || python3 binaries/build_wheels.py
# Make sure the locally-created binary package for each platform can
# be locally installed, so we know they are correctly formatted/named.
# This also makes these binaries available for the test run.
if [[ '${{ runner.os }}' == 'Windows' ]]; then
echo "PYTHONPATH=$GITHUB_WORKSPACE\\binaries;$PYTHONPATH" >> $GITHUB_ENV
else
echo "PYTHONPATH=$GITHUB_WORKSPACE/binaries:$PYTHONPATH" >> $GITHUB_ENV
python3 -m pip install binaries/dist/shaka_streamer_binaries*win*amd64.whl
elif [[ '${{ runner.os }}' == 'Linux' ]]; then
if [[ '${{ matrix.target_arch }}' == 'x64' ]]; then
python3 -m pip install binaries/dist/shaka_streamer_binaries*linux*x86_64.whl
elif [[ '${{ matrix.target_arch }}' == 'arm64' ]]; then
python3 -m pip install binaries/dist/shaka_streamer_binaries*linux*aarch64.whl
fi
elif [[ '${{ runner.os }}' == 'macOS' ]]; then
if [[ '${{ matrix.target_arch }}' == 'x64' ]]; then
python3 -m pip install binaries/dist/shaka_streamer_binaries*mac*x86_64.whl
elif [[ '${{ matrix.target_arch }}' == 'arm64' ]]; then
python3 -m pip install binaries/dist/shaka_streamer_binaries*mac*arm64.whl
fi
fi
- name: Build docs (Linux only)
run: bash docs/build.sh
if: runner.os == 'Linux'
run: bash docs/build.sh

- name: Run tests
run: |
Expand Down

0 comments on commit d7b914d

Please sign in to comment.