Update script used to install uv to install version 0.11.7 #96
Workflow file for this run
This file contains hidden or 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
| # SPDX-FileCopyrightText: 2026 An Nguyen | |
| # | |
| # SPDX-License-Identifier: Apache-2.0 | |
| name: P4 Tutorials CI | |
| on: | |
| pull_request: | |
| branches: [ master ] | |
| push: | |
| branches: [ master ] | |
| # Add concurrency so only most recent push have CI | |
| concurrency: | |
| group: p4-tutorials-ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| verify-licenses: | |
| runs-on: ubuntu-latest | |
| name: Validate that all files have copyright and license info | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install REUSE | |
| run: | | |
| ./CI/install-uv.sh | |
| - name: Validate presence of copyright and license info (python w/reuse) | |
| run: | | |
| uvx reuse lint | |
| test-exercise: | |
| timeout-minutes: 30 | |
| runs-on: ubuntu-latest | |
| # We use need a privileged container because P4 tests need to create veth interfaces | |
| container: | |
| image: p4lang/p4c:latest | |
| options: --privileged | |
| strategy: | |
| matrix: | |
| exercise: [basic, basic_tunnel] # Add more exercises here for future tests | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Install build dependencies | |
| shell: bash | |
| run: | | |
| apt-get update | |
| apt-get install -y make python3-pip sudo libboost-iostreams-dev libboost-graph-dev | |
| mv /usr/local/lib/python3.12/site-packages/* /usr/local/lib/python3.12/dist-packages | |
| sudo pip3 install --break-system-packages protobuf==3.20.3 grpcio googleapis-common-protos scapy ptf | |
| - name: Run PTF Tests | |
| run: | | |
| cd exercises/${{ matrix.exercise }} | |
| echo "Got here #1" | |
| pip3 list -v | |
| echo "which ptf:" | |
| which ptf | |
| #export PATH="${PATH}:${HOME}/.venv/bin" | |
| #echo "Got here #2" | |
| echo "HOME=${HOME}" | |
| echo "PATH=${PATH}" | |
| #echo "ls -la $HOME" | |
| #echo "--------------------" | |
| #ls -la $HOME | |
| #echo "--------------------" | |
| #echo "ls -la $HOME/.venv/bin" | |
| #echo "--------------------" | |
| #ls -la $HOME/.venv/bin | |
| #echo "--------------------" | |
| #uvx make test | |
| make test | |
| # Retain logs in case runs fail | |
| - name: Upload Logs | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: p4-logs-${{ matrix.exercise }} | |
| path: exercises/${{ matrix.exercise }}/logs/ | |