Skip to content

Commit a3a1b2e

Browse files
committed
install uv in CI without nix
1 parent 8652254 commit a3a1b2e

File tree

2 files changed

+12
-23
lines changed

2 files changed

+12
-23
lines changed

.github/workflows/test-pr.yml

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,12 @@ jobs:
1515
steps:
1616
- name: 'Check out code'
1717
uses: actions/checkout@v4
18-
- name: 'Install Nix'
19-
uses: cachix/[email protected]
20-
with:
21-
install_url: https://releases.nixos.org/nix/nix-2.24.12/install
22-
extra_nix_config: |
23-
substituters = http://cache.nixos.org https://cache.iog.io
24-
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
25-
# note: we install uv from the nix flake in order to match the uv version that is used by uv2nix
18+
# note: we install the same version of `uv` as used by `uv2nix` in order to match the nix derivation
2619
- name: 'Install uv'
2720
run: |
28-
nix profile install .#uv
29-
uv --version
21+
UV_VERSION=$(curl -s https://raw.githubusercontent.com/pyproject-nix/uv2nix/$(cat deps/uv2nix)/pkgs/uv-bin/srcs.json | jq -r .version)
22+
[[ "$UV_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]
23+
curl -LsSf https://astral.sh/uv/$UV_VERSION/install.sh | sh && uv --version
3024
- name: 'Run code quality checks'
3125
run: make check
3226
- name: 'Run pyupgrade'
@@ -39,18 +33,12 @@ jobs:
3933
steps:
4034
- name: 'Check out code'
4135
uses: actions/checkout@v4
42-
- name: 'Install Nix'
43-
uses: cachix/[email protected]
44-
with:
45-
install_url: https://releases.nixos.org/nix/nix-2.24.12/install
46-
extra_nix_config: |
47-
substituters = http://cache.nixos.org https://cache.iog.io
48-
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
49-
# note: we install uv from the nix flake in order to match the uv version that is used by uv2nix
36+
# note: we install the same version of `uv` as used by `uv2nix` in order to match the nix derivation
5037
- name: 'Install uv'
5138
run: |
52-
nix profile install .#uv
53-
uv --version
39+
UV_VERSION=$(curl -s https://raw.githubusercontent.com/pyproject-nix/uv2nix/$(cat deps/uv2nix)/pkgs/uv-bin/srcs.json | jq -r .version)
40+
[[ "$UV_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]
41+
curl -LsSf https://astral.sh/uv/$UV_VERSION/install.sh | sh && uv --version
5442
- name: 'Run unit tests'
5543
run: make cov-unit
5644

.github/workflows/update-version.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,12 @@ jobs:
3939
with:
4040
name: k-framework
4141
authToken: ${{ secrets.CACHIX_PUBLIC_TOKEN }}
42-
# note: we install uv from the nix flake in order to match the uv version that is used by uv2nix
42+
# note: we install the same version of `uv` as used by `uv2nix` in order to match the nix derivation
4343
- name: 'Install uv'
4444
run: |
45-
nix profile install .#uv
46-
uv --version
45+
UV_VERSION=$(curl -s https://raw.githubusercontent.com/pyproject-nix/uv2nix/$(cat deps/uv2nix)/pkgs/uv-bin/srcs.json | jq -r .version)
46+
[[ "$UV_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]
47+
curl -LsSf https://astral.sh/uv/$UV_VERSION/install.sh | sh && uv --version
4748
- name: 'Update kevm-pyk release tag'
4849
run: |
4950
KEVM_VERSION="$(cat deps/kevm_release)"

0 commit comments

Comments
 (0)