diff --git a/.github/workflows/Benchmarks.yml b/.github/workflows/Benchmarks.yml index f169316a8..33194e3d6 100644 --- a/.github/workflows/Benchmarks.yml +++ b/.github/workflows/Benchmarks.yml @@ -17,33 +17,12 @@ jobs: strategy: fail-fast: true matrix: - include: - - build: windows-2022-release-amd - os: [self-hosted, Windows, X64, "1ES.Pool=hld-win2022-amd"] - hypervisor: hyperv - arch: amd - - build: linux-kvm-release-amd - os: [self-hosted, Linux, X64, "1ES.Pool=hld-kvm-amd"] - hypervisor: kvm - arch: amd - - build: linux-mshv-release-amd - os: [self-hosted, Linux, X64, "1ES.Pool=hld-mshv-amd"] - hypervisor: mshv - arch: amd - - build: windows-2022-release-intel - os: [self-hosted, Windows, X64, "1ES.Pool=hld-win2022-intel"] - hypervisor: hyperv - arch: intel - - build: linux-kvm-release-intel - os: [self-hosted, Linux, X64, "1ES.Pool=hld-kvm-intel"] - hypervisor: kvm - arch: intel - - build: linux-mshv-release-intel - os: [self-hosted, Linux, X64, "1ES.Pool=hld-mshv-intel"] - hypervisor: mshv - arch: intel + hypervisor: [hyperv, mshv, kvm] # hyperv is windows, mshv and kvm are linux + cpu: [amd, intel] + config: [debug, release] - runs-on: ${{ matrix.os }} + runs-on: ${{ fromJson(format('["self-hosted", "{0}", "X64", "1ES.Pool=hld-{1}-{2}"]', matrix.hypervisor == 'hyperv' && 'Windows' || 'Linux', matrix.hypervisor == 'hyperv' && 'win2022' || matrix.hypervisor, matrix.cpu)) }} + steps: ### Setup ### @@ -82,7 +61,7 @@ jobs: run: git fetch --tags origin - name: Download benchmarks from most recent release - run: just bench-download ${{ runner.os }} ${{ matrix.hypervisor }} ${{ matrix.arch }} # skip tag parameter to compare to latest stable release + run: just bench-download ${{ runner.os }} ${{ matrix.hypervisor }} ${{ matrix.cpu }} # skip tag parameter to compare to latest stable release continue-on-error: true env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -92,6 +71,6 @@ jobs: - uses: actions/upload-artifact@v4 with: - name: benchmarks_${{runner.os}}_${{matrix.hypervisor}}_${{ matrix.arch }} + name: benchmarks_${{runner.os}}_${{matrix.hypervisor}}_${{ matrix.cpu }} path: ./target/criterion/ if-no-files-found: error diff --git a/.github/workflows/dep_rust.yml b/.github/workflows/dep_rust.yml index 1abc72732..079373dbc 100644 --- a/.github/workflows/dep_rust.yml +++ b/.github/workflows/dep_rust.yml @@ -26,69 +26,11 @@ jobs: strategy: fail-fast: true matrix: - include: - - build: windows-2022-debug-amd - os: [self-hosted, Windows, X64, "1ES.Pool=hld-win2022-amd"] - hypervisor: hyperv - config: debug - arch: amd - - build: linux-kvm-debug-amd - os: [self-hosted, Linux, X64, "1ES.Pool=hld-kvm-amd"] - hypervisor: kvm - config: debug - arch: amd - - build: linux-mshv-debug-amd - os: [self-hosted, Linux, X64, "1ES.Pool=hld-mshv-amd"] - hypervisor: mshv - config: debug - arch: amd - - build: windows-2022-release-amd - os: [self-hosted, Windows, X64, "1ES.Pool=hld-win2022-amd"] - hypervisor: hyperv - config: release - arch: amd - - build: linux-kvm-release-amd - os: [self-hosted, Linux, X64, "1ES.Pool=hld-kvm-amd"] - hypervisor: kvm - config: release - arch: amd - - build: linux-mshv-release-amd - os: [self-hosted, Linux, X64, "1ES.Pool=hld-mshv-amd"] - hypervisor: mshv - config: release - arch: amd - - build: windows-2022-debug-intel - os: [self-hosted, Windows, X64, "1ES.Pool=hld-win2022-intel"] - hypervisor: hyperv - config: debug - arch: intel - - build: linux-kvm-debug-intel - os: [self-hosted, Linux, X64, "1ES.Pool=hld-kvm-intel"] - hypervisor: kvm - config: debug - arch: intel - - build: linux-mshv-debug-intel - os: [self-hosted, Linux, X64, "1ES.Pool=hld-mshv-intel"] - hypervisor: mshv - config: debug - arch: intel - - build: windows-2022-release-intel - os: [self-hosted, Windows, X64, "1ES.Pool=hld-win2022-intel"] - hypervisor: hyperv - config: release - arch: intel - - build: linux-kvm-release-intel - os: [self-hosted, Linux, X64, "1ES.Pool=hld-kvm-intel"] - hypervisor: kvm - config: release - arch: intel - - build: linux-mshv-release-intel - os: [self-hosted, Linux, X64, "1ES.Pool=hld-mshv-intel"] - hypervisor: mshv - config: release - arch: intel - - runs-on: ${{ matrix.os }} + hypervisor: [hyperv, mshv, kvm] # hyperv is windows, mshv and kvm are linux + cpu: [amd, intel] + config: [debug, release] + + runs-on: ${{ fromJson(format('["self-hosted", "{0}", "X64", "1ES.Pool=hld-{1}-{2}"]', matrix.hypervisor == 'hyperv' && 'Windows' || 'Linux', matrix.hypervisor == 'hyperv' && 'win2022' || matrix.hypervisor, matrix.cpu)) }} steps: - uses: actions/checkout@v4 @@ -160,7 +102,7 @@ jobs: run: sudo apt install gh -y - name: Download benchmarks from "latest" - run: just bench-download ${{ runner.os }} ${{ matrix.hypervisor }} ${{ matrix.arch}} dev-latest # compare to prerelease + run: just bench-download ${{ runner.os }} ${{ matrix.hypervisor }} ${{ matrix.cpu}} dev-latest # compare to prerelease env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} continue-on-error: true diff --git a/Justfile b/Justfile index 15544bdf4..ff655b9eb 100644 --- a/Justfile +++ b/Justfile @@ -165,13 +165,13 @@ run-rust-examples-linux target=default-target: (build-rust target) (run-rust-exa # Downloads the benchmarks result from the given release tag. # If tag is not given, defaults to latest release # Options for os: "Windows", or "Linux" -# Options for Linux hypervisor: "kvm", "hyperv" +# Options for Linux hypervisor: "kvm", "mshv" # Options for Windows hypervisor: "hyperv" -# Options for arch: "amd", "intel" -bench-download os hypervisor arch tag="": - gh release download {{ tag }} -D ./target/ -p benchmarks_{{ os }}_{{ hypervisor }}_{{ arch }}.tar.gz +# Options for cpu: "amd", "intel" +bench-download os hypervisor cpu tag="": + gh release download {{ tag }} -D ./target/ -p benchmarks_{{ os }}_{{ hypervisor }}_{{ cpu }}.tar.gz mkdir -p target/criterion {{ if os() == "windows" { "-Force" } else { "" } }} - tar -zxvf target/benchmarks_{{ os }}_{{ hypervisor }}_{{ arch }}.tar.gz -C target/criterion/ --strip-components=1 + tar -zxvf target/benchmarks_{{ os }}_{{ hypervisor }}_{{ cpu }}.tar.gz -C target/criterion/ --strip-components=1 # Warning: compares to and then OVERWRITES the given baseline bench-ci baseline target=default-target: