From 1eb35450c29def1682e6f73af543d0b35eb96ca0 Mon Sep 17 00:00:00 2001 From: Arseniy Obolenskiy Date: Mon, 8 Jun 2026 18:51:43 +0200 Subject: [PATCH] [CI] Add action for downloading install artifacts --- .github/actions/download-install/action.yml | 35 +++++++++++++++++ .github/workflows/mac.yml | 14 ++----- .github/workflows/perf.yml | 14 ++----- .github/workflows/ubuntu.yml | 42 ++++++--------------- .github/workflows/windows.yml | 24 ++++-------- 5 files changed, 63 insertions(+), 66 deletions(-) create mode 100644 .github/actions/download-install/action.yml diff --git a/.github/actions/download-install/action.yml b/.github/actions/download-install/action.yml new file mode 100644 index 00000000..d2b08385 --- /dev/null +++ b/.github/actions/download-install/action.yml @@ -0,0 +1,35 @@ +name: Download installed package +inputs: + path: + description: Directory to extract into + required: true + name: + description: Artifact name + required: true +runs: + using: composite + steps: + - name: Download artifact + uses: actions/download-artifact@v8 + with: + name: ${{ inputs.name }} + - name: Extract archive (unix) + if: runner.os != 'Windows' + shell: bash + run: | + mkdir -p "${{ inputs.path }}" + tar -xzvf "${{ inputs.name }}.tar.gz" -C "${{ inputs.path }}" + - name: Extract archive (windows) + if: runner.os == 'Windows' + shell: pwsh + run: | + $destination = '${{ inputs.path }}' + $parent = Split-Path -Parent $destination + if ([string]::IsNullOrEmpty($parent)) { + $parent = '.' + } + New-Item -ItemType Directory -Force -Path $parent | Out-Null + Expand-Archive ` + -Path '${{ inputs.name }}.zip' ` + -DestinationPath $parent ` + -Force diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 5bb8dd89..1ccdc9cb 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -73,13 +73,10 @@ jobs: brew install ninja mpich llvm libomp openssl brew link libomp --overwrite --force - name: Download installed package - uses: actions/download-artifact@v8 + uses: ./.github/actions/download-install with: + path: install name: macos-clang-install - - name: Extract installed package - run: | - mkdir -p install - tar -xzvf macos-clang-install.tar.gz -C install - name: Run func tests (MPI) run: scripts/run_tests.py --running-type="processes" --counts 1 2 3 4 env: @@ -105,13 +102,10 @@ jobs: brew install ninja mpich llvm libomp openssl brew link libomp --overwrite --force - name: Download installed package - uses: actions/download-artifact@v8 + uses: ./.github/actions/download-install with: + path: install name: macos-clang-install - - name: Extract installed package - run: | - mkdir -p install - tar -xzvf macos-clang-install.tar.gz -C install - name: Run tests (threads extended) run: scripts/run_tests.py --running-type="threads" --counts 5 7 11 13 env: diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index b6c6d769..55f60339 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -21,13 +21,10 @@ jobs: run: | python3 -m pip install -r requirements.txt --break-system-packages --ignore-installed - name: Download installed package - uses: actions/download-artifact@v8 + uses: ./.github/actions/download-install with: + path: install name: ubuntu-gcc-install-ubuntu-24.04 - - name: Extract installed package - run: | - mkdir -p install - tar -xzvf ubuntu-gcc-install-ubuntu-24.04.tar.gz -C install - name: Run perf tests run: | scripts/run_tests.py --running-type=performance @@ -59,13 +56,10 @@ jobs: brew link libomp --overwrite --force python3 -m pip install -r requirements.txt --break-system-packages - name: Download installed package - uses: actions/download-artifact@v8 + uses: ./.github/actions/download-install with: + path: install name: macos-clang-install - - name: Extract installed package - run: | - mkdir -p install - tar -xzvf macos-clang-install.tar.gz -C install - name: Run perf tests run: | scripts/run_tests.py --running-type=performance diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 01f3106f..0ce3dc90 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -87,13 +87,10 @@ jobs: steps: - uses: actions/checkout@v6 - name: Download installed package - uses: actions/download-artifact@v8 + uses: ./.github/actions/download-install with: + path: install name: ubuntu-gcc-install-${{ matrix.os }} - - name: Extract installed package - run: | - mkdir -p install - tar -xzvf ubuntu-gcc-install-${{ matrix.os }}.tar.gz -C install - name: Run func tests (MPI) run: scripts/run_tests.py --running-type="processes" --counts 1 2 3 4 --additional-mpi-args="--oversubscribe" env: @@ -119,13 +116,10 @@ jobs: steps: - uses: actions/checkout@v6 - name: Download installed package - uses: actions/download-artifact@v8 + uses: ./.github/actions/download-install with: + path: install name: ubuntu-gcc-install-${{ matrix.os }} - - name: Extract installed package - run: | - mkdir -p install - tar -xzvf ubuntu-gcc-install-${{ matrix.os }}.tar.gz -C install - name: Run func tests (threads extended) run: scripts/run_tests.py --running-type="threads" --counts 5 7 11 13 env: @@ -189,13 +183,10 @@ jobs: steps: - uses: actions/checkout@v6 - name: Download installed package - uses: actions/download-artifact@v8 + uses: ./.github/actions/download-install with: + path: install name: ubuntu-clang-install-${{ matrix.os }} - - name: Extract installed package - run: | - mkdir -p install - tar -xzvf ubuntu-clang-install-${{ matrix.os }}.tar.gz -C install - name: Run func tests (MPI) run: scripts/run_tests.py --running-type="processes" --counts 1 2 3 4 --additional-mpi-args="--oversubscribe" env: @@ -221,13 +212,10 @@ jobs: steps: - uses: actions/checkout@v6 - name: Download installed package - uses: actions/download-artifact@v8 + uses: ./.github/actions/download-install with: + path: install name: ubuntu-clang-install-${{ matrix.os }} - - name: Extract installed package - run: | - mkdir -p install - tar -xzvf ubuntu-clang-install-${{ matrix.os }}.tar.gz -C install - name: Run tests (threads extended) run: scripts/run_tests.py --running-type="threads" --counts 5 7 11 13 env: @@ -295,13 +283,10 @@ jobs: steps: - uses: actions/checkout@v6 - name: Download installed package - uses: actions/download-artifact@v8 + uses: ./.github/actions/download-install with: + path: install name: ubuntu-clang-sanitizer-install-${{ matrix.os }} - - name: Extract installed package - run: | - mkdir -p install - tar -xzvf ubuntu-clang-sanitizer-install-${{ matrix.os }}.tar.gz -C install - name: Run tests (MPI) run: scripts/run_tests.py --running-type="processes" --counts 2 --additional-mpi-args="--oversubscribe" env: @@ -333,13 +318,10 @@ jobs: steps: - uses: actions/checkout@v6 - name: Download installed package - uses: actions/download-artifact@v8 + uses: ./.github/actions/download-install with: + path: install name: ubuntu-clang-sanitizer-install-${{ matrix.os }} - - name: Extract installed package - run: | - mkdir -p install - tar -xzvf ubuntu-clang-sanitizer-install-${{ matrix.os }}.tar.gz -C install - name: Run tests (threads extended) run: scripts/run_tests.py --running-type="threads" --counts 5 7 11 13 env: diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 5030054c..0aec815a 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -59,12 +59,10 @@ jobs: - uses: actions/checkout@v6 - uses: ./.github/actions/setup-windows-toolchain - name: Download installed package - uses: actions/download-artifact@v8 + uses: ./.github/actions/download-install with: + path: install name: windows-msvc-install - - name: Extract installed package - run: Expand-Archive -Path .\windows-msvc-install.zip -DestinationPath . -Force - shell: pwsh - name: Run func tests (MPI) run: scripts/run_tests.py --running-type="processes" --counts 1 2 3 4 env: @@ -84,12 +82,10 @@ jobs: - uses: actions/checkout@v6 - uses: ./.github/actions/setup-windows-toolchain - name: Download installed package - uses: actions/download-artifact@v8 + uses: ./.github/actions/download-install with: + path: install name: windows-msvc-install - - name: Extract installed package - run: Expand-Archive -Path .\windows-msvc-install.zip -DestinationPath . -Force - shell: pwsh - name: Run tests (threads extended) run: scripts/run_tests.py --running-type="threads" --counts 5 7 11 13 env: @@ -147,12 +143,10 @@ jobs: - uses: actions/checkout@v6 - uses: ./.github/actions/setup-windows-toolchain - name: Download installed package - uses: actions/download-artifact@v8 + uses: ./.github/actions/download-install with: + path: install name: windows-clang-install - - name: Extract installed package - run: Expand-Archive -Path .\windows-clang-install.zip -DestinationPath . -Force - shell: pwsh - name: Run tests (threads) run: scripts/run_tests.py --running-type="threads" --counts 1 2 3 4 env: @@ -168,12 +162,10 @@ jobs: - uses: actions/checkout@v6 - uses: ./.github/actions/setup-windows-toolchain - name: Download installed package - uses: actions/download-artifact@v8 + uses: ./.github/actions/download-install with: + path: install name: windows-clang-install - - name: Extract installed package - run: Expand-Archive -Path .\windows-clang-install.zip -DestinationPath . -Force - shell: pwsh - name: Run tests (threads extended) run: scripts/run_tests.py --running-type="threads" --counts 5 7 11 13 env: