@@ -14,14 +14,31 @@ jobs:
1414 steps :
1515 - name : checkout
1616 uses : actions/checkout@v6
17+ - name : install poetry
18+ working-directory : drake_poetry
19+ run : .github/setup
20+ # Note that in the pyproject.toml,
21+ # we find the latest "compatible release" of drake
22+ # using ~=. This means that, with the caching disabled,
23+ # poetry will find the most recent version of drake
24+ # that uses the same major number. With the caching enabled, however,
25+ # setup-python will use the version of drake that is in the cache,
26+ # until the pyproject.toml file is updated
27+ # (see the cache-dependency-path argument below).
28+ # We update the pyproject.toml file monthly after a new minor
29+ # version of drake using automated renovate PRs.
30+ # Note that between a new minor release of drake and the renovate
31+ # PR for that release being merged in, setup-python will
32+ # pull in the older version of drake.
1733 - name : python setup
1834 uses : actions/setup-python@v6
1935 with :
2036 python-version : ${{ env.PYTHON_VERSION }}
37+ cache : ' poetry'
38+ cache-dependency-path : ' drake_poetry/pyproject.toml'
2139 - name : poetry setup
2240 working-directory : drake_poetry
2341 run : |
24- .github/setup
2542 args=(--python-version $PYTHON_VERSION)
2643 if [[ '${{ github.event.inputs.mac_arm_sequoia_wheel }}' != '' ]]; then
2744 args+=(--wheel-url ${{ github.event.inputs.mac_arm_sequoia_wheel }})
@@ -35,17 +52,30 @@ jobs:
3552 ubuntu_noble_poetry :
3653 name : ubuntu 24.04 noble
3754 runs-on : ubuntu-latest
55+ env :
56+ PYTHON_VERSION : ' 3.12'
3857 container : ubuntu:noble
3958 steps :
4059 - name : checkout
4160 uses : actions/checkout@v6
42- # setup and test must occur in one step
43- # because when poetry is installed, the update to PATH
44- # does not persist between steps on GHA
45- - name : poetry setup and test
61+ - name : install poetry
4662 working-directory : drake_poetry
63+ # When poetry is installed, the update to the PATH
64+ # environment variable does not persist between steps on
65+ # GHA. Thus, we update the path after installing.
4766 run : |
4867 .github/setup
68+ PIPX_BIN=$(pipx environment --value PIPX_BIN_DIR)
69+ echo "$PIPX_BIN" >> $GITHUB_PATH
70+ - name : python setup
71+ uses : actions/setup-python@v6
72+ with :
73+ python-version : ${{ env.PYTHON_VERSION }}
74+ cache : ' poetry'
75+ cache-dependency-path : ' drake_poetry/pyproject.toml'
76+ - name : poetry setup and test
77+ working-directory : drake_poetry
78+ run : |
4979 source $HOME/.profile
5080 args=()
5181 if [[ '${{ github.event.inputs.linux_noble_wheel }}' != '' ]]; then
0 commit comments