Skip to content

Commit f0549b1

Browse files
authored
Merge branch 'master' into codex/update-lint.yml-to-add-shell-lint-job
2 parents 5b2868f + 7c0dcde commit f0549b1

6 files changed

Lines changed: 80 additions & 124 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Archive installed package
2+
inputs:
3+
path:
4+
description: Directory to archive
5+
required: true
6+
name:
7+
description: Artifact name
8+
required: true
9+
runs:
10+
using: composite
11+
steps:
12+
- id: set-archive
13+
shell: bash
14+
run: |
15+
if [ "${RUNNER_OS}" = "Windows" ]; then
16+
echo "archive=${{ inputs.name }}.zip" >> "$GITHUB_OUTPUT"
17+
else
18+
echo "archive=${{ inputs.name }}.tar.gz" >> "$GITHUB_OUTPUT"
19+
fi
20+
- name: Compress directory (unix)
21+
if: runner.os != 'Windows'
22+
shell: bash
23+
run: tar -czvf "${{ steps.set-archive.outputs.archive }}" -C "${{ inputs.path }}" .
24+
- name: Compress directory (windows)
25+
if: runner.os == 'Windows'
26+
shell: pwsh
27+
run: Compress-Archive -Path ${{ inputs.path }} -DestinationPath ${{ steps.set-archive.outputs.archive }}
28+
- name: Upload artifact
29+
uses: actions/upload-artifact@v4
30+
with:
31+
name: ${{ inputs.name }}
32+
path: ${{ steps.set-archive.outputs.archive }}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: 'Setup Windows Toolchain'
2+
description: 'Configure msbuild, MPI, ccache, ninja, and MSVC'
3+
runs:
4+
using: 'composite'
5+
steps:
6+
- name: Add msbuild to PATH
7+
uses: microsoft/setup-msbuild@v2
8+
with:
9+
vs-version: 'latest'
10+
- name: Setup MPI
11+
uses: mpi4py/setup-mpi@v1
12+
with:
13+
mpi: msmpi
14+
- name: Setup ccache
15+
uses: Chocobo1/setup-ccache-action@v1
16+
with:
17+
windows_compile_environment: msvc
18+
- name: Setup ninja
19+
uses: seanmiddleditch/gha-setup-ninja@v6
20+
- name: Setup MSVC for Ninja again
21+
uses: ilammy/msvc-dev-cmd@v1

.github/workflows/mac.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,10 @@ jobs:
3636
run: |
3737
cmake --build build --target install
3838
- name: Archive installed package
39-
run: |
40-
tar -czvf macos-clang-sanitizer-install.tar.gz -C install .
41-
- name: Upload installed package
42-
uses: actions/upload-artifact@v4
39+
uses: ./.github/actions/archive-install
4340
with:
41+
path: install
4442
name: macos-clang-sanitizer-install
45-
path: macos-clang-sanitizer-install.tar.gz
4643
macos-clang-build-debug:
4744
runs-on: macOS-latest
4845
steps:
@@ -77,13 +74,10 @@ jobs:
7774
run: |
7875
cmake --build build --target install
7976
- name: Archive installed package
80-
run: |
81-
tar -czvf macos-clang-debug-install.tar.gz -C install .
82-
- name: Upload installed package
83-
uses: actions/upload-artifact@v4
77+
uses: ./.github/actions/archive-install
8478
with:
79+
path: install
8580
name: macos-clang-debug-install
86-
path: macos-clang-debug-install.tar.gz
8781
macos-clang-test:
8882
needs:
8983
- macos-clang-build

.github/workflows/ubuntu.yml

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,10 @@ jobs:
4646
run: |
4747
cmake --build build --target install
4848
- name: Archive installed package
49-
run: |
50-
tar -czvf ubuntu-gcc-install-${{ matrix.os }}.tar.gz -C install .
51-
- name: Upload installed package
52-
uses: actions/upload-artifact@v4
49+
uses: ./.github/actions/archive-install
5350
with:
51+
path: install
5452
name: ubuntu-gcc-install-${{ matrix.os }}
55-
path: ubuntu-gcc-install-${{ matrix.os }}.tar.gz
5653
ubuntu-gcc-build-debug:
5754
runs-on: ${{ matrix.os }}
5855
strategy:
@@ -91,13 +88,10 @@ jobs:
9188
run: |
9289
cmake --build build --target install
9390
- name: Archive installed package
94-
run: |
95-
tar -czvf ubuntu-gcc-debug-install-${{ matrix.os }}.tar.gz -C install .
96-
- name: Upload installed package
97-
uses: actions/upload-artifact@v4
91+
uses: ./.github/actions/archive-install
9892
with:
93+
path: install
9994
name: ubuntu-gcc-debug-install-${{ matrix.os }}
100-
path: ubuntu-gcc-debug-install-${{ matrix.os }}.tar.gz
10195
ubuntu-gcc-test:
10296
needs:
10397
- ubuntu-gcc-build
@@ -242,13 +236,10 @@ jobs:
242236
run: |
243237
cmake --build build --target install
244238
- name: Archive installed package
245-
run: |
246-
tar -czvf ubuntu-clang-install-${{ matrix.os }}.tar.gz -C install .
247-
- name: Upload installed package
248-
uses: actions/upload-artifact@v4
239+
uses: ./.github/actions/archive-install
249240
with:
241+
path: install
250242
name: ubuntu-clang-install-${{ matrix.os }}
251-
path: ubuntu-clang-install-${{ matrix.os }}.tar.gz
252243
ubuntu-clang-test:
253244
needs:
254245
- ubuntu-clang-build
@@ -402,13 +393,10 @@ jobs:
402393
run: |
403394
cmake --build build --target install
404395
- name: Archive installed package
405-
run: |
406-
tar -czvf ubuntu-clang-sanitizer-install-${{ matrix.os }}.tar.gz -C install .
407-
- name: Upload installed package
408-
uses: actions/upload-artifact@v4
396+
uses: ./.github/actions/archive-install
409397
with:
398+
path: install
410399
name: ubuntu-clang-sanitizer-install-${{ matrix.os }}
411-
path: ubuntu-clang-sanitizer-install-${{ matrix.os }}.tar.gz
412400
ubuntu-clang-sanitizer-test:
413401
needs:
414402
- ubuntu-clang-sanitizer-build

.github/workflows/windows.yml

Lines changed: 13 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,7 @@ jobs:
1111
- uses: actions/checkout@v4
1212
with:
1313
submodules: recursive
14-
- name: Add msbuild to PATH
15-
uses: microsoft/setup-msbuild@v2
16-
with:
17-
vs-version: 'latest'
18-
- name: Setup MPI
19-
uses: mpi4py/setup-mpi@v1
20-
with:
21-
mpi: msmpi
22-
- name: Setup ccache
23-
uses: Chocobo1/setup-ccache-action@v1
24-
with:
25-
windows_compile_environment: msvc
26-
- name: Setup ninja
27-
uses: seanmiddleditch/gha-setup-ninja@v6
28-
- name: Setup MSVC for Ninja again
29-
uses: ilammy/msvc-dev-cmd@v1
14+
- uses: ./.github/actions/setup-windows-toolchain
3015
- name: CMake configure
3116
shell: bash
3217
run: >
@@ -41,13 +26,10 @@ jobs:
4126
run: |
4227
cmake --build build --target install
4328
- name: Archive installed package
44-
run: Compress-Archive -Path install -DestinationPath windows-msvc-install.zip
45-
shell: pwsh
46-
- name: Upload installed package
47-
uses: actions/upload-artifact@v4
29+
uses: ./.github/actions/archive-install
4830
with:
31+
path: install
4932
name: windows-msvc-install
50-
path: windows-msvc-install.zip
5133
windows-msvc-build-debug:
5234
runs-on: windows-latest
5335
defaults:
@@ -57,22 +39,7 @@ jobs:
5739
- uses: actions/checkout@v4
5840
with:
5941
submodules: recursive
60-
- name: Add msbuild to PATH
61-
uses: microsoft/setup-msbuild@v2
62-
with:
63-
vs-version: 'latest'
64-
- name: Setup MPI
65-
uses: mpi4py/setup-mpi@v1
66-
with:
67-
mpi: msmpi
68-
- name: Setup ccache
69-
uses: Chocobo1/setup-ccache-action@v1
70-
with:
71-
windows_compile_environment: msvc
72-
- name: Setup ninja
73-
uses: seanmiddleditch/gha-setup-ninja@v6
74-
- name: Setup MSVC for Ninja again
75-
uses: ilammy/msvc-dev-cmd@v1
42+
- uses: ./.github/actions/setup-windows-toolchain
7643
- name: CMake configure
7744
shell: bash
7845
run: >
@@ -87,13 +54,10 @@ jobs:
8754
run: |
8855
cmake --build build --target install
8956
- name: Archive installed package
90-
run: Compress-Archive -Path install -DestinationPath windows-msvc-debug-install.zip
91-
shell: pwsh
92-
- name: Upload installed package
93-
uses: actions/upload-artifact@v4
57+
uses: ./.github/actions/archive-install
9458
with:
59+
path: install
9560
name: windows-msvc-debug-install
96-
path: windows-msvc-debug-install.zip
9761
windows-msvc-test:
9862
needs:
9963
- windows-msvc-build
@@ -103,14 +67,7 @@ jobs:
10367
shell: bash
10468
steps:
10569
- uses: actions/checkout@v4
106-
- name: Add msbuild to PATH
107-
uses: microsoft/setup-msbuild@v2
108-
with:
109-
vs-version: 'latest'
110-
- name: Setup MPI
111-
uses: mpi4py/setup-mpi@v1
112-
with:
113-
mpi: msmpi
70+
- uses: ./.github/actions/setup-windows-toolchain
11471
- name: Download installed package
11572
uses: actions/download-artifact@v4
11673
with:
@@ -167,14 +124,7 @@ jobs:
167124
shell: bash
168125
steps:
169126
- uses: actions/checkout@v4
170-
- name: Add msbuild to PATH
171-
uses: microsoft/setup-msbuild@v2
172-
with:
173-
vs-version: 'latest'
174-
- name: Setup MPI
175-
uses: mpi4py/setup-mpi@v1
176-
with:
177-
mpi: msmpi
127+
- uses: ./.github/actions/setup-windows-toolchain
178128
- name: Download installed package
179129
uses: actions/download-artifact@v4
180130
with:
@@ -211,24 +161,11 @@ jobs:
211161
- uses: actions/checkout@v4
212162
with:
213163
submodules: recursive
214-
- name: Add msbuild to PATH
215-
uses: microsoft/setup-msbuild@v2
216-
with:
217-
vs-version: 'latest'
164+
- uses: ./.github/actions/setup-windows-toolchain
218165
- name: Setup LLVM
219166
uses: KyleMayes/install-llvm-action@v2
220167
with:
221168
version: "20.1.4"
222-
- name: Setup MPI
223-
uses: mpi4py/setup-mpi@v1
224-
with:
225-
mpi: msmpi
226-
- name: Setup ccache
227-
uses: Chocobo1/setup-ccache-action@v1
228-
with:
229-
windows_compile_environment: msvc
230-
- name: Setup ninja
231-
uses: seanmiddleditch/gha-setup-ninja@v6
232169
- name: CMake configure
233170
run: >
234171
cmake -S . -B build -G Ninja
@@ -249,13 +186,10 @@ jobs:
249186
run: |
250187
cmake --install build
251188
- name: Archive installed package
252-
run: Compress-Archive -Path install -DestinationPath windows-clang-install.zip
253-
shell: pwsh
254-
- name: Upload installed package
255-
uses: actions/upload-artifact@v4
189+
uses: ./.github/actions/archive-install
256190
with:
191+
path: install
257192
name: windows-clang-install
258-
path: windows-clang-install.zip
259193
windows-clang-test:
260194
needs:
261195
- windows-clang-build
@@ -265,14 +199,7 @@ jobs:
265199
shell: bash
266200
steps:
267201
- uses: actions/checkout@v4
268-
- name: Add msbuild to PATH
269-
uses: microsoft/setup-msbuild@v2
270-
with:
271-
vs-version: 'latest'
272-
- name: Setup MPI
273-
uses: mpi4py/setup-mpi@v1
274-
with:
275-
mpi: msmpi
202+
- uses: ./.github/actions/setup-windows-toolchain
276203
- name: Download installed package
277204
uses: actions/download-artifact@v4
278205
with:
@@ -309,14 +236,7 @@ jobs:
309236
shell: bash
310237
steps:
311238
- uses: actions/checkout@v4
312-
- name: Add msbuild to PATH
313-
uses: microsoft/setup-msbuild@v2
314-
with:
315-
vs-version: 'latest'
316-
- name: Setup MPI
317-
uses: mpi4py/setup-mpi@v1
318-
with:
319-
mpi: msmpi
239+
- uses: ./.github/actions/setup-windows-toolchain
320240
- name: Download installed package
321241
uses: actions/download-artifact@v4
322242
with:

scripts/generate_perf_results.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
set -o pipefail
1+
#!/usr/bin/env bash
2+
set -euo pipefail
23

34
mkdir -p build/perf_stat_dir
45
python3 scripts/run_tests.py --running-type="performance" | tee build/perf_stat_dir/perf_log.txt

0 commit comments

Comments
 (0)