CI: fix the Install step (setup-uv already creates .venv) and make sure a C linker exists for the Rust build

This commit is contained in:
kemal committed 2026-09-30 08:29:58 +01:00
1 parent a19448f758
commit 97cb24ebb5
1 file changed
+3 -1
+3 -1
View File
@@ -16,7 +16,8 @@ jobs:
with: with:
python-version: ${{ matrix.python }} python-version: ${{ matrix.python }}
- name: Install - name: Install
run: uv venv && uv pip install -e ".[dev]" # setup-uv >= 5.x already creates and activates .venv when python-version is set; --clear works either way
run: uv venv --clear && uv pip install -e ".[dev]"
- name: Lint - name: Lint
run: uv run ruff check src tests && uv run ruff format --check src tests run: uv run ruff check src tests && uv run ruff format --check src tests
- name: Type check - name: Type check
@@ -25,6 +26,7 @@ jobs:
run: uv run pytest tests/unit -q run: uv run pytest tests/unit -q
- name: Build the compiled kernels (rust/simurg-core) - name: Build the compiled kernels (rust/simurg-core)
run: | run: |
command -v cc >/dev/null || { apt-get update -qq && apt-get install -y -qq gcc >/dev/null; } # Rust needs a C linker
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
PATH="$HOME/.cargo/bin:$PATH" uv pip install ./rust/simurg-core PATH="$HOME/.cargo/bin:$PATH" uv pip install ./rust/simurg-core
- name: Unit tests with the compiled kernels (must equal the pure-Python results) - name: Unit tests with the compiled kernels (must equal the pure-Python results)