|
| 1 | +on: |
| 2 | + workflow_call: |
| 3 | + |
| 4 | +jobs: |
| 5 | + macos-clang-build: |
| 6 | + runs-on: macOS-latest |
| 7 | + steps: |
| 8 | + - uses: actions/checkout@v4 |
| 9 | + with: |
| 10 | + 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 |
| 28 | + -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache |
| 29 | + -G Ninja -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 |
| 32 | + -DCMAKE_INSTALL_PREFIX=install |
| 33 | + - name: Build project |
| 34 | + run: | |
| 35 | + cmake --build build --parallel |
| 36 | + - name: Install project |
| 37 | + run: | |
| 38 | + cmake --build build --target install |
| 39 | + - name: Archive installed package |
| 40 | + run: | |
| 41 | + tar -czvf macos-clang-sanitizer-install.tar.gz -C install . |
| 42 | + - name: Upload installed package |
| 43 | + uses: actions/upload-artifact@v4 |
| 44 | + with: |
| 45 | + name: macos-clang-sanitizer-install |
| 46 | + path: macos-clang-sanitizer-install.tar.gz |
| 47 | + macos-clang-build-debug: |
| 48 | + runs-on: macOS-latest |
| 49 | + steps: |
| 50 | + - uses: actions/checkout@v4 |
| 51 | + with: |
| 52 | + submodules: recursive |
| 53 | + - name: Setup environment |
| 54 | + run: | |
| 55 | + brew update-reset |
| 56 | + brew install ninja mpich llvm |
| 57 | + brew install libomp |
| 58 | + brew link libomp --overwrite --force |
| 59 | + brew install openssl |
| 60 | + brew link openssl --overwrite --force |
| 61 | + - name: ccache |
| 62 | + uses: hendrikmuhs/[email protected] |
| 63 | + with: |
| 64 | + key: ${{ runner.os }}-clang |
| 65 | + create-symlink: true |
| 66 | + max-size: 1G |
| 67 | + - name: CMake configure |
| 68 | + run: > |
| 69 | + cmake -S . -B build |
| 70 | + -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache |
| 71 | + -G Ninja -DCMAKE_C_FLAGS="-I$(brew --prefix)/opt/libomp/include" |
| 72 | + -DCMAKE_CXX_FLAGS="-I$(brew --prefix)/opt/libomp/include" |
| 73 | + -D CMAKE_BUILD_TYPE=DEBUG |
| 74 | + -DCMAKE_INSTALL_PREFIX=install |
| 75 | + - name: Build project |
| 76 | + run: | |
| 77 | + cmake --build build --parallel |
| 78 | + - name: Install project |
| 79 | + run: | |
| 80 | + cmake --build build --target install |
| 81 | + - name: Archive installed package |
| 82 | + run: | |
| 83 | + tar -czvf macos-clang-debug-install.tar.gz -C install . |
| 84 | + - name: Upload installed package |
| 85 | + uses: actions/upload-artifact@v4 |
| 86 | + with: |
| 87 | + name: macos-clang-debug-install |
| 88 | + path: macos-clang-debug-install.tar.gz |
| 89 | + macos-clang-test: |
| 90 | + needs: |
| 91 | + - macos-clang-build |
| 92 | + runs-on: macOS-latest |
| 93 | + steps: |
| 94 | + - uses: actions/checkout@v4 |
| 95 | + - name: Setup environment |
| 96 | + run: | |
| 97 | + brew update-reset |
| 98 | + brew install ninja mpich llvm |
| 99 | + brew install libomp |
| 100 | + brew link libomp --overwrite --force |
| 101 | + brew install openssl |
| 102 | + brew link openssl --overwrite --force |
| 103 | + - name: Download installed package |
| 104 | + uses: actions/download-artifact@v4 |
| 105 | + with: |
| 106 | + name: macos-clang-sanitizer-install |
| 107 | + - name: Extract installed package |
| 108 | + run: | |
| 109 | + mkdir -p install |
| 110 | + tar -xzvf macos-clang-sanitizer-install.tar.gz -C install |
| 111 | + - name: Run func tests (MPI, num_proc=1) |
| 112 | + run: python3 scripts/run_tests.py --running-type="processes" |
| 113 | + env: |
| 114 | + PPC_NUM_PROC: 1 |
| 115 | + PPC_NUM_THREADS: 3 |
| 116 | + - name: Run func tests (MPI, num_proc=2) |
| 117 | + run: python3 scripts/run_tests.py --running-type="processes" |
| 118 | + env: |
| 119 | + PPC_NUM_PROC: 2 |
| 120 | + PPC_NUM_THREADS: 2 |
| 121 | + - name: Run func tests (MPI, num_proc=3) |
| 122 | + run: python3 scripts/run_tests.py --running-type="processes" |
| 123 | + env: |
| 124 | + PPC_NUM_PROC: 3 |
| 125 | + PPC_NUM_THREADS: 1 |
| 126 | + - name: Run func tests (MPI, num_proc=4) |
| 127 | + run: python3 scripts/run_tests.py --running-type="processes" |
| 128 | + env: |
| 129 | + PPC_NUM_PROC: 4 |
| 130 | + PPC_NUM_THREADS: 1 |
| 131 | + - name: Run tests (threads, num_threads=1) |
| 132 | + run: python3 scripts/run_tests.py --running-type="threads" |
| 133 | + env: |
| 134 | + PPC_NUM_THREADS: 1 |
| 135 | + - name: Run tests (threads, num_threads=2) |
| 136 | + run: python3 scripts/run_tests.py --running-type="threads" |
| 137 | + env: |
| 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_THREADS: 3 |
| 143 | + - name: Run tests (threads, num_threads=4) |
| 144 | + run: python3 scripts/run_tests.py --running-type="threads" |
| 145 | + env: |
| 146 | + PPC_NUM_THREADS: 4 |
| 147 | + macos-clang-test-extended: |
| 148 | + needs: |
| 149 | + - macos-clang-test |
| 150 | + runs-on: macOS-latest |
| 151 | + steps: |
| 152 | + - uses: actions/checkout@v4 |
| 153 | + - name: Setup environment |
| 154 | + run: | |
| 155 | + brew update-reset |
| 156 | + brew install ninja mpich llvm |
| 157 | + brew install libomp |
| 158 | + brew link libomp --overwrite --force |
| 159 | + brew install openssl |
| 160 | + brew link openssl --overwrite --force |
| 161 | + - name: Download installed package |
| 162 | + uses: actions/download-artifact@v4 |
| 163 | + with: |
| 164 | + name: macos-clang-sanitizer-install |
| 165 | + - name: Extract installed package |
| 166 | + run: | |
| 167 | + mkdir -p install |
| 168 | + tar -xzvf macos-clang-sanitizer-install.tar.gz -C install |
| 169 | + - name: Run tests (threads, num_threads=5) |
| 170 | + run: python3 scripts/run_tests.py --running-type="threads" |
| 171 | + env: |
| 172 | + PPC_NUM_THREADS: 5 |
| 173 | + - name: Run tests (threads, num_threads=7) |
| 174 | + run: python3 scripts/run_tests.py --running-type="threads" |
| 175 | + env: |
| 176 | + PPC_NUM_THREADS: 7 |
| 177 | + - name: Run tests (threads, num_threads=11) |
| 178 | + run: python3 scripts/run_tests.py --running-type="threads" |
| 179 | + env: |
| 180 | + PPC_NUM_THREADS: 11 |
| 181 | + - name: Run tests (threads, num_threads=13) |
| 182 | + run: python3 scripts/run_tests.py --running-type="threads" |
| 183 | + env: |
| 184 | + PPC_NUM_THREADS: 13 |
0 commit comments