diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-09-21 11:09:36 -0400 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-09-21 11:09:36 -0400 |
| commit | ad1f7a6a3cd262cc084673ec5cf0c561328ec7c7 (patch) | |
| tree | e3369e40b8f36345911091b542021a4899bb474d /.github/workflows | |
| parent | 0ca41da65d675b624fb6389da1f488a24ea416e1 (diff) | |
| download | open-iov-ad1f7a6a3cd262cc084673ec5cf0c561328ec7c7.tar.gz open-iov-ad1f7a6a3cd262cc084673ec5cf0c561328ec7c7.zip | |
Make repo fully path-portable and add reproducible installer
- install.sh: one-command fresh-Ubuntu reproduction (deps, NVIDIA clone
+ patch, GSP firmware fetch from linux-firmware.git with objcopy
.fwimage extraction + MD5 verify, ordered build, host config, load,
mdev creation). Wrapper-neutral: works with libvirt/raw QEMU.
- patches/nvidia: regenerated path-independent patch (KBUILD_EXTRA_SYMBOLS
resolved via $(src)/$(CURDIR) relative to the NVIDIA tree).
- scripts/stack_manager.sh and helper scripts auto-detect repo root
(OPEN_IOV_ROOT override); no hardcoded developer paths anywhere.
- firmware analysis scripts use script-relative paths (also fixes stale
firmware/570-GSP references); docs/wiki updated to $OPEN_IOV_ROOT.
- .github/workflows/ci.yml updated for standalone repo layout; firmware
fetched from linux-firmware in CI.
- Untrack remaining kbuild artifacts (Module.symvers, modules.order,
*.o.d); gitignore them.
- STATE.md: live project state, limitations, fixed/open bugs.
- README.md: rewritten for clone-and-run reproducibility.
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/ci.yml | 208 |
1 files changed, 66 insertions, 142 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e4fed5a..f3f71a9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,20 +1,19 @@ -# GSP vGPU-IO CI/CD Pipeline +# Open-IOV CI/CD Pipeline -name: GSP vGPU-IO CI +name: Open-IOV CI on: push: - branches: [main, develop] - paths: - - 'open-iov/**' + branches: [main, master, develop] pull_request: - branches: [main, develop] - paths: - - 'open-iov/**' + branches: [main, master, develop] env: KERNEL_VERSION: ${{ matrix.kernel }} GCC_VERSION: ${{ matrix.gcc }} + GSP_VERSION: '570.144' + FW_RAW_BASE: https://raw.githubusercontent.com/NVIDIA/linux-firmware/2237b99e29d09bebffdb706ae05005d9026fd7e4/nvidia/tu102/gsp + FW_MD5: 13ce12a392a31eeb79a2e6ebd3a4a93a jobs: # ============================================================ @@ -39,12 +38,10 @@ jobs: gcc: '13' kernel_package: 'linux-headers-6.8.0-48-generic' timeout-minutes: 30 - + steps: - name: Checkout repository uses: actions/checkout@v4 - with: - path: open-iov - name: Install kernel headers run: | @@ -56,19 +53,28 @@ jobs: sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ matrix.gcc }} 100 gcc --version - - name: Build driver + - name: Fetch GSP firmware (linux-firmware) run: | - cd open-iov/driver - make KDIR=/lib/modules/$(uname -r)/build + mkdir -p firmware/57X-GSP/570.144 + curl -fSL --retry 3 -o firmware/57X-GSP/570.144/gsp-${{ env.GSP_VERSION }}.bin \ + "${{ env.FW_RAW_BASE }}/gsp-${{ env.GSP_VERSION }}.bin" + objcopy -O binary --only-section=.fwimage \ + firmware/57X-GSP/570.144/gsp-${{ env.GSP_VERSION }}.bin \ + firmware/57X-GSP/570.144/gsp-${{ env.GSP_VERSION }}.fwimage.bin + echo "${{ env.FW_MD5 }} firmware/57X-GSP/570.144/gsp-${{ env.GSP_VERSION }}.fwimage.bin" | md5sum -c - + + - name: Build host kernel module + run: make kernel + + - name: Build legacy guest driver + run: make -C driver KDIR=/lib/modules/$(uname -r)/build - name: Build kernel tests - run: | - cd open-iov/kernel/tests - make KDIR=/lib/modules/$(uname -r)/build + run: make -C kernel/tests KDIR=/lib/modules/$(uname -r)/build - name: Run comprehensive test module run: | - cd open-iov/kernel/tests + cd kernel/tests sudo insmod gsp_vgpu_comprehensive_test.ko sleep 2 dmesg -T | tail -50 @@ -77,7 +83,7 @@ jobs: - name: Run KUnit tests if: matrix.kernel == '6.6' && matrix.gcc == '12' run: | - cd open-iov/kernel/tests + cd kernel/tests sudo insmod gsp_vgpu_kunit_test.ko sleep 2 dmesg -T | grep -E "(kunit|KUNIT|PASS|FAIL)" | tail -50 @@ -85,85 +91,52 @@ jobs: - name: Run mock tests run: | - cd open-iov/kernel/tests + cd kernel/tests sudo insmod gsp_vgpu_mock_test.ko sleep 2 dmesg -T | grep -E "(PASS|FAIL|Test Results)" | tail -50 sudo rmmod gsp_vgpu_mock_test # ============================================================ - # Firmware Validation + # Firmware Validation (fetched from linux-firmware.git) # ============================================================ firmware-validation: name: Firmware Validation runs-on: ubuntu-latest timeout-minutes: 15 - + steps: - name: Checkout repository uses: actions/checkout@v4 - with: - path: open-iov - - name: Verify firmware exists + - name: Fetch and extract firmware run: | - ls -la open-iov/firmware/570-GSP/gsp-570.144.fwimage.bin - + mkdir -p firmware/57X-GSP/570.144 + curl -fSL --retry 3 -o firmware/57X-GSP/570.144/gsp-${{ env.GSP_VERSION }}.bin \ + "${{ env.FW_RAW_BASE }}/gsp-${{ env.GSP_VERSION }}.bin" + objcopy -O binary --only-section=.fwimage \ + firmware/57X-GSP/570.144/gsp-${{ env.GSP_VERSION }}.bin \ + firmware/57X-GSP/570.144/gsp-${{ env.GSP_VERSION }}.fwimage.bin + - name: Verify firmware MD5 run: | - cd open-iov/firmware/570-GSP - expected="13ce12a392a31eeb79a2e6ebd3a4a93a" - actual=$(md5sum gsp-570.144.fwimage.bin | cut -d' ' -f1) - echo "Expected: $expected" + cd firmware/57X-GSP/570.144 + actual=$(md5sum gsp-${{ env.GSP_VERSION }}.fwimage.bin | cut -d' ' -f1) + echo "Expected: ${{ env.FW_MD5 }}" echo "Actual: $actual" - if [ "$expected" != "$actual" ]; then - echo "MD5 mismatch!" - exit 1 - fi - echo "MD5 verified ✓" + [ "$actual" = "${{ env.FW_MD5 }}" ] + echo "MD5 verified" - name: Verify firmware size run: | - cd open-iov/firmware/570-GSP - size=$(stat -c%s gsp-570.144.fwimage.bin) - expected=29622272 # 28.5 MB + cd firmware/57X-GSP/570.144 + size=$(stat -c%s gsp-${{ env.GSP_VERSION }}.fwimage.bin) echo "Size: $size bytes" if [ "$size" -lt 28000000 ] || [ "$size" -gt 31000000 ]; then echo "Unexpected firmware size!" exit 1 fi - echo "Size verified ✓" - - - name: Verify decompiled output - run: | - cd open-iov/firmware/570-GSP/decompiled - count=$(ls *.c | wc -l) - echo "Decompiled files: $count" - if [ "$count" -lt 80 ]; then - echo "Expected at least 80 decompiled files!" - exit 1 - fi - echo "Decompilation verified ✓" - - - name: Verify key addresses in decompiled output - run: | - cd open-iov/firmware/570-GSP/decompiled - # Check critical functions exist - for func in \ - "FUN_ram_057a1ac0" \ - "FUN_ram_04cb8188" \ - "FUN_ram_04f00b0c" \ - "FUN_ram_04f00c78" \ - "FUN_ram_057e94ec" \ - "FUN_ram_051efbf4" \ - "FUN_ram_059be7f4" \ - "entry_ram_04009000"; do - if [ ! -f "${func}_ram_*.c" ]; then - echo "Missing: $func" - exit 1 - fi - done - echo "Key functions verified ✓" + echo "Size verified" # ============================================================ # Documentation Validation @@ -172,16 +145,14 @@ jobs: name: Documentation Validation runs-on: ubuntu-latest timeout-minutes: 10 - + steps: - name: Checkout repository uses: actions/checkout@v4 - with: - path: open-iov - name: Check wiki files exist run: | - cd open-iov/wiki + cd wiki required=( "GSP-570.144W-Firmware-Analysis.md" "RPC-Message-Format.md" @@ -204,8 +175,7 @@ jobs: - name: Validate markdown syntax run: | - cd open-iov/wiki - # Check for basic markdown structure + cd wiki for f in *.md; do if ! head -1 "$f" | grep -q "^#"; then echo "Warning: $f missing H1 header" @@ -214,8 +184,7 @@ jobs: - name: Check cross-references run: | - cd open-iov/wiki - # Verify internal links resolve + cd wiki for f in *.md; do grep -o '\[.*\](.*\.md)' "$f" | while read link; do target=$(echo "$link" | sed -n 's/.*(\(.*\))/\1/p') @@ -233,33 +202,24 @@ jobs: name: Static Analysis runs-on: ubuntu-latest timeout-minutes: 20 - + steps: - name: Checkout repository uses: actions/checkout@v4 - with: - path: open-iov - - name: Install checkpatch.pl + - name: Install dependencies run: | sudo apt-get update - sudo apt-get install -y linux-headers-$(uname -r) - # checkpatch.pl comes with kernel headers + sudo apt-get install -y linux-headers-$(uname -r) cppcheck - - name: Run checkpatch on driver + - name: Run checkpatch on host kernel module run: | - cd open-iov/driver + cd kernel find . -name "*.c" -o -name "*.h" | xargs /usr/src/linux-headers-$(uname -r)/scripts/checkpatch.pl --no-tree --strict || true - - name: Run sparse - run: | - cd open-iov/driver - make C=1 CHECK="/usr/bin/sparse" 2>&1 | head -100 || true - - name: Run cppcheck run: | - sudo apt-get install -y cppcheck - cd open-iov/driver + cd kernel cppcheck --enable=all --std=c11 --force -I include . 2>&1 | head -100 || true # ============================================================ @@ -269,21 +229,20 @@ jobs: name: Userspace Build Test runs-on: ubuntu-latest timeout-minutes: 10 - + steps: - name: Checkout repository uses: actions/checkout@v4 - with: - path: open-iov + + - name: Build userspace + run: make userspace examples - name: Build userspace tests - run: | - cd open-iov/userspace/tests - make + run: make -C userspace/tests - name: Verify binary run: | - cd open-iov/userspace/tests + cd userspace/tests ./test_vgpu_userspace 2>&1 | head -20 || true # Expected to fail without driver, but should run @@ -295,51 +254,16 @@ jobs: runs-on: [self-hosted, gpu, nvidia] if: github.event_name == 'workflow_dispatch' timeout-minutes: 60 - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - path: open-iov - - - name: Run full integration test - run: | - cd open-iov - sudo ./tools/test/run_integration_tests.sh all - # ============================================================ - # Release Artifacts - # ============================================================ - release: - name: Create Release - needs: [kernel-test, firmware-validation, docs-validation, static-analysis, userspace-build] - if: github.event_name == 'release' && github.event.action == 'published' - runs-on: ubuntu-latest - timeout-minutes: 15 - steps: - name: Checkout repository uses: actions/checkout@v4 - with: - path: open-iov - - name: Build release artifacts - run: | - cd open-iov - # Create release package - mkdir -p release - cp firmware/570-GSP/gsp-570.144.fwimage.bin release/ - cp -r wiki release/ - cp -r driver release/ - cp -r kernel/tests release/ - cp -r userspace/tests release/ - cp README.md release/ - tar -czf gsp-vgpu-io-${{ github.event.release.tag_name }}.tar.gz release/ - - - name: Upload release assets - uses: softprops/action-gh-release@v1 - with: - files: open-iov/gsp-vgpu-io-${{ github.event.release.tag_name }}.tar.gz + - name: Full install + run: ./install.sh --no-load + + - name: Run full integration test + run: sudo ./tools/test/run_integration_tests.sh all # ============================================================ # Workflow Permissions @@ -347,4 +271,4 @@ jobs: permissions: contents: read checks: write - pull-requests: write
\ No newline at end of file + pull-requests: write |
