Skip to content

Commit

Permalink
Make lunar lander fail in CI due to not installing swig (#366)
Browse files Browse the repository at this point in the history
## Description

<!-- Provide a brief description of the PR's purpose here. -->

The lunar lander tutorial and example were both working in the CI even
though we had not installed swig. It turns out that swig is installed in
the GitHub Actions container by default (see
actions/runner-images#1203), which means that
box2d could install properly without running `pip install swig`. This PR
removes swig during the installation for tutorials and examples, so that
the lunar lander tutorial will fail properly. The issue will be fixed in
a followup PR.

## TODO

<!-- Notable points that this PR has either accomplished or will
accomplish. -->

- [x] Remove swig in tutorial CI (tutorials will still work since the
lunar lander tutorial installs swig)
- [x] Remove swig in example CI

## Questions

<!-- Any concerns or points of confusion? -->

## Status

- [x] I have read the guidelines in

[CONTRIBUTING.md](https://github.com/icaros-usc/pyribs/blob/master/CONTRIBUTING.md)
- [x] I have formatted my code using `yapf`
- [x] I have tested my code by running `pytest`
- [x] I have linted my code with `pylint`
- [x] I have added a one-line description of my change to the changelog
in
      `HISTORY.md`
- [x] This PR is ready to go
  • Loading branch information
btjanaka committed Sep 10, 2023
1 parent 3387935 commit d818f43
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# SWIG should not be installed so that we can test that lunar lander is
# installing SWIG properly. See https://github.com/icaros-usc/pyribs/pull/366
- name: Remove swig
run: sudo rm -rf /usr/bin/swig
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
Expand All @@ -129,6 +133,10 @@ jobs:
steps:
# We use Python 3.10 instead of 3.8 here since Google Colab uses 3.10.
- uses: actions/checkout@v4
# SWIG should not be installed so that we can test that lunar lander is
# installing SWIG properly. See https://github.com/icaros-usc/pyribs/pull/366
- name: Remove swig
run: sudo rm -rf /usr/bin/swig
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
Expand Down
1 change: 1 addition & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

- Use dask instead of multiprocessing for lunar lander tutorial ({pr}`346`)
- pip install swig before gymnasium[box2d] in lunar lander tutorial ({pr}`346`)
- Fix lunar lander dependency issues ({pr}`366`)

#### Improvements

Expand Down

0 comments on commit d818f43

Please sign in to comment.