diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index 0ac766a1b..f7614fe8b 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -5,12 +5,14 @@ on: outputs: kernel-url: description: "URL of the built (and uploaded) Linux kernel" - value: ${{ jobs.build.upload-kernel-image.outputs.artifact-url }} + value: ${{ jobs.build.outputs.kernel-url }} jobs: build: name: Build Linux runs-on: ubuntu-latest + outputs: + kernel-url: ${{ steps.upload-linux-kernel.outputs.artifact-url }} steps: - uses: actions/cache/restore@v4 id: restore-cached-kernel @@ -54,6 +56,7 @@ jobs: - uses: actions/upload-artifact@v4 id: upload-linux-kernel with: - name: linux-kernel-image + name: linux-kernel if-no-files-found: error + compression-level: 0 path: build/arch/x86/boot/bzImage diff --git a/.github/workflows/test-kernel.yml b/.github/workflows/test-kernel.yml index 3beb16989..ae2f5bdc0 100644 --- a/.github/workflows/test-kernel.yml +++ b/.github/workflows/test-kernel.yml @@ -27,15 +27,29 @@ jobs: uses: taiki-e/install-action@cargo-llvm-cov - name: Build main.sh env: + KERNEL_URL: ${{ needs.build-linux-kernel.outputs.kernel-url }} PYTHON: ${{ steps.py312.outputs.python-path }} run: | + # Yes, there appears to be no way to just retrieve the + # uploaded artifact. One can't use actions/download-artifact + # and provide any of the outputs of actions/upload-artifact. + # Neither is it possible to just download the thing directly, + # because contents are unconditionally zipped. Good. Lord. + curl --location \ + --fail-with-body \ + --header "Accept: application/vnd.github+json" \ + --header "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}"\ + --header "X-GitHub-Api-Version: 2022-11-28" \ + --output linux-kernel.zip \ + "${KERNEL_URL}" + unzip linux-kernel.zip cat < main.sh export PYTHON=${PYTHON} exec cargo test --workspace --all-targets --features=nightly,generate-large-test-files -- --include-ignored EOF chmod a+x main.sh - name: Test - uses: danobi/vmtest-action@v0.6 + uses: danobi/vmtest-action@master with: - kernel_url: ${{ needs.build-linux-kernel.outputs.kernel-url }} + kernel: bzImage command: "/bin/bash -c ${{ github.workspace }}/main.sh"