44jobs :
55 macos-clang-build :
66 runs-on : macOS-latest
7+ strategy :
8+ matrix :
9+ build_type : [Release, Debug]
710 steps :
811 - uses : actions/checkout@v4
912 with :
1013 submodules : recursive
11- - name : Setup environment
12- run : |
13- brew update-reset
14- brew install ninja mpich llvm
15- brew install libomp
16- brew link libomp --overwrite --force
17- brew install openssl
18- brew link openssl --overwrite --force
19- - name : ccache
20- uses :
hendrikmuhs/[email protected] 21- with :
22- key : ${{ runner.os }}-clang
23- create-symlink : true
24- max-size : 1G
25- - name : CMake configure
26- run : >
27- cmake -S . -B build -G Ninja
28- -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
29- -DCMAKE_C_FLAGS="-I$(brew --prefix)/opt/libomp/include"
30- -DCMAKE_CXX_FLAGS="-I$(brew --prefix)/opt/libomp/include"
31- -D CMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=install
32- - name : Build project
33- run : |
34- cmake --build build --parallel
35- - name : Install project
36- run : |
37- cmake --build build --target install
38- - 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
14+ - name : Install Xcode
15+ uses : maxim-lobanov/setup-xcode@v1
4316 with :
44- name : macos-clang-sanitizer-install
45- path : macos-clang-sanitizer-install.tar.gz
46- macos-clang-build-debug :
47- runs-on : macOS-latest
48- steps :
49- - uses : actions/checkout@v4
50- with :
51- submodules : recursive
17+ xcode-version : ' latest-stable'
5218 - name : Setup environment
5319 run : |
5420 brew update-reset
@@ -69,27 +35,28 @@ jobs:
6935 -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
7036 -DCMAKE_C_FLAGS="-I$(brew --prefix)/opt/libomp/include"
7137 -DCMAKE_CXX_FLAGS="-I$(brew --prefix)/opt/libomp/include"
72- -D CMAKE_BUILD_TYPE=DEBUG -DCMAKE_INSTALL_PREFIX=install
38+ -D CMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_INSTALL_PREFIX=install
7339 - name : Build project
7440 run : |
7541 cmake --build build --parallel
7642 - name : Install project
7743 run : |
7844 cmake --build build --target install
7945 - 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
46+ uses : ./.github/actions/archive-install
8447 with :
85- name : macos-clang-debug- install
86- path : macos-clang-debug-install.tar.gz
48+ path : install
49+ name : ${{ matrix.build_type == 'Debug' && ' macos-clang-debug-install' || 'macos-clang-install' }}
8750 macos-clang-test :
8851 needs :
8952 - macos-clang-build
9053 runs-on : macOS-latest
9154 steps :
9255 - uses : actions/checkout@v4
56+ - name : Install Xcode
57+ uses : maxim-lobanov/setup-xcode@v1
58+ with :
59+ xcode-version : ' latest-stable'
9360 - name : Setup environment
9461 run : |
9562 brew update-reset
@@ -101,57 +68,29 @@ jobs:
10168 - name : Download installed package
10269 uses : actions/download-artifact@v4
10370 with :
104- name : macos-clang-sanitizer- install
71+ name : macos-clang-install
10572 - name : Extract installed package
10673 run : |
10774 mkdir -p install
108- tar -xzvf macos-clang-sanitizer-install.tar.gz -C install
109- - name : Run func tests (MPI, num_proc=1)
110- run : python3 scripts/run_tests.py --running-type="processes"
111- env :
112- PPC_NUM_PROC : 1
113- PPC_NUM_THREADS : 3
114- - name : Run func tests (MPI, num_proc=2)
115- run : python3 scripts/run_tests.py --running-type="processes"
116- env :
117- PPC_NUM_PROC : 2
118- PPC_NUM_THREADS : 2
119- - name : Run func tests (MPI, num_proc=3)
120- run : python3 scripts/run_tests.py --running-type="processes"
75+ tar -xzvf macos-clang-install.tar.gz -C install
76+ - name : Run func tests (MPI)
77+ run : python3 scripts/run_tests.py --running-type="processes" --counts 1 2 3 4
12178 env :
122- PPC_NUM_PROC : 3
12379 PPC_NUM_THREADS : 1
124- - name : Run func tests (MPI, num_proc=4)
125- run : python3 scripts/run_tests.py --running-type="processes"
126- env :
127- PPC_NUM_PROC : 4
128- PPC_NUM_THREADS : 1
129- - name : Run tests (threads, num_threads=1)
130- run : python3 scripts/run_tests.py --running-type="threads"
80+ - name : Run tests (threads)
81+ run : python3 scripts/run_tests.py --running-type="threads" --counts 1 2 3 4
13182 env :
13283 PPC_NUM_PROC : 1
133- PPC_NUM_THREADS : 1
134- - name : Run tests (threads, num_threads=2)
135- run : python3 scripts/run_tests.py --running-type="threads"
136- env :
137- PPC_NUM_PROC : 1
138- PPC_NUM_THREADS : 2
139- - name : Run tests (threads, num_threads=3)
140- run : python3 scripts/run_tests.py --running-type="threads"
141- env :
142- PPC_NUM_PROC : 1
143- PPC_NUM_THREADS : 3
144- - name : Run tests (threads, num_threads=4)
145- run : python3 scripts/run_tests.py --running-type="threads"
146- env :
147- PPC_NUM_PROC : 1
148- PPC_NUM_THREADS : 4
14984 macos-clang-test-extended :
15085 needs :
15186 - macos-clang-test
15287 runs-on : macOS-latest
15388 steps :
15489 - uses : actions/checkout@v4
90+ - name : Install Xcode
91+ uses : maxim-lobanov/setup-xcode@v1
92+ with :
93+ xcode-version : ' latest-stable'
15594 - name : Setup environment
15695 run : |
15796 brew update-reset
@@ -163,28 +102,12 @@ jobs:
163102 - name : Download installed package
164103 uses : actions/download-artifact@v4
165104 with :
166- name : macos-clang-sanitizer- install
105+ name : macos-clang-install
167106 - name : Extract installed package
168107 run : |
169108 mkdir -p install
170- tar -xzvf macos-clang-sanitizer-install.tar.gz -C install
171- - name : Run tests (threads, num_threads=5)
172- run : python3 scripts/run_tests.py --running-type="threads"
173- env :
174- PPC_NUM_PROC : 1
175- PPC_NUM_THREADS : 5
176- - name : Run tests (threads, num_threads=7)
177- run : python3 scripts/run_tests.py --running-type="threads"
178- env :
179- PPC_NUM_PROC : 1
180- PPC_NUM_THREADS : 7
181- - name : Run tests (threads, num_threads=11)
182- run : python3 scripts/run_tests.py --running-type="threads"
183- env :
184- PPC_NUM_PROC : 1
185- PPC_NUM_THREADS : 11
186- - name : Run tests (threads, num_threads=13)
187- run : python3 scripts/run_tests.py --running-type="threads"
109+ tar -xzvf macos-clang-install.tar.gz -C install
110+ - name : Run tests (threads extended)
111+ run : python3 scripts/run_tests.py --running-type="threads" --counts 5 7 11 13
188112 env :
189113 PPC_NUM_PROC : 1
190- PPC_NUM_THREADS : 13
0 commit comments