-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
27 additions
and
67 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,6 @@ env: | |
SCCACHE_GHA_ENABLED: "true" | ||
HUGR_BIN_DIR: ${{ github.workspace }}/target/debug | ||
HUGR_BIN: ${{ github.workspace }}/target/debug/hugr | ||
UV_CACHE_DIR: /tmp/.uv-cache | ||
|
||
jobs: | ||
# Check if changes were made to the relevant files. | ||
|
@@ -53,18 +52,13 @@ jobs: | |
uses: mozilla-actions/[email protected] | ||
|
||
- name: Set up uv | ||
run: .github/script/install-uv.sh | ||
- name: "Set up Python" | ||
uses: actions/setup-python@v5 | ||
uses: astral-sh/setup-uv@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Restore uv cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ env.UV_CACHE_DIR }} | ||
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }} | ||
restore-keys: | | ||
uv-${{ runner.os }} | ||
version: "0.4.18" | ||
enable-cache: true | ||
- name: Install Python | ||
run: uv python install ${{ matrix.python-version }} | ||
|
||
- name: Setup dependencies. Fail if the lockfile is outdated. | ||
run: uv sync --locked | ||
|
||
|
@@ -77,9 +71,6 @@ jobs: | |
- name: Lint with ruff | ||
run: uv run ruff check | ||
|
||
- name: Minimize uv cache | ||
run: uv cache prune --ci | ||
|
||
build_binary: | ||
needs: changes | ||
if: ${{ needs.changes.outputs.python == 'true' }} | ||
|
@@ -115,20 +106,14 @@ jobs: | |
- { py: '3.12', coverage: true } | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up uv | ||
run: .github/script/install-uv.sh | ||
- name: "Set up Python" | ||
uses: actions/setup-python@v5 | ||
uses: astral-sh/setup-uv@v3 | ||
with: | ||
python-version: ${{ matrix.python-version.py }} | ||
- name: Restore uv cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ env.UV_CACHE_DIR }} | ||
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }} | ||
restore-keys: | | ||
uv-${{ runner.os }} | ||
version: "0.4.18" | ||
enable-cache: true | ||
- name: Install Python | ||
run: uv python install ${{ matrix.python-version.py }} | ||
|
||
- name: Download the hugr binary | ||
uses: actions/download-artifact@v4 | ||
|
@@ -163,9 +148,6 @@ jobs: | |
flags: python | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
- name: Minimize uv cache | ||
run: uv cache prune --ci | ||
|
||
# Ensure that the serialization schema is up to date | ||
serialization-schema: | ||
needs: [changes] | ||
|
@@ -178,18 +160,12 @@ jobs: | |
uses: mozilla-actions/[email protected] | ||
|
||
- name: Set up uv | ||
run: .github/script/install-uv.sh | ||
- name: "Set up Python" | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
- name: Restore uv cache | ||
uses: actions/cache@v4 | ||
uses: astral-sh/setup-uv@v3 | ||
with: | ||
path: ${{ env.UV_CACHE_DIR }} | ||
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }} | ||
restore-keys: | | ||
uv-${{ runner.os }} | ||
version: "0.4.18" | ||
enable-cache: true | ||
- name: Install Python | ||
run: uv python install 3.12 | ||
|
||
- name: Setup dependencies | ||
run: uv sync | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,11 +33,12 @@ jobs: | |
uses: mozilla-actions/[email protected] | ||
|
||
- name: Set up uv | ||
run: .github/script/install-uv.sh | ||
- name: "Set up Python" | ||
uses: actions/setup-python@v5 | ||
uses: astral-sh/setup-uv@v3 | ||
with: | ||
python-version: '3.12' | ||
version: "0.4.18" | ||
enable-cache: true | ||
- name: Install Python | ||
run: uv python install 3.12 | ||
|
||
- name: Build sdist and wheels | ||
run: | | ||
|