Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/test-exercises.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ jobs:
- uses: actions/checkout@v6
- name: Install REUSE
run: |
./CI/setup-uv.sh
uv pip install reuse
./CI/install-uv.sh
- name: Validate presence of copyright and license info (python w/reuse)
run: |
uv run reuse lint
uvx reuse lint
test-exercise:
timeout-minutes: 30
runs-on: ubuntu-latest
Expand All @@ -40,7 +39,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Install build dependencies
shell: bash
Expand Down
30 changes: 30 additions & 0 deletions CI/install-uv.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env bash
# SPDX-FileCopyrightText: 2026 The P4 Language Consortium
# SPDX-License-Identifier: Apache-2.0

set -eu

UV_VERSION="${UV_VERSION:-0.11.7}"
UV_INSTALL_DIR="${HOME}/.local/bin"

if command -v uv >/dev/null 2>&1; then
exit 0
fi

mkdir -p "${UV_INSTALL_DIR}"

if command -v curl >/dev/null 2>&1; then
env UV_UNMANAGED_INSTALL="${UV_INSTALL_DIR}" \
sh -c "$(curl -LsSf https://astral.sh/uv/${UV_VERSION}/install.sh)"
elif command -v wget >/dev/null 2>&1; then
env UV_UNMANAGED_INSTALL="${UV_INSTALL_DIR}" \
sh -c "$(wget -qO- https://astral.sh/uv/${UV_VERSION}/install.sh)"
else
echo "Neither curl nor wget is available to install uv" >&2
exit 1
fi

export PATH="${UV_INSTALL_DIR}:${PATH}"
if [ -n "${GITHUB_PATH:-}" ]; then
echo "${UV_INSTALL_DIR}" >> "${GITHUB_PATH}"
fi
16 changes: 0 additions & 16 deletions CI/setup-uv.sh

This file was deleted.

Loading