diff --git a/.github/workflows/openvmm-ci.yaml b/.github/workflows/openvmm-ci.yaml index b9e8011fce..51cf4704a7 100644 --- a/.github/workflows/openvmm-ci.yaml +++ b/.github/workflows/openvmm-ci.yaml @@ -348,8 +348,9 @@ jobs: name: clippy [x64-windows], unit tests [x64-windows] runs-on: - self-hosted - - 1ES.Pool=openvmm-gh-amd-westus3 - - 1ES.ImageOverride=win-amd64 + - 1ES.Pool=openvmm-gh-amd + - 1ES.ImageOverride=win-amd64-v2 + - 1ES.WorkFolder=E:\_work - JobId=job10-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }} permissions: contents: read @@ -615,8 +616,9 @@ jobs: name: clippy [x64-linux, macos], unit tests [x64-linux] runs-on: - self-hosted - - 1ES.Pool=openvmm-gh-amd-westus3 - - 1ES.ImageOverride=ubuntu2404-amd64 + - 1ES.Pool=openvmm-gh-amd + - 1ES.ImageOverride=ubuntu2404-amd64-v2 + - 1ES.WorkFolder=/mnt/azure_nvme_temp/_work - JobId=job11-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }} permissions: contents: read @@ -968,8 +970,9 @@ jobs: name: clippy [x64-linux-musl, misc nostd], unit tests [x64-linux-musl] runs-on: - self-hosted - - 1ES.Pool=openvmm-gh-amd-westus3 - - 1ES.ImageOverride=ubuntu2404-amd64 + - 1ES.Pool=openvmm-gh-amd + - 1ES.ImageOverride=ubuntu2404-amd64-v2 + - 1ES.WorkFolder=/mnt/azure_nvme_temp/_work - JobId=job12-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }} permissions: contents: read @@ -1334,8 +1337,9 @@ jobs: name: clippy [aarch64-windows], unit tests [aarch64-windows] runs-on: - self-hosted - - 1ES.Pool=openvmm-gh-arm-westus2 - - 1ES.ImageOverride=win-arm64 + - 1ES.Pool=openvmm-gh-arm + - 1ES.ImageOverride=win-arm64-v2 + - 1ES.WorkFolder=E:\_work - JobId=job13-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }} permissions: contents: read @@ -1601,8 +1605,9 @@ jobs: name: clippy [aarch64-linux], unit tests [aarch64-linux] runs-on: - self-hosted - - 1ES.Pool=openvmm-gh-arm-westus2 - - 1ES.ImageOverride=ubuntu2404-arm64 + - 1ES.Pool=openvmm-gh-arm + - 1ES.ImageOverride=ubuntu2404-arm64-v2 + - 1ES.WorkFolder=/mnt/azure_nvme_temp/_work - JobId=job14-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }} permissions: contents: read @@ -1931,8 +1936,9 @@ jobs: name: clippy [aarch64-linux-musl, misc nostd], unit tests [aarch64-linux-musl] runs-on: - self-hosted - - 1ES.Pool=openvmm-gh-arm-westus2 - - 1ES.ImageOverride=ubuntu2404-arm64 + - 1ES.Pool=openvmm-gh-arm + - 1ES.ImageOverride=ubuntu2404-arm64-v2 + - 1ES.WorkFolder=/mnt/azure_nvme_temp/_work - JobId=job15-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }} permissions: contents: read @@ -2297,8 +2303,9 @@ jobs: name: run vmm-tests [x64-windows-intel] runs-on: - self-hosted - - 1ES.Pool=openvmm-gh-intel-westus3 - - 1ES.ImageOverride=win-amd64 + - 1ES.Pool=openvmm-gh-intel + - 1ES.ImageOverride=win-amd64-v2 + - 1ES.WorkFolder=E:\_work - JobId=job16-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }} permissions: contents: read @@ -2831,8 +2838,9 @@ jobs: name: run vmm-tests [x64-windows-amd] runs-on: - self-hosted - - 1ES.Pool=openvmm-gh-amd-westus3 - - 1ES.ImageOverride=win-amd64 + - 1ES.Pool=openvmm-gh-amd + - 1ES.ImageOverride=win-amd64-v2 + - 1ES.WorkFolder=E:\_work - JobId=job18-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }} permissions: contents: read @@ -3365,8 +3373,9 @@ jobs: name: build artifacts (not for VMM tests) [aarch64-windows] runs-on: - self-hosted - - 1ES.Pool=openvmm-gh-amd-westus3 - - 1ES.ImageOverride=win-amd64 + - 1ES.Pool=openvmm-gh-amd + - 1ES.ImageOverride=win-amd64-v2 + - 1ES.WorkFolder=E:\_work - JobId=job2-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }} permissions: contents: read @@ -3580,8 +3589,9 @@ jobs: name: run vmm-tests [x64-linux-amd-kvm] runs-on: - self-hosted - - 1ES.Pool=openvmm-gh-amd-westus3 - - 1ES.ImageOverride=ubuntu2404-amd64 + - 1ES.Pool=openvmm-gh-amd + - 1ES.ImageOverride=ubuntu2404-amd64-v2 + - 1ES.WorkFolder=/mnt/azure_nvme_temp/_work - JobId=job20-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }} permissions: contents: read @@ -3833,306 +3843,6 @@ jobs: run: flowey e 20 flowey_lib_common::cache 11 shell: bash job21: - name: run vmm-tests [x64-linux-intel-mshv] - runs-on: - - self-hosted - - 1ES.Pool=openvmm-gh-intel-westus3 - - 1ES.ImageOverride=azurelinux3-amd64-dom0 - - JobId=job21-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }} - permissions: - contents: read - id-token: write - needs: - - job5 - - job7 - - job9 - if: github.event.pull_request.draft == false - steps: - - run: | - set -x - sudo tdnf install -y gcc glibc-devel - curl --fail --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain=1.95.0 -y - . "$HOME/.cargo/env" - echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" - rustup show - if: runner.os == 'Linux' - name: rustup (Linux) - shell: bash - - run: | - set -x - curl --fail -sSfLo rustup-init.exe https://win.rustup.rs/x86_64 --output rustup-init - ./rustup-init.exe -y --default-toolchain=1.95.0 - echo "$USERPROFILE\\.cargo\\bin" >> $GITHUB_PATH - if: runner.os == 'Windows' && runner.arch == 'X64' - name: rustup (Windows X64) - shell: bash - - run: | - set -x - curl --fail -sSfLo rustup-init.exe https://win.rustup.rs/aarch64 --output rustup-init - ./rustup-init.exe -y --default-toolchain=1.95.0 - echo "$USERPROFILE\\.cargo\\bin" >> $GITHUB_PATH - if: runner.os == 'Windows' && runner.arch == 'ARM64' - name: rustup (Windows ARM64) - shell: bash - - uses: actions/checkout@v6 - with: - path: flowey_bootstrap - - name: Build flowey - run: | - set -x - CARGO_INCREMENTAL=0 cargo build -p flowey_hvlite --target x86_64-unknown-linux-gnu --profile flowey-ci - OutDirNormal=$(echo "${{ runner.temp }}/bootstrapped-flowey" | sed -e 's|\\|\/|g' -e 's|^\([A-Za-z]\)\:/\(.*\)|/\L\1\E/\2|') - mkdir -p "$OutDirNormal" - mv ./.github/workflows/openvmm-ci.yaml "$OutDirNormal/pipeline.yaml" - mv target/x86_64-unknown-linux-gnu/flowey-ci/flowey_hvlite "$OutDirNormal/flowey" - working-directory: flowey_bootstrap - shell: bash - - name: πŸŒΌπŸ“¦ Download artifacts - uses: actions/download-artifact@v8 - with: - pattern: '{x64-guest_test_uefi,x64-linux-musl-openvmm,x64-linux-musl-openvmm_vhost,x64-linux-musl-pipette,x64-linux-musl-tmk_vmm,x64-linux-musl-vmm-tests-archive,x64-tmks,x64-windows-pipette}' - path: ${{ runner.temp }}/used_artifacts/ - - run: echo "${{ runner.temp }}/bootstrapped-flowey" >> $GITHUB_PATH - shell: bash - name: πŸŒΌπŸ“¦ Add flowey to PATH - - name: πŸŒΌπŸ”Ž Self-check YAML - run: |- - ESCAPED_AGENT_TEMPDIR=$( - cat <<'EOF' | sed 's/\\/\\\\/g' - ${{ runner.temp }} - EOF - ) - flowey pipeline github --runtime $ESCAPED_AGENT_TEMPDIR/bootstrapped-flowey/pipeline.yaml --out .github/workflows/openvmm-ci.yaml ci checkin-gates --config=ci - shell: bash - - name: πŸŒΌπŸ›« Initialize job - run: | - AgentTempDirNormal="${{ runner.temp }}" - AgentTempDirNormal=$(echo "$AgentTempDirNormal" | sed -e 's|\\|\/|g' -e 's|^\([A-Za-z]\)\:/\(.*\)|/\L\1\E/\2|') - echo "AgentTempDirNormal=$AgentTempDirNormal" >> $GITHUB_ENV - - chmod +x $AgentTempDirNormal/bootstrapped-flowey/flowey - - echo '"debug"' | flowey v 21 'FLOWEY_LOG' update - echo "${{ runner.temp }}/work" | flowey v 21 '_internal_WORKING_DIR' --is-raw-string update - - cat <<'EOF' | flowey v 21 'verbose' update - ${{ inputs.verbose != '' && inputs.verbose || 'false' }} - EOF - echo "$AgentTempDirNormal/used_artifacts/x64-guest_test_uefi" | flowey v 21 'artifact_use_from_x64-guest_test_uefi' --is-raw-string update - echo "$AgentTempDirNormal/used_artifacts/x64-linux-musl-openvmm" | flowey v 21 'artifact_use_from_x64-linux-musl-openvmm' --is-raw-string update - echo "$AgentTempDirNormal/used_artifacts/x64-linux-musl-openvmm_vhost" | flowey v 21 'artifact_use_from_x64-linux-musl-openvmm_vhost' --is-raw-string update - echo "$AgentTempDirNormal/used_artifacts/x64-linux-musl-pipette" | flowey v 21 'artifact_use_from_x64-linux-musl-pipette' --is-raw-string update - echo "$AgentTempDirNormal/used_artifacts/x64-linux-musl-tmk_vmm" | flowey v 21 'artifact_use_from_x64-linux-musl-tmk_vmm' --is-raw-string update - echo "$AgentTempDirNormal/used_artifacts/x64-linux-musl-vmm-tests-archive" | flowey v 21 'artifact_use_from_x64-linux-musl-vmm-tests-archive' --is-raw-string update - echo "$AgentTempDirNormal/used_artifacts/x64-tmks" | flowey v 21 'artifact_use_from_x64-tmks' --is-raw-string update - echo "$AgentTempDirNormal/used_artifacts/x64-windows-pipette" | flowey v 21 'artifact_use_from_x64-windows-pipette' --is-raw-string update - shell: bash - - name: creating new test content dir - run: |- - flowey e 21 flowey_core::pipeline::artifact::resolve 1 - flowey e 21 flowey_core::pipeline::artifact::resolve 2 - flowey e 21 flowey_core::pipeline::artifact::resolve 7 - flowey e 21 flowey_core::pipeline::artifact::resolve 3 - flowey e 21 flowey_core::pipeline::artifact::resolve 0 - flowey e 21 flowey_core::pipeline::artifact::resolve 4 - flowey e 21 flowey_core::pipeline::artifact::resolve 6 - flowey e 21 flowey_lib_hvlite::_jobs::consume_and_test_nextest_vmm_tests_archive 0 - shell: bash - - name: checking if packages need to be installed - run: flowey e 21 flowey_lib_common::install_dist_pkg 0 - shell: bash - - name: installing packages - run: flowey e 21 flowey_lib_common::install_dist_pkg 1 - shell: bash - - name: create gh-release-download cache dir - run: flowey e 21 flowey_lib_common::download_gh_release 0 - shell: bash - - name: Pre-processing cache vars - run: |- - flowey e 21 flowey_lib_common::cache 8 - flowey v 21 'flowey_lib_common::cache:18:flowey_lib_common/src/cache.rs:407:72' --is-raw-string write-to-env github floweyvar8 - flowey v 21 'flowey_lib_common::cache:17:flowey_lib_common/src/cache.rs:406:72' --is-raw-string write-to-env github floweyvar9 - shell: bash - - id: flowey_lib_common__cache__9 - uses: actions/cache@v5 - with: - key: ${{ env.floweyvar8 }} - path: ${{ env.floweyvar9 }} - name: 'Restore cache: gh-release-download' - - name: download artifacts from github releases - run: |- - flowey v 21 'flowey_lib_common::cache:20:flowey_lib_common/src/cache.rs:462:70' --is-raw-string update --env-source steps.flowey_lib_common__cache__9.outputs.cache-hit <> "$GITHUB_PATH" - rustup show - if: runner.os == 'Linux' - name: rustup (Linux) - shell: bash - - run: | - set -x - curl --fail -sSfLo rustup-init.exe https://win.rustup.rs/x86_64 --output rustup-init - ./rustup-init.exe -y --default-toolchain=1.95.0 - echo "$USERPROFILE\\.cargo\\bin" >> $GITHUB_PATH - if: runner.os == 'Windows' && runner.arch == 'X64' - name: rustup (Windows X64) - shell: bash - - run: | - set -x - curl --fail -sSfLo rustup-init.exe https://win.rustup.rs/aarch64 --output rustup-init - ./rustup-init.exe -y --default-toolchain=1.95.0 - echo "$USERPROFILE\\.cargo\\bin" >> $GITHUB_PATH - if: runner.os == 'Windows' && runner.arch == 'ARM64' - name: rustup (Windows ARM64) - shell: bash - - uses: actions/checkout@v6 - with: - path: flowey_bootstrap - - name: Build flowey - run: | - set -x - CARGO_INCREMENTAL=0 cargo build -p flowey_hvlite --target x86_64-unknown-linux-gnu --profile flowey-ci - OutDirNormal=$(echo "${{ runner.temp }}/bootstrapped-flowey" | sed -e 's|\\|\/|g' -e 's|^\([A-Za-z]\)\:/\(.*\)|/\L\1\E/\2|') - mkdir -p "$OutDirNormal" - mv ./.github/workflows/openvmm-pr-release.yaml "$OutDirNormal/pipeline.yaml" - mv target/x86_64-unknown-linux-gnu/flowey-ci/flowey_hvlite "$OutDirNormal/flowey" - working-directory: flowey_bootstrap - shell: bash - - name: πŸŒΌπŸ“¦ Download artifacts - uses: actions/download-artifact@v8 - with: - pattern: '{x64-guest_test_uefi,x64-linux-musl-openvmm,x64-linux-musl-openvmm_vhost,x64-linux-musl-pipette,x64-linux-musl-tmk_vmm,x64-linux-musl-vmm-tests-archive,x64-tmks,x64-windows-pipette}' - path: ${{ runner.temp }}/used_artifacts/ - - run: echo "${{ runner.temp }}/bootstrapped-flowey" >> $GITHUB_PATH - shell: bash - name: πŸŒΌπŸ“¦ Add flowey to PATH - - name: πŸŒΌπŸ”Ž Self-check YAML - run: |- - ESCAPED_AGENT_TEMPDIR=$( - cat <<'EOF' | sed 's/\\/\\\\/g' - ${{ runner.temp }} - EOF - ) - flowey pipeline github --runtime $ESCAPED_AGENT_TEMPDIR/bootstrapped-flowey/pipeline.yaml --out .github/workflows/openvmm-pr-release.yaml ci checkin-gates --config=pr-release - shell: bash - - name: πŸŒΌπŸ›« Initialize job - run: | - AgentTempDirNormal="${{ runner.temp }}" - AgentTempDirNormal=$(echo "$AgentTempDirNormal" | sed -e 's|\\|\/|g' -e 's|^\([A-Za-z]\)\:/\(.*\)|/\L\1\E/\2|') - echo "AgentTempDirNormal=$AgentTempDirNormal" >> $GITHUB_ENV - - chmod +x $AgentTempDirNormal/bootstrapped-flowey/flowey - - echo '"debug"' | flowey v 21 'FLOWEY_LOG' update - echo "${{ runner.temp }}/work" | flowey v 21 '_internal_WORKING_DIR' --is-raw-string update - - cat <<'EOF' | flowey v 21 'verbose' update - ${{ inputs.verbose != '' && inputs.verbose || 'false' }} - EOF - echo "$AgentTempDirNormal/used_artifacts/x64-guest_test_uefi" | flowey v 21 'artifact_use_from_x64-guest_test_uefi' --is-raw-string update - echo "$AgentTempDirNormal/used_artifacts/x64-linux-musl-openvmm" | flowey v 21 'artifact_use_from_x64-linux-musl-openvmm' --is-raw-string update - echo "$AgentTempDirNormal/used_artifacts/x64-linux-musl-openvmm_vhost" | flowey v 21 'artifact_use_from_x64-linux-musl-openvmm_vhost' --is-raw-string update - echo "$AgentTempDirNormal/used_artifacts/x64-linux-musl-pipette" | flowey v 21 'artifact_use_from_x64-linux-musl-pipette' --is-raw-string update - echo "$AgentTempDirNormal/used_artifacts/x64-linux-musl-tmk_vmm" | flowey v 21 'artifact_use_from_x64-linux-musl-tmk_vmm' --is-raw-string update - echo "$AgentTempDirNormal/used_artifacts/x64-linux-musl-vmm-tests-archive" | flowey v 21 'artifact_use_from_x64-linux-musl-vmm-tests-archive' --is-raw-string update - echo "$AgentTempDirNormal/used_artifacts/x64-tmks" | flowey v 21 'artifact_use_from_x64-tmks' --is-raw-string update - echo "$AgentTempDirNormal/used_artifacts/x64-windows-pipette" | flowey v 21 'artifact_use_from_x64-windows-pipette' --is-raw-string update - shell: bash - - name: creating new test content dir - run: |- - flowey e 21 flowey_core::pipeline::artifact::resolve 1 - flowey e 21 flowey_core::pipeline::artifact::resolve 2 - flowey e 21 flowey_core::pipeline::artifact::resolve 7 - flowey e 21 flowey_core::pipeline::artifact::resolve 3 - flowey e 21 flowey_core::pipeline::artifact::resolve 0 - flowey e 21 flowey_core::pipeline::artifact::resolve 4 - flowey e 21 flowey_core::pipeline::artifact::resolve 6 - flowey e 21 flowey_lib_hvlite::_jobs::consume_and_test_nextest_vmm_tests_archive 0 - shell: bash - - name: checking if packages need to be installed - run: flowey e 21 flowey_lib_common::install_dist_pkg 0 - shell: bash - - name: installing packages - run: flowey e 21 flowey_lib_common::install_dist_pkg 1 - shell: bash - - name: create gh-release-download cache dir - run: flowey e 21 flowey_lib_common::download_gh_release 0 - shell: bash - - name: Pre-processing cache vars - run: |- - flowey e 21 flowey_lib_common::cache 8 - flowey v 21 'flowey_lib_common::cache:18:flowey_lib_common/src/cache.rs:407:72' --is-raw-string write-to-env github floweyvar8 - flowey v 21 'flowey_lib_common::cache:17:flowey_lib_common/src/cache.rs:406:72' --is-raw-string write-to-env github floweyvar9 - shell: bash - - id: flowey_lib_common__cache__9 - uses: actions/cache@v5 - with: - key: ${{ env.floweyvar8 }} - path: ${{ env.floweyvar9 }} - name: 'Restore cache: gh-release-download' - - name: download artifacts from github releases - run: |- - flowey v 21 'flowey_lib_common::cache:20:flowey_lib_common/src/cache.rs:462:70' --is-raw-string update --env-source steps.flowey_lib_common__cache__9.outputs.cache-hit <> "$GITHUB_PATH" - rustup show - if: runner.os == 'Linux' - name: rustup (Linux) - shell: bash - - run: | - set -x - curl --fail -sSfLo rustup-init.exe https://win.rustup.rs/x86_64 --output rustup-init - ./rustup-init.exe -y --default-toolchain=1.95.0 - echo "$USERPROFILE\\.cargo\\bin" >> $GITHUB_PATH - if: runner.os == 'Windows' && runner.arch == 'X64' - name: rustup (Windows X64) - shell: bash - - run: | - set -x - curl --fail -sSfLo rustup-init.exe https://win.rustup.rs/aarch64 --output rustup-init - ./rustup-init.exe -y --default-toolchain=1.95.0 - echo "$USERPROFILE\\.cargo\\bin" >> $GITHUB_PATH - if: runner.os == 'Windows' && runner.arch == 'ARM64' - name: rustup (Windows ARM64) - shell: bash - - uses: actions/checkout@v6 - with: - path: flowey_bootstrap - - name: Build flowey - run: | - set -x - CARGO_INCREMENTAL=0 cargo build -p flowey_hvlite --target x86_64-unknown-linux-gnu --profile flowey-ci - OutDirNormal=$(echo "${{ runner.temp }}/bootstrapped-flowey" | sed -e 's|\\|\/|g' -e 's|^\([A-Za-z]\)\:/\(.*\)|/\L\1\E/\2|') - mkdir -p "$OutDirNormal" - mv ./.github/workflows/openvmm-pr.yaml "$OutDirNormal/pipeline.yaml" - mv target/x86_64-unknown-linux-gnu/flowey-ci/flowey_hvlite "$OutDirNormal/flowey" - working-directory: flowey_bootstrap - shell: bash - - name: πŸŒΌπŸ“¦ Download artifacts - uses: actions/download-artifact@v8 - with: - pattern: '{x64-guest_test_uefi,x64-linux-musl-openvmm,x64-linux-musl-openvmm_vhost,x64-linux-musl-pipette,x64-linux-musl-tmk_vmm,x64-linux-musl-vmm-tests-archive,x64-tmks,x64-windows-pipette}' - path: ${{ runner.temp }}/used_artifacts/ - - run: echo "${{ runner.temp }}/bootstrapped-flowey" >> $GITHUB_PATH - shell: bash - name: πŸŒΌπŸ“¦ Add flowey to PATH - - name: πŸŒΌπŸ”Ž Self-check YAML - run: |- - ESCAPED_AGENT_TEMPDIR=$( - cat <<'EOF' | sed 's/\\/\\\\/g' - ${{ runner.temp }} - EOF - ) - flowey pipeline github --runtime $ESCAPED_AGENT_TEMPDIR/bootstrapped-flowey/pipeline.yaml --out .github/workflows/openvmm-pr.yaml ci checkin-gates --config=pr - shell: bash - - name: πŸŒΌπŸ›« Initialize job - run: | - AgentTempDirNormal="${{ runner.temp }}" - AgentTempDirNormal=$(echo "$AgentTempDirNormal" | sed -e 's|\\|\/|g' -e 's|^\([A-Za-z]\)\:/\(.*\)|/\L\1\E/\2|') - echo "AgentTempDirNormal=$AgentTempDirNormal" >> $GITHUB_ENV - - chmod +x $AgentTempDirNormal/bootstrapped-flowey/flowey - - echo '"debug"' | flowey v 23 'FLOWEY_LOG' update - echo "${{ runner.temp }}/work" | flowey v 23 '_internal_WORKING_DIR' --is-raw-string update - - cat <<'EOF' | flowey v 23 'verbose' update - ${{ inputs.verbose != '' && inputs.verbose || 'false' }} - EOF - echo "$AgentTempDirNormal/used_artifacts/x64-guest_test_uefi" | flowey v 23 'artifact_use_from_x64-guest_test_uefi' --is-raw-string update - echo "$AgentTempDirNormal/used_artifacts/x64-linux-musl-openvmm" | flowey v 23 'artifact_use_from_x64-linux-musl-openvmm' --is-raw-string update - echo "$AgentTempDirNormal/used_artifacts/x64-linux-musl-openvmm_vhost" | flowey v 23 'artifact_use_from_x64-linux-musl-openvmm_vhost' --is-raw-string update - echo "$AgentTempDirNormal/used_artifacts/x64-linux-musl-pipette" | flowey v 23 'artifact_use_from_x64-linux-musl-pipette' --is-raw-string update - echo "$AgentTempDirNormal/used_artifacts/x64-linux-musl-tmk_vmm" | flowey v 23 'artifact_use_from_x64-linux-musl-tmk_vmm' --is-raw-string update - echo "$AgentTempDirNormal/used_artifacts/x64-linux-musl-vmm-tests-archive" | flowey v 23 'artifact_use_from_x64-linux-musl-vmm-tests-archive' --is-raw-string update - echo "$AgentTempDirNormal/used_artifacts/x64-tmks" | flowey v 23 'artifact_use_from_x64-tmks' --is-raw-string update - echo "$AgentTempDirNormal/used_artifacts/x64-windows-pipette" | flowey v 23 'artifact_use_from_x64-windows-pipette' --is-raw-string update - shell: bash - - name: creating new test content dir - run: |- - flowey e 23 flowey_core::pipeline::artifact::resolve 1 - flowey e 23 flowey_core::pipeline::artifact::resolve 2 - flowey e 23 flowey_core::pipeline::artifact::resolve 7 - flowey e 23 flowey_core::pipeline::artifact::resolve 3 - flowey e 23 flowey_core::pipeline::artifact::resolve 0 - flowey e 23 flowey_core::pipeline::artifact::resolve 4 - flowey e 23 flowey_core::pipeline::artifact::resolve 6 - flowey e 23 flowey_lib_hvlite::_jobs::consume_and_test_nextest_vmm_tests_archive 0 - shell: bash - - name: checking if packages need to be installed - run: flowey e 23 flowey_lib_common::install_dist_pkg 0 - shell: bash - - name: installing packages - run: flowey e 23 flowey_lib_common::install_dist_pkg 1 - shell: bash - - name: create gh-release-download cache dir - run: flowey e 23 flowey_lib_common::download_gh_release 0 - shell: bash - - name: Pre-processing cache vars - run: |- - flowey e 23 flowey_lib_common::cache 8 - flowey v 23 'flowey_lib_common::cache:18:flowey_lib_common/src/cache.rs:407:72' --is-raw-string write-to-env github floweyvar8 - flowey v 23 'flowey_lib_common::cache:17:flowey_lib_common/src/cache.rs:406:72' --is-raw-string write-to-env github floweyvar9 - shell: bash - - id: flowey_lib_common__cache__9 - uses: actions/cache@v5 - with: - key: ${{ env.floweyvar8 }} - path: ${{ env.floweyvar9 }} - name: 'Restore cache: gh-release-download' - - name: download artifacts from github releases - run: |- - flowey v 23 'flowey_lib_common::cache:20:flowey_lib_common/src/cache.rs:462:70' --is-raw-string update --env-source steps.flowey_lib_common__cache__9.outputs.cache-hit <, + temp_dir: Option, label: &'a str, target: CommonTriple, resolve_vmm_tests_artifacts: vmm_tests_artifact_builders::ResolveVmmTestsDepArtifacts, @@ -1297,11 +1298,14 @@ impl IntoPipeline for CheckinGatesCli { KnownTestArtifacts::VmgsWith16kTpm, ]; + let temp_dir_from = |work_folder: &str| Some(PathBuf::from(work_folder).join("temp")); + for VmmTestJobParams { platform, arch, gh_pool, ado_pool, + temp_dir, label, target, resolve_vmm_tests_artifacts, @@ -1315,6 +1319,7 @@ impl IntoPipeline for CheckinGatesCli { arch: FlowArch::X86_64, gh_pool: gh_pools::windows_intel_1es(), ado_pool: Some(ado_pools::windows_intel_1es()), + temp_dir: temp_dir_from(gh_pools::WINDOWS_WORK_FOLDER), label: "x64-windows-intel", target: CommonTriple::X86_64_WINDOWS_MSVC, resolve_vmm_tests_artifacts: vmm_tests_artifacts_windows_intel_x86, @@ -1328,6 +1333,7 @@ impl IntoPipeline for CheckinGatesCli { arch: FlowArch::X86_64, gh_pool: gh_pools::windows_tdx_self_hosted_baremetal(), ado_pool: None, + temp_dir: None, label: "x64-windows-intel-tdx", target: CommonTriple::X86_64_WINDOWS_MSVC, resolve_vmm_tests_artifacts: vmm_tests_artifacts_windows_intel_tdx_x86, @@ -1341,10 +1347,14 @@ impl IntoPipeline for CheckinGatesCli { arch: FlowArch::X86_64, gh_pool: gh_pools::windows_amd_1es(), ado_pool: Some(ado_pools::windows_amd_1es()), + temp_dir: temp_dir_from(gh_pools::WINDOWS_WORK_FOLDER), label: "x64-windows-amd", target: CommonTriple::X86_64_WINDOWS_MSVC, resolve_vmm_tests_artifacts: vmm_tests_artifacts_windows_amd_x86, - nextest_filter_expr: standard_filter.clone(), + // tmk and sidecar requires x2apic, which causes our amd nested runners to crash + nextest_filter_expr: format!( + "{standard_filter} & !(test(hyperv_openhcl) & (test(sidecar) + test(tmk)))" + ), test_artifacts: standard_x64_test_artifacts.clone(), needs_prep_run: false, hugetlb_2mb_overcommit_pages: None, @@ -1354,6 +1364,7 @@ impl IntoPipeline for CheckinGatesCli { arch: FlowArch::X86_64, gh_pool: gh_pools::windows_snp_self_hosted_baremetal(), ado_pool: None, + temp_dir: None, label: "x64-windows-amd-snp", target: CommonTriple::X86_64_WINDOWS_MSVC, resolve_vmm_tests_artifacts: vmm_tests_artifacts_windows_amd_snp_x86, @@ -1367,6 +1378,7 @@ impl IntoPipeline for CheckinGatesCli { arch: FlowArch::X86_64, gh_pool: gh_pools::linux_amd_1es(), ado_pool: Some(ado_pools::linux_amd_1es()), + temp_dir: temp_dir_from(gh_pools::LINUX_WORK_FOLDER), label: "x64-linux-amd-kvm", target: CommonTriple::X86_64_LINUX_GNU, resolve_vmm_tests_artifacts: vmm_tests_artifacts_linux_x86, @@ -1376,25 +1388,27 @@ impl IntoPipeline for CheckinGatesCli { needs_prep_run: false, hugetlb_2mb_overcommit_pages: Some(HUGETLB_2MB_OVERCOMMIT_PAGES), }, - VmmTestJobParams { - platform: FlowPlatform::Linux(FlowPlatformLinuxDistro::AzureLinux), - arch: FlowArch::X86_64, - gh_pool: gh_pools::linux_mshv_1es(), - ado_pool: None, - label: "x64-linux-intel-mshv", - target: CommonTriple::X86_64_LINUX_MUSL, - resolve_vmm_tests_artifacts: vmm_tests_artifacts_linux_mshv_x86, - // - No legal way to obtain gen1 pcat blobs on non-msft linux machines - nextest_filter_expr: format!("{standard_filter} & !test(pcat_x64)"), - test_artifacts: standard_x64_test_artifacts.clone(), - needs_prep_run: false, - hugetlb_2mb_overcommit_pages: None, - }, + // VmmTestJobParams { + // platform: FlowPlatform::Linux(FlowPlatformLinuxDistro::AzureLinux), + // arch: FlowArch::X86_64, + // gh_pool: gh_pools::linux_mshv_1es(), + // ado_pool: None, + // temp_dir: temp_dir_from(gh_pools::WINDOWS_WORK_FOLDER), + // label: "x64-linux-intel-mshv", + // target: CommonTriple::X86_64_LINUX_MUSL, + // resolve_vmm_tests_artifacts: vmm_tests_artifacts_linux_mshv_x86, + // // - No legal way to obtain gen1 pcat blobs on non-msft linux machines + // nextest_filter_expr: format!("{standard_filter} & !test(pcat_x64)"), + // test_artifacts: standard_x64_test_artifacts.clone(), + // needs_prep_run: false, + // hugetlb_2mb_overcommit_pages: None, + // }, VmmTestJobParams { platform: FlowPlatform::Windows, arch: FlowArch::Aarch64, gh_pool: gh_pools::windows_arm_self_hosted_baremetal(), ado_pool: None, + temp_dir: None, label: "aarch64-windows", target: CommonTriple::AARCH64_WINDOWS_MSVC, resolve_vmm_tests_artifacts: vmm_tests_artifacts_windows_aarch64, @@ -1452,6 +1466,7 @@ impl IntoPipeline for CheckinGatesCli { artifact_dir: pub_vmm_tests_results.map(|x| ctx.publish_artifact(x)), needs_prep_run, hugetlb_2mb_overcommit_pages, + temp_dir, done: ctx.new_done_handle(), } }); @@ -1594,6 +1609,7 @@ impl IntoPipeline for CheckinGatesCli { artifact_dir: pub_mi_secure_test_results.map(|x| ctx.publish_artifact(x)), needs_prep_run: false, hugetlb_2mb_overcommit_pages: None, + temp_dir: temp_dir_from(gh_pools::WINDOWS_WORK_FOLDER), done: ctx.new_done_handle(), } }); diff --git a/flowey/flowey_hvlite/src/pipelines_shared/gh_pools.rs b/flowey/flowey_hvlite/src/pipelines_shared/gh_pools.rs index 1f7fb92817..9d7a861e68 100644 --- a/flowey/flowey_hvlite/src/pipelines_shared/gh_pools.rs +++ b/flowey/flowey_hvlite/src/pipelines_shared/gh_pools.rs @@ -5,46 +5,50 @@ use flowey::pipeline::prelude::*; -pub const AMD_POOL_1ES: &str = "openvmm-gh-amd-westus3"; -pub const INTEL_POOL_1ES: &str = "openvmm-gh-intel-westus3"; -pub const ARM_POOL_1ES: &str = "openvmm-gh-arm-westus2"; +pub const AMD_POOL_1ES: &str = "openvmm-gh-amd"; +pub const INTEL_POOL_1ES: &str = "openvmm-gh-intel"; +pub const ARM_POOL_1ES: &str = "openvmm-gh-arm"; -pub const WINDOWS_IMAGE_AMD64: &str = "win-amd64"; -pub const WINDOWS_IMAGE_ARM64: &str = "win-arm64"; -pub const LINUX_IMAGE_AMD64: &str = "ubuntu2404-amd64"; -pub const LINUX_IMAGE_ARM64: &str = "ubuntu2404-arm64"; -pub const MSHV_IMAGE_AMD64: &str = "azurelinux3-amd64-dom0"; +pub const WINDOWS_IMAGE_AMD64: &str = "win-amd64-v2"; +pub const WINDOWS_IMAGE_ARM64: &str = "win-arm64-v2"; +pub const LINUX_IMAGE_AMD64: &str = "ubuntu2404-amd64-v2"; +pub const LINUX_IMAGE_ARM64: &str = "ubuntu2404-arm64-v2"; +pub const MSHV_IMAGE_AMD64: &str = "azurelinux3-amd64-dom0-v2"; -fn gh_pool_with_image_1es(pool: &str, image: &str) -> GhRunner { +pub const WINDOWS_WORK_FOLDER: &str = "E:\\_work"; +pub const LINUX_WORK_FOLDER: &str = "/mnt/azure_nvme_temp/_work"; + +fn gh_pool_with_image_1es(pool: &str, image: &str, work_folder: &str) -> GhRunner { GhRunner::SelfHosted(vec![ "self-hosted".to_string(), format!("1ES.Pool={pool}"), format!("1ES.ImageOverride={image}"), + format!("1ES.WorkFolder={work_folder}"), ]) } pub fn windows_amd_1es() -> GhRunner { - gh_pool_with_image_1es(AMD_POOL_1ES, WINDOWS_IMAGE_AMD64) + gh_pool_with_image_1es(AMD_POOL_1ES, WINDOWS_IMAGE_AMD64, WINDOWS_WORK_FOLDER) } pub fn windows_intel_1es() -> GhRunner { - gh_pool_with_image_1es(INTEL_POOL_1ES, WINDOWS_IMAGE_AMD64) + gh_pool_with_image_1es(INTEL_POOL_1ES, WINDOWS_IMAGE_AMD64, WINDOWS_WORK_FOLDER) } pub fn windows_arm_1es() -> GhRunner { - gh_pool_with_image_1es(ARM_POOL_1ES, WINDOWS_IMAGE_ARM64) + gh_pool_with_image_1es(ARM_POOL_1ES, WINDOWS_IMAGE_ARM64, WINDOWS_WORK_FOLDER) } pub fn linux_arm_1es() -> GhRunner { - gh_pool_with_image_1es(ARM_POOL_1ES, LINUX_IMAGE_ARM64) + gh_pool_with_image_1es(ARM_POOL_1ES, LINUX_IMAGE_ARM64, LINUX_WORK_FOLDER) } pub fn linux_amd_1es() -> GhRunner { - gh_pool_with_image_1es(AMD_POOL_1ES, LINUX_IMAGE_AMD64) + gh_pool_with_image_1es(AMD_POOL_1ES, LINUX_IMAGE_AMD64, LINUX_WORK_FOLDER) } pub fn linux_mshv_1es() -> GhRunner { - gh_pool_with_image_1es(INTEL_POOL_1ES, MSHV_IMAGE_AMD64) + gh_pool_with_image_1es(INTEL_POOL_1ES, MSHV_IMAGE_AMD64, LINUX_WORK_FOLDER) } pub fn windows_x64_gh() -> GhRunner { diff --git a/flowey/flowey_lib_hvlite/src/_jobs/consume_and_test_nextest_vmm_tests_archive.rs b/flowey/flowey_lib_hvlite/src/_jobs/consume_and_test_nextest_vmm_tests_archive.rs index 6cf9e63697..14c6229837 100644 --- a/flowey/flowey_lib_hvlite/src/_jobs/consume_and_test_nextest_vmm_tests_archive.rs +++ b/flowey/flowey_lib_hvlite/src/_jobs/consume_and_test_nextest_vmm_tests_archive.rs @@ -63,6 +63,8 @@ flowey_request! { pub fail_job_on_test_fail: bool, /// If provided, also publish junit.xml test results as an artifact. pub artifact_dir: Option>, + /// Specify where to store temporary files + pub temp_dir: Option, pub done: WriteVar, } } @@ -100,6 +102,7 @@ impl SimpleFlowNode for Node { needs_prep_run, hugetlb_2mb_overcommit_pages, artifact_dir, + temp_dir, done, } = request; @@ -172,6 +175,8 @@ impl SimpleFlowNode for Node { let extra_env = ctx.reqv(|v| crate::init_vmm_tests_env::Request { test_content_dir, + disk_images_dir: Some(disk_images_dir), + temp_dir, vmm_tests_target: target.clone(), register_openvmm, register_openvmm_vhost, @@ -185,7 +190,6 @@ impl SimpleFlowNode for Node { register_tpm_guest_tests_windows, register_tpm_guest_tests_linux, register_test_igvm_agent_rpc_server, - disk_images_dir: Some(disk_images_dir), register_openhcl_igvm_files, get_test_log_path: Some(get_test_log_path), get_env: v, diff --git a/flowey/flowey_lib_hvlite/src/_jobs/local_build_and_run_nextest_vmm_tests.rs b/flowey/flowey_lib_hvlite/src/_jobs/local_build_and_run_nextest_vmm_tests.rs index e00f7e93c3..96eb62be52 100644 --- a/flowey/flowey_lib_hvlite/src/_jobs/local_build_and_run_nextest_vmm_tests.rs +++ b/flowey/flowey_lib_hvlite/src/_jobs/local_build_and_run_nextest_vmm_tests.rs @@ -643,6 +643,8 @@ impl SimpleFlowNode for Node { ..Default::default() }); + let temp_dir = test_content_dir.join("temp"); + ctx.req(crate::download_openvmm_vmm_tests_artifacts::Request::Download(test_artifacts)); let test_artifacts_dir = ctx.reqv(crate::download_openvmm_vmm_tests_artifacts::Request::GetDownloadFolder); @@ -706,6 +708,8 @@ impl SimpleFlowNode for Node { let extra_env = ctx.reqv(|v| crate::init_vmm_tests_env::Request { test_content_dir: ReadVar::from_static(test_content_dir.clone()), + disk_images_dir: Some(test_artifacts_dir), + temp_dir: Some(temp_dir), vmm_tests_target: target_triple.clone(), register_openvmm, register_openvmm_vhost, @@ -719,7 +723,6 @@ impl SimpleFlowNode for Node { register_tpm_guest_tests_windows, register_tpm_guest_tests_linux, register_test_igvm_agent_rpc_server, - disk_images_dir: Some(test_artifacts_dir), register_openhcl_igvm_files, get_test_log_path: None, get_env: v, diff --git a/flowey/flowey_lib_hvlite/src/init_vmm_tests_env.rs b/flowey/flowey_lib_hvlite/src/init_vmm_tests_env.rs index 88073c6e16..1c898eed54 100644 --- a/flowey/flowey_lib_hvlite/src/init_vmm_tests_env.rs +++ b/flowey/flowey_lib_hvlite/src/init_vmm_tests_env.rs @@ -19,6 +19,8 @@ flowey_request! { pub test_content_dir: ReadVar, /// Specify where VMM tests disk images are stored. pub disk_images_dir: Option>, + /// Specify where tempory files used by tests are stored. + pub temp_dir: Option, /// What triple VMM tests are built for. /// /// Used to detect cases of running Windows VMM tests via WSL2, and adjusting @@ -87,6 +89,8 @@ impl SimpleFlowNode for Node { fn process_request(request: Self::Request, ctx: &mut NodeCtx<'_>) -> anyhow::Result<()> { let Request { test_content_dir, + disk_images_dir, + temp_dir, vmm_tests_target, register_openvmm, register_openvmm_vhost, @@ -100,7 +104,6 @@ impl SimpleFlowNode for Node { register_tpm_guest_tests_windows, register_tpm_guest_tests_linux, register_test_igvm_agent_rpc_server, - disk_images_dir, register_openhcl_igvm_files, get_test_log_path, get_env, @@ -131,6 +134,7 @@ impl SimpleFlowNode for Node { ctx.emit_rust_step("setting up vmm_tests env", |ctx| { let test_content_dir = test_content_dir.claim(ctx); + let disk_image_dir = disk_images_dir.claim(ctx); let get_env = get_env.claim(ctx); let get_test_log_path = get_test_log_path.claim(ctx); let openvmm = register_openvmm.claim(ctx); @@ -145,7 +149,6 @@ impl SimpleFlowNode for Node { let test_igvm_agent_rpc_server = register_test_igvm_agent_rpc_server.claim(ctx); let tpm_guest_tests_windows = register_tpm_guest_tests_windows.claim(ctx); let tpm_guest_tests_linux = register_tpm_guest_tests_linux.claim(ctx); - let disk_image_dir = disk_images_dir.claim(ctx); let openhcl_igvm_files = register_openhcl_igvm_files.claim(ctx); let test_linux_initrd = test_linux_initrd.claim(ctx); let test_linux_kernel = test_linux_kernel.claim(ctx); @@ -194,6 +197,8 @@ impl SimpleFlowNode for Node { .as_ref() .map(|p| wsl_convert_path(p)) .transpose()?; + let converted_temp_dir = + temp_dir.as_ref().map(|p| wsl_convert_path(p)).transpose()?; // Make a converted path relative if requested. let make_portable_path = |path: PathBuf| -> anyhow::Result { @@ -250,6 +255,21 @@ impl SimpleFlowNode for Node { ); } + if let Some(temp_dir) = converted_temp_dir { + if !temp_dir.exists() { + fs_err::create_dir_all(&temp_dir)? + }; + match rt.platform().kind() { + FlowPlatformKind::Windows => { + env.insert("TEMP".into(), make_portable_path(temp_dir.clone())?); + env.insert("TMP".into(), make_portable_path(temp_dir)?); + } + FlowPlatformKind::Unix => { + env.insert("TMPDIR".into(), make_portable_path(temp_dir.clone())?); + } + } + } + if disable_remote_artifacts { env.insert("PETRI_REMOTE_ARTIFACTS".into(), "0".into()); } diff --git a/petri/src/vm/hyperv/powershell.rs b/petri/src/vm/hyperv/powershell.rs index e666f21828..c17251be21 100644 --- a/petri/src/vm/hyperv/powershell.rs +++ b/petri/src/vm/hyperv/powershell.rs @@ -438,12 +438,10 @@ impl HyperVNewCustomVMArgs { use crate::IsolationType; use crate::PetriVmgsResource; use crate::SecureBootTemplate; - use petri_artifacts_common::tags::MachineArch; use vmgs_resources::GuestStateEncryptionPolicy; let PetriVmConfig { name, - arch, firmware, memory, proc_topology, @@ -537,19 +535,11 @@ impl HyperVNewCustomVMArgs { vp_count: Some(proc_topology.vp_count as u64), // TODO: fix this mapping, and/or update petri to better match // Hyper-V's capabilities. - apic_mode: proc_topology - .apic_mode - .map(|m| match m { - ApicMode::Xapic => HyperVApicMode::Legacy, - ApicMode::X2apicSupported => HyperVApicMode::X2Apic, - ApicMode::X2apicEnabled => HyperVApicMode::X2Apic, - }) - .or( - (*arch == MachineArch::X86_64 && !properties.is_pcat).then_some({ - // This is necessary for some tests to pass. TODO: fix. - HyperVApicMode::X2Apic - }), - ), + apic_mode: proc_topology.apic_mode.map(|m| match m { + ApicMode::Xapic => HyperVApicMode::Legacy, + ApicMode::X2apicSupported => HyperVApicMode::X2Apic, + ApicMode::X2apicEnabled => HyperVApicMode::X2Apic, + }), hw_threads_per_core: proc_topology.enable_smt.map(|smt| if smt { 2 } else { 1 }), max_processors_per_numa_node: proc_topology.vps_per_socket.map(|v| v as u64), tpm_enabled: { diff --git a/tmk/tmk_tests/src/lib.rs b/tmk/tmk_tests/src/lib.rs index 202633716f..b8ee1b4d10 100644 --- a/tmk/tmk_tests/src/lib.rs +++ b/tmk/tmk_tests/src/lib.rs @@ -9,6 +9,7 @@ use anyhow::Context as _; use pal_async::DefaultDriver; use pal_async::DefaultPool; use pal_async::task::Spawn as _; +use petri::ApicMode; use petri::PetriVm; use petri::PetriVmmBackend; use petri::ProcessorTopology; @@ -230,6 +231,7 @@ fn openvmm_openhcl_tmks( .with_openhcl_agent_file("simple_tmk", artifacts.tmk) .with_processor_topology(ProcessorTopology { vp_count: 1, + apic_mode: Some(ApicMode::X2apicSupported), ..Default::default() }) // TODO: remove once the TMK VMM initializes memory properly. @@ -252,6 +254,7 @@ mod hyperv { use crate::openhcl_tmks_inner; use crate::resolve_openhcl_tmks; use pal_async::DefaultPool; + use petri::ApicMode; use petri::ProcessorTopology; use petri::hyperv::HyperVPetriBackend; @@ -268,6 +271,7 @@ mod hyperv { .with_openhcl_agent_file("simple_tmk", artifacts.tmk) .with_processor_topology(ProcessorTopology { vp_count: 1, + apic_mode: Some(ApicMode::X2apicSupported), ..Default::default() }) .run_without_agent()