1313
1414env :
1515 SCCACHE_GHA_ENABLED : " true"
16- HUGR_BIN_DIR : ${{ github.workspace }}/target/debug
17- HUGR_BIN : ${{ github.workspace }}/target/debug/hugr
1816 # Pinned version for the uv package manager
1917 UV_VERSION : " 0.9.5"
2018 UV_FROZEN : 1
6866 - name : Lint with ruff
6967 run : uv run ruff check
7068
71- build_binary :
72- needs : changes
73- if : ${{ needs.changes.outputs.python == 'true' }}
74-
75- name : Build HUGR binary
76- runs-on : ubuntu-latest
77- env :
78- SCCACHE_GHA_ENABLED : " true"
79- RUSTC_WRAPPER : " sccache"
80-
81- steps :
82- - uses : actions/checkout@v5
83- -
uses :
mozilla-actions/[email protected] 84- - name : Install stable toolchain
85- uses : dtolnay/rust-toolchain@stable
86- - name : Build HUGR binary
87- run : cargo build -p hugr-cli
88- - name : Upload the binary to the artifacts
89- uses : actions/upload-artifact@v5
90- with :
91- name : hugr_binary
92- path : target/debug/hugr
9369 test :
94- needs : [changes, build_binary ]
70+ needs : [changes]
9571 if : ${{ needs.changes.outputs.python == 'true' }}
9672 name : test python ${{ matrix.python-version.py }}
9773 runs-on : ubuntu-latest
@@ -110,12 +86,6 @@ jobs:
11086 version : ${{ env.UV_VERSION }}
11187 enable-cache : true
11288
113- - name : Download the hugr binary
114- uses : actions/download-artifact@v6
115- with :
116- name : hugr_binary
117- path : ${{env.HUGR_BIN_DIR}}
118-
11989 - name : Setup dependencies
12090 run : uv sync --python ${{ matrix.python-version.py }}
12191
@@ -125,13 +95,11 @@ jobs:
12595 - name : Run tests
12696 if : github.event_name == 'merge_group' || !matrix.python-version.coverage
12797 run : |
128- chmod +x $HUGR_BIN
12998 HUGR_RENDER_DOT=1 uv run pytest
13099
131100 - name : Run python tests with coverage instrumentation
132101 if : github.event_name != 'merge_group' && matrix.python-version.coverage
133102 run : |
134- chmod +x $HUGR_BIN
135103 HUGR_RENDER_DOT=1 uv run pytest --cov=./ --cov-report=xml
136104
137105 - name : Upload python coverage to codecov.io
0 commit comments