Skip to content

Commit 5654060

Browse files
committed
ci: Use uv tool instead of venv
1 parent 84079c3 commit 5654060

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

.github/workflows/build.yaml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,14 @@ jobs:
146146
steps:
147147
- name: Checkout
148148
uses: actions/checkout@v4
149+
- name: Install uv
150+
if: matrix.build == 'zigbuild'
151+
uses: astral-sh/setup-uv@v6
149152
- name: Install cargo-zigbuild
150153
if: matrix.build == 'zigbuild'
151154
run: |
152-
python3 -m venv .venv
153-
. .venv/bin/activate
154-
echo PATH=$PATH >> $GITHUB_ENV
155-
pip install ziglang==0.13.0.post1 cargo-zigbuild==0.19.8
155+
uv tool install cargo-zigbuild==0.20.1 --with-executables-from ziglang==0.15.1
156+
echo "CARGO_ZIGBUILD_ZIG_PATH=\"$(uv tool dir)/cargo-zigbuild/bin/python-zig\"" >> $GITHUB_ENV
156157
- name: Setup Rust toolchain
157158
uses: dtolnay/rust-toolchain@stable
158159
with:
@@ -213,13 +214,14 @@ jobs:
213214
sudo apt-get -y install ${{ matrix.packages }}
214215
- name: Checkout
215216
uses: actions/checkout@v4
217+
- name: Install uv
218+
if: matrix.build == 'zigbuild'
219+
uses: astral-sh/setup-uv@v6
216220
- name: Install cargo-zigbuild
217221
if: matrix.build == 'zigbuild'
218222
run: |
219-
python3 -m venv .venv
220-
. .venv/bin/activate
221-
echo PATH=$PATH >> $GITHUB_ENV
222-
pip install ziglang==0.13.0.post1 cargo-zigbuild==0.19.8
223+
uv tool install cargo-zigbuild==0.20.1 --with-executables-from ziglang==0.15.1
224+
echo "CARGO_ZIGBUILD_ZIG_PATH=\"$(uv tool dir)/cargo-zigbuild/bin/python-zig\"" >> $GITHUB_ENV
223225
- name: Setup Rust toolchain
224226
uses: dtolnay/rust-toolchain@stable
225227
with:

0 commit comments

Comments
 (0)