Skip to content

Commit 1eb3545

Browse files
committed
[CI] Add action for downloading install artifacts
1 parent 5ce7bac commit 1eb3545

5 files changed

Lines changed: 63 additions & 66 deletions

File tree

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Download installed package
2+
inputs:
3+
path:
4+
description: Directory to extract into
5+
required: true
6+
name:
7+
description: Artifact name
8+
required: true
9+
runs:
10+
using: composite
11+
steps:
12+
- name: Download artifact
13+
uses: actions/download-artifact@v8
14+
with:
15+
name: ${{ inputs.name }}
16+
- name: Extract archive (unix)
17+
if: runner.os != 'Windows'
18+
shell: bash
19+
run: |
20+
mkdir -p "${{ inputs.path }}"
21+
tar -xzvf "${{ inputs.name }}.tar.gz" -C "${{ inputs.path }}"
22+
- name: Extract archive (windows)
23+
if: runner.os == 'Windows'
24+
shell: pwsh
25+
run: |
26+
$destination = '${{ inputs.path }}'
27+
$parent = Split-Path -Parent $destination
28+
if ([string]::IsNullOrEmpty($parent)) {
29+
$parent = '.'
30+
}
31+
New-Item -ItemType Directory -Force -Path $parent | Out-Null
32+
Expand-Archive `
33+
-Path '${{ inputs.name }}.zip' `
34+
-DestinationPath $parent `
35+
-Force

.github/workflows/mac.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,10 @@ jobs:
7373
brew install ninja mpich llvm libomp openssl
7474
brew link libomp --overwrite --force
7575
- name: Download installed package
76-
uses: actions/download-artifact@v8
76+
uses: ./.github/actions/download-install
7777
with:
78+
path: install
7879
name: macos-clang-install
79-
- name: Extract installed package
80-
run: |
81-
mkdir -p install
82-
tar -xzvf macos-clang-install.tar.gz -C install
8380
- name: Run func tests (MPI)
8481
run: scripts/run_tests.py --running-type="processes" --counts 1 2 3 4
8582
env:
@@ -105,13 +102,10 @@ jobs:
105102
brew install ninja mpich llvm libomp openssl
106103
brew link libomp --overwrite --force
107104
- name: Download installed package
108-
uses: actions/download-artifact@v8
105+
uses: ./.github/actions/download-install
109106
with:
107+
path: install
110108
name: macos-clang-install
111-
- name: Extract installed package
112-
run: |
113-
mkdir -p install
114-
tar -xzvf macos-clang-install.tar.gz -C install
115109
- name: Run tests (threads extended)
116110
run: scripts/run_tests.py --running-type="threads" --counts 5 7 11 13
117111
env:

.github/workflows/perf.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,10 @@ jobs:
2121
run: |
2222
python3 -m pip install -r requirements.txt --break-system-packages --ignore-installed
2323
- name: Download installed package
24-
uses: actions/download-artifact@v8
24+
uses: ./.github/actions/download-install
2525
with:
26+
path: install
2627
name: ubuntu-gcc-install-ubuntu-24.04
27-
- name: Extract installed package
28-
run: |
29-
mkdir -p install
30-
tar -xzvf ubuntu-gcc-install-ubuntu-24.04.tar.gz -C install
3128
- name: Run perf tests
3229
run: |
3330
scripts/run_tests.py --running-type=performance
@@ -59,13 +56,10 @@ jobs:
5956
brew link libomp --overwrite --force
6057
python3 -m pip install -r requirements.txt --break-system-packages
6158
- name: Download installed package
62-
uses: actions/download-artifact@v8
59+
uses: ./.github/actions/download-install
6360
with:
61+
path: install
6462
name: macos-clang-install
65-
- name: Extract installed package
66-
run: |
67-
mkdir -p install
68-
tar -xzvf macos-clang-install.tar.gz -C install
6963
- name: Run perf tests
7064
run: |
7165
scripts/run_tests.py --running-type=performance

.github/workflows/ubuntu.yml

Lines changed: 12 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,10 @@ jobs:
8787
steps:
8888
- uses: actions/checkout@v6
8989
- name: Download installed package
90-
uses: actions/download-artifact@v8
90+
uses: ./.github/actions/download-install
9191
with:
92+
path: install
9293
name: ubuntu-gcc-install-${{ matrix.os }}
93-
- name: Extract installed package
94-
run: |
95-
mkdir -p install
96-
tar -xzvf ubuntu-gcc-install-${{ matrix.os }}.tar.gz -C install
9794
- name: Run func tests (MPI)
9895
run: scripts/run_tests.py --running-type="processes" --counts 1 2 3 4 --additional-mpi-args="--oversubscribe"
9996
env:
@@ -119,13 +116,10 @@ jobs:
119116
steps:
120117
- uses: actions/checkout@v6
121118
- name: Download installed package
122-
uses: actions/download-artifact@v8
119+
uses: ./.github/actions/download-install
123120
with:
121+
path: install
124122
name: ubuntu-gcc-install-${{ matrix.os }}
125-
- name: Extract installed package
126-
run: |
127-
mkdir -p install
128-
tar -xzvf ubuntu-gcc-install-${{ matrix.os }}.tar.gz -C install
129123
- name: Run func tests (threads extended)
130124
run: scripts/run_tests.py --running-type="threads" --counts 5 7 11 13
131125
env:
@@ -189,13 +183,10 @@ jobs:
189183
steps:
190184
- uses: actions/checkout@v6
191185
- name: Download installed package
192-
uses: actions/download-artifact@v8
186+
uses: ./.github/actions/download-install
193187
with:
188+
path: install
194189
name: ubuntu-clang-install-${{ matrix.os }}
195-
- name: Extract installed package
196-
run: |
197-
mkdir -p install
198-
tar -xzvf ubuntu-clang-install-${{ matrix.os }}.tar.gz -C install
199190
- name: Run func tests (MPI)
200191
run: scripts/run_tests.py --running-type="processes" --counts 1 2 3 4 --additional-mpi-args="--oversubscribe"
201192
env:
@@ -221,13 +212,10 @@ jobs:
221212
steps:
222213
- uses: actions/checkout@v6
223214
- name: Download installed package
224-
uses: actions/download-artifact@v8
215+
uses: ./.github/actions/download-install
225216
with:
217+
path: install
226218
name: ubuntu-clang-install-${{ matrix.os }}
227-
- name: Extract installed package
228-
run: |
229-
mkdir -p install
230-
tar -xzvf ubuntu-clang-install-${{ matrix.os }}.tar.gz -C install
231219
- name: Run tests (threads extended)
232220
run: scripts/run_tests.py --running-type="threads" --counts 5 7 11 13
233221
env:
@@ -295,13 +283,10 @@ jobs:
295283
steps:
296284
- uses: actions/checkout@v6
297285
- name: Download installed package
298-
uses: actions/download-artifact@v8
286+
uses: ./.github/actions/download-install
299287
with:
288+
path: install
300289
name: ubuntu-clang-sanitizer-install-${{ matrix.os }}
301-
- name: Extract installed package
302-
run: |
303-
mkdir -p install
304-
tar -xzvf ubuntu-clang-sanitizer-install-${{ matrix.os }}.tar.gz -C install
305290
- name: Run tests (MPI)
306291
run: scripts/run_tests.py --running-type="processes" --counts 2 --additional-mpi-args="--oversubscribe"
307292
env:
@@ -333,13 +318,10 @@ jobs:
333318
steps:
334319
- uses: actions/checkout@v6
335320
- name: Download installed package
336-
uses: actions/download-artifact@v8
321+
uses: ./.github/actions/download-install
337322
with:
323+
path: install
338324
name: ubuntu-clang-sanitizer-install-${{ matrix.os }}
339-
- name: Extract installed package
340-
run: |
341-
mkdir -p install
342-
tar -xzvf ubuntu-clang-sanitizer-install-${{ matrix.os }}.tar.gz -C install
343325
- name: Run tests (threads extended)
344326
run: scripts/run_tests.py --running-type="threads" --counts 5 7 11 13
345327
env:

.github/workflows/windows.yml

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,10 @@ jobs:
5959
- uses: actions/checkout@v6
6060
- uses: ./.github/actions/setup-windows-toolchain
6161
- name: Download installed package
62-
uses: actions/download-artifact@v8
62+
uses: ./.github/actions/download-install
6363
with:
64+
path: install
6465
name: windows-msvc-install
65-
- name: Extract installed package
66-
run: Expand-Archive -Path .\windows-msvc-install.zip -DestinationPath . -Force
67-
shell: pwsh
6866
- name: Run func tests (MPI)
6967
run: scripts/run_tests.py --running-type="processes" --counts 1 2 3 4
7068
env:
@@ -84,12 +82,10 @@ jobs:
8482
- uses: actions/checkout@v6
8583
- uses: ./.github/actions/setup-windows-toolchain
8684
- name: Download installed package
87-
uses: actions/download-artifact@v8
85+
uses: ./.github/actions/download-install
8886
with:
87+
path: install
8988
name: windows-msvc-install
90-
- name: Extract installed package
91-
run: Expand-Archive -Path .\windows-msvc-install.zip -DestinationPath . -Force
92-
shell: pwsh
9389
- name: Run tests (threads extended)
9490
run: scripts/run_tests.py --running-type="threads" --counts 5 7 11 13
9591
env:
@@ -147,12 +143,10 @@ jobs:
147143
- uses: actions/checkout@v6
148144
- uses: ./.github/actions/setup-windows-toolchain
149145
- name: Download installed package
150-
uses: actions/download-artifact@v8
146+
uses: ./.github/actions/download-install
151147
with:
148+
path: install
152149
name: windows-clang-install
153-
- name: Extract installed package
154-
run: Expand-Archive -Path .\windows-clang-install.zip -DestinationPath . -Force
155-
shell: pwsh
156150
- name: Run tests (threads)
157151
run: scripts/run_tests.py --running-type="threads" --counts 1 2 3 4
158152
env:
@@ -168,12 +162,10 @@ jobs:
168162
- uses: actions/checkout@v6
169163
- uses: ./.github/actions/setup-windows-toolchain
170164
- name: Download installed package
171-
uses: actions/download-artifact@v8
165+
uses: ./.github/actions/download-install
172166
with:
167+
path: install
173168
name: windows-clang-install
174-
- name: Extract installed package
175-
run: Expand-Archive -Path .\windows-clang-install.zip -DestinationPath . -Force
176-
shell: pwsh
177169
- name: Run tests (threads extended)
178170
run: scripts/run_tests.py --running-type="threads" --counts 5 7 11 13
179171
env:

0 commit comments

Comments
 (0)