diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 000000000..7ec9eed98 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,21 @@ +on: + workflow_call: + +jobs: + clang-format: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - uses: DoozyX/clang-format-lint-action@v0.20 + with: + source: '.' + clangFormatVersion: 20 + + python-lint: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - name: Install flake8 + run: python3 -m pip install flake8 + - name: Run flake8 + run: python3 -m flake8 . diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml new file mode 100644 index 000000000..a14178ca4 --- /dev/null +++ b/.github/workflows/mac.yml @@ -0,0 +1,184 @@ +on: + workflow_call: + +jobs: + macos-clang-build: + runs-on: macOS-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - name: Setup environment + run: | + brew update-reset + brew install ninja mpich llvm + brew install libomp + brew link libomp --overwrite --force + brew install openssl + brew link openssl --overwrite --force + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ runner.os }}-clang + create-symlink: true + max-size: 1G + - name: CMake configure + run: > + cmake -S . -B build + -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache + -G Ninja -DCMAKE_C_FLAGS="-I$(brew --prefix)/opt/libomp/include" + -DCMAKE_CXX_FLAGS="-I$(brew --prefix)/opt/libomp/include" + -D CMAKE_BUILD_TYPE=RELEASE + -DCMAKE_INSTALL_PREFIX=install + - name: Build project + run: | + cmake --build build --parallel + - name: Install project + run: | + cmake --build build --target install + - name: Archive installed package + run: | + tar -czvf macos-clang-sanitizer-install.tar.gz -C install . + - name: Upload installed package + uses: actions/upload-artifact@v4 + with: + name: macos-clang-sanitizer-install + path: macos-clang-sanitizer-install.tar.gz + macos-clang-build-debug: + runs-on: macOS-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - name: Setup environment + run: | + brew update-reset + brew install ninja mpich llvm + brew install libomp + brew link libomp --overwrite --force + brew install openssl + brew link openssl --overwrite --force + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ runner.os }}-clang + create-symlink: true + max-size: 1G + - name: CMake configure + run: > + cmake -S . -B build + -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache + -G Ninja -DCMAKE_C_FLAGS="-I$(brew --prefix)/opt/libomp/include" + -DCMAKE_CXX_FLAGS="-I$(brew --prefix)/opt/libomp/include" + -D CMAKE_BUILD_TYPE=DEBUG + -DCMAKE_INSTALL_PREFIX=install + - name: Build project + run: | + cmake --build build --parallel + - name: Install project + run: | + cmake --build build --target install + - name: Archive installed package + run: | + tar -czvf macos-clang-debug-install.tar.gz -C install . + - name: Upload installed package + uses: actions/upload-artifact@v4 + with: + name: macos-clang-debug-install + path: macos-clang-debug-install.tar.gz + macos-clang-test: + needs: + - macos-clang-build + runs-on: macOS-latest + steps: + - uses: actions/checkout@v4 + - name: Setup environment + run: | + brew update-reset + brew install ninja mpich llvm + brew install libomp + brew link libomp --overwrite --force + brew install openssl + brew link openssl --overwrite --force + - name: Download installed package + uses: actions/download-artifact@v4 + with: + name: macos-clang-sanitizer-install + - name: Extract installed package + run: | + mkdir -p install + tar -xzvf macos-clang-sanitizer-install.tar.gz -C install + - name: Run func tests (MPI, num_proc=1) + run: python3 scripts/run_tests.py --running-type="processes" + env: + PPC_NUM_PROC: 1 + PPC_NUM_THREADS: 3 + - name: Run func tests (MPI, num_proc=2) + run: python3 scripts/run_tests.py --running-type="processes" + env: + PPC_NUM_PROC: 2 + PPC_NUM_THREADS: 2 + - name: Run func tests (MPI, num_proc=3) + run: python3 scripts/run_tests.py --running-type="processes" + env: + PPC_NUM_PROC: 3 + PPC_NUM_THREADS: 1 + - name: Run func tests (MPI, num_proc=4) + run: python3 scripts/run_tests.py --running-type="processes" + env: + PPC_NUM_PROC: 4 + PPC_NUM_THREADS: 1 + - name: Run tests (threads, num_threads=1) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 1 + - name: Run tests (threads, num_threads=2) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 2 + - name: Run tests (threads, num_threads=3) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 3 + - name: Run tests (threads, num_threads=4) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 4 + macos-clang-test-extended: + needs: + - macos-clang-test + runs-on: macOS-latest + steps: + - uses: actions/checkout@v4 + - name: Setup environment + run: | + brew update-reset + brew install ninja mpich llvm + brew install libomp + brew link libomp --overwrite --force + brew install openssl + brew link openssl --overwrite --force + - name: Download installed package + uses: actions/download-artifact@v4 + with: + name: macos-clang-sanitizer-install + - name: Extract installed package + run: | + mkdir -p install + tar -xzvf macos-clang-sanitizer-install.tar.gz -C install + - name: Run tests (threads, num_threads=5) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 5 + - name: Run tests (threads, num_threads=7) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 7 + - name: Run tests (threads, num_threads=11) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 11 + - name: Run tests (threads, num_threads=13) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 13 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 81e027ac6..67b9b7992 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,1169 +16,23 @@ concurrency: !startsWith(github.ref, 'refs/heads/gh-readonly-queue') }} jobs: - clang-format: - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@v4 - - uses: DoozyX/clang-format-lint-action@v0.20 - with: - source: '.' - clangFormatVersion: 20 - python-lint: - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@v4 - - name: Setup environment - run: | - python3 -m pip install flake8 - - name: Run linter - run: | - python3 -m flake8 . - ubuntu-gcc-build: - needs: - - clang-format - - python-lint - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: ["ubuntu-24.04", "ubuntu-24.04-arm"] - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - name: Setup environment - run: | - sudo apt-get update - sudo apt-get install --no-install-recommends -y gcc-14 g++-14 ninja-build libmpich-dev libomp-dev valgrind - python3 -m pip install -r requirements.txt - - name: ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: ${{ runner.os }}-gcc - create-symlink: true - max-size: 1G - - name: CMake configure - run: > - cmake -S . -B build - -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache - -G Ninja - -D CMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=install - env: - CC: gcc-14 - CXX: g++-14 - - name: Archive revert list - uses: actions/upload-artifact@v4 - if: ${{ matrix.os == 'ubuntu-24.04' }} - with: - name: revert-list - path: build/revert-list.txt - - name: Build project - run: | - cmake --build build --parallel - env: - CC: gcc-14 - CXX: g++-14 - - name: Install project - run: | - cmake --build build --target install - - name: Archive installed package - run: | - tar -czvf ubuntu-gcc-install-${{ matrix.os }}.tar.gz -C install . - - name: Upload installed package - uses: actions/upload-artifact@v4 - with: - name: ubuntu-gcc-install-${{ matrix.os }} - path: ubuntu-gcc-install-${{ matrix.os }}.tar.gz - ubuntu-gcc-build-debug: - needs: - - clang-format - - python-lint - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: ["ubuntu-24.04"] - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - name: Setup environment - run: | - sudo apt-get update - sudo apt-get install --no-install-recommends -y gcc-14 g++-14 ninja-build libmpich-dev libomp-dev valgrind - python3 -m pip install -r requirements.txt - - name: ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: ${{ runner.os }}-gcc - create-symlink: true - max-size: 1G - - name: CMake configure - run: > - cmake -S . -B build - -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache - -G Ninja - -D CMAKE_BUILD_TYPE=DEBUG -DCMAKE_INSTALL_PREFIX=install - env: - CC: gcc-14 - CXX: g++-14 - - name: Build project - run: | - cmake --build build --parallel - env: - CC: gcc-14 - CXX: g++-14 - - name: Install project - run: | - cmake --build build --target install - - name: Archive installed package - run: | - tar -czvf ubuntu-gcc-debug-install-${{ matrix.os }}.tar.gz -C install . - - name: Upload installed package - uses: actions/upload-artifact@v4 - with: - name: ubuntu-gcc-debug-install-${{ matrix.os }} - path: ubuntu-gcc-debug-install-${{ matrix.os }}.tar.gz - ubuntu-gcc-test: - needs: - - ubuntu-gcc-build - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: ["ubuntu-24.04", "ubuntu-24.04-arm"] - steps: - - uses: actions/checkout@v4 - - name: Setup environment - run: | - sudo apt-get update - sudo apt-get install --no-install-recommends -y gcc-14 g++-14 ninja-build libmpich-dev libomp-dev valgrind - python3 -m pip install -r requirements.txt - - name: Download installed package - uses: actions/download-artifact@v4 - with: - 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, num_proc=1) - run: python3 scripts/run_tests.py --running-type="processes" - env: - PPC_NUM_PROC: 1 - PPC_NUM_THREADS: 3 - - name: Run func tests (MPI, num_proc=2) - run: python3 scripts/run_tests.py --running-type="processes" - env: - PPC_NUM_PROC: 2 - PPC_NUM_THREADS: 2 - - name: Run func tests (MPI, num_proc=3) - run: python3 scripts/run_tests.py --running-type="processes" - env: - PPC_NUM_PROC: 3 - PPC_NUM_THREADS: 1 - - name: Run func tests (MPI, num_proc=4) - run: python3 scripts/run_tests.py --running-type="processes" - env: - PPC_NUM_PROC: 4 - PPC_NUM_THREADS: 1 - - name: Run func tests (threads, num_threads=1) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 1 - - name: Run func tests (threads, num_threads=2) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 2 - - name: Run func tests (threads, num_threads=3) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 3 - - name: Run func tests (threads, num_threads=4) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 4 - ubuntu-gcc-test-extended: - needs: - - ubuntu-gcc-test - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: ["ubuntu-24.04", "ubuntu-24.04-arm"] - steps: - - uses: actions/checkout@v4 - - name: Setup environment - run: | - sudo apt-get update - sudo apt-get install --no-install-recommends -y gcc-14 g++-14 ninja-build libmpich-dev libomp-dev valgrind - python3 -m pip install -r requirements.txt - - name: Download installed package - uses: actions/download-artifact@v4 - with: - 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, num_threads=5) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 5 - - name: Run func tests (threads, num_threads=7) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 7 - - name: Run func tests (threads, num_threads=11) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 11 - - name: Run func tests (threads, num_threads=13) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 13 - ubuntu-clang-build: - needs: - - clang-format - - python-lint - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: ["ubuntu-24.04", "ubuntu-24.04-arm"] - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - name: Setup environment - run: | - sudo apt-get update - sudo apt-get install --no-install-recommends -y ninja-build libmpich-dev python3-pip valgrind - wget https://apt.llvm.org/llvm.sh - chmod u+x llvm.sh - sudo ./llvm.sh 20 all - - name: ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: ${{ runner.os }}-clang - create-symlink: true - max-size: 1G - - name: CMake configure - run: > - cmake -S . -B build - -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache - -G Ninja - -D CMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=install - env: - CC: clang-20 - CXX: clang++-20 - - name: Build project - run: | - cmake --build build --parallel - env: - CC: clang-20 - CXX: clang++-20 - - name: Install project - run: | - cmake --build build --target install - - name: Archive installed package - run: | - tar -czvf ubuntu-clang-install-${{ matrix.os }}.tar.gz -C install . - - name: Upload installed package - uses: actions/upload-artifact@v4 - with: - name: ubuntu-clang-install-${{ matrix.os }} - path: ubuntu-clang-install-${{ matrix.os }}.tar.gz - ubuntu-clang-test: - needs: - - ubuntu-clang-build - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: ["ubuntu-24.04", "ubuntu-24.04-arm"] - steps: - - uses: actions/checkout@v4 - - name: Setup environment - run: | - sudo apt-get update - sudo apt-get install --no-install-recommends -y ninja-build libmpich-dev python3-pip valgrind - wget https://apt.llvm.org/llvm.sh - chmod u+x llvm.sh - sudo ./llvm.sh 20 all - - name: Download installed package - uses: actions/download-artifact@v4 - with: - 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, num_proc=1) - run: python3 scripts/run_tests.py --running-type="processes" - env: - PPC_NUM_PROC: 1 - PPC_NUM_THREADS: 3 - - name: Run func tests (MPI, num_proc=2) - run: python3 scripts/run_tests.py --running-type="processes" - env: - PPC_NUM_PROC: 2 - PPC_NUM_THREADS: 2 - - name: Run func tests (MPI, num_proc=3) - run: python3 scripts/run_tests.py --running-type="processes" - env: - PPC_NUM_PROC: 3 - PPC_NUM_THREADS: 1 - - name: Run func tests (MPI, num_proc=4) - run: python3 scripts/run_tests.py --running-type="processes" - env: - PPC_NUM_PROC: 4 - PPC_NUM_THREADS: 1 - - name: Run tests (threads, num_threads=1) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 1 - - name: Run tests (threads, num_threads=2) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 2 - - name: Run tests (threads, num_threads=3) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 3 - - name: Run tests (threads, num_threads=4) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 4 - ubuntu-clang-test-extended: - needs: - - ubuntu-clang-test - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: ["ubuntu-24.04", "ubuntu-24.04-arm"] - steps: - - uses: actions/checkout@v4 - - name: Setup environment - run: | - sudo apt-get update - sudo apt-get install --no-install-recommends -y ninja-build libmpich-dev python3-pip valgrind - wget https://apt.llvm.org/llvm.sh - chmod u+x llvm.sh - sudo ./llvm.sh 20 all - - name: Download installed package - uses: actions/download-artifact@v4 - with: - 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, num_threads=5) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 5 - - name: Run tests (threads, num_threads=7) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 7 - - name: Run tests (threads, num_threads=11) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 11 - - name: Run tests (threads, num_threads=13) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 13 - ubuntu-clang-sanitizer-build: - needs: - - ubuntu-clang-build - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: ["ubuntu-24.04"] - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - name: Setup environment - run: | - sudo apt-get update - sudo apt-get install --no-install-recommends -y ninja-build python3-pip \ - openmpi-bin openmpi-common libopenmpi-dev - wget https://apt.llvm.org/llvm.sh - chmod u+x llvm.sh - sudo ./llvm.sh 20 all - - name: ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: ${{ runner.os }}-clang - create-symlink: true - max-size: 1G - - name: CMake configure - run: > - cmake -S . -B build - -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache - -G Ninja - -D CMAKE_BUILD_TYPE=RELEASE -D ENABLE_ADDRESS_SANITIZER=ON -D ENABLE_UB_SANITIZER=ON - -D CMAKE_INSTALL_PREFIX=install - env: - CC: clang-20 - CXX: clang++-20 - - name: Build project - run: | - cmake --build build --parallel - env: - CC: clang-20 - CXX: clang++-20 - - name: Install project - run: | - cmake --build build --target install - - name: Archive installed package - run: | - tar -czvf ubuntu-clang-sanitizer-install-${{ matrix.os }}.tar.gz -C install . - - name: Upload installed package - uses: actions/upload-artifact@v4 - with: - name: ubuntu-clang-sanitizer-install-${{ matrix.os }} - path: ubuntu-clang-sanitizer-install-${{ matrix.os }}.tar.gz - ubuntu-clang-sanitizer-test: - needs: - - ubuntu-clang-sanitizer-build - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: ["ubuntu-24.04"] - steps: - - uses: actions/checkout@v4 - - name: Setup environment - run: | - sudo apt-get update - sudo apt-get install --no-install-recommends -y ninja-build python3-pip valgrind \ - openmpi-bin openmpi-common libopenmpi-dev - wget https://apt.llvm.org/llvm.sh - chmod u+x llvm.sh - sudo ./llvm.sh 20 all - - name: Download installed package - uses: actions/download-artifact@v4 - with: - 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: python3 scripts/run_tests.py --running-type="processes" --additional-mpi-args="--oversubscribe" - env: - PPC_NUM_PROC: 2 - PPC_NUM_THREADS: 2 - PPC_ASAN_RUN: 1 - ASAN_OPTIONS: abort_on_error=1 - UBSAN_OPTIONS: halt_on_error=1 - - name: Run tests (threads, num_threads=1) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 1 - PPC_ASAN_RUN: 1 - ASAN_OPTIONS: abort_on_error=1 - UBSAN_OPTIONS: halt_on_error=1 - - name: Run tests (threads, num_threads=2) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 2 - PPC_ASAN_RUN: 1 - ASAN_OPTIONS: abort_on_error=1 - UBSAN_OPTIONS: halt_on_error=1 - - name: Run tests (threads, num_threads=3) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 3 - PPC_ASAN_RUN: 1 - ASAN_OPTIONS: abort_on_error=1 - UBSAN_OPTIONS: halt_on_error=1 - - name: Run tests (threads, num_threads=4) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 4 - PPC_ASAN_RUN: 1 - ASAN_OPTIONS: abort_on_error=1 - UBSAN_OPTIONS: halt_on_error=1 - ubuntu-clang-sanitizer-test-extended: - needs: - - ubuntu-clang-sanitizer-test - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: ["ubuntu-24.04"] - steps: - - uses: actions/checkout@v4 - - name: Setup environment - run: | - sudo apt-get update - sudo apt-get install --no-install-recommends -y ninja-build python3-pip valgrind \ - openmpi-bin openmpi-common libopenmpi-dev - wget https://apt.llvm.org/llvm.sh - chmod u+x llvm.sh - sudo ./llvm.sh 20 all - - name: Download installed package - uses: actions/download-artifact@v4 - with: - 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, num_threads=5) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 5 - PPC_ASAN_RUN: 1 - - name: Run tests (threads, num_threads=7) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 7 - PPC_ASAN_RUN: 1 - - name: Run tests (threads, num_threads=11) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 11 - PPC_ASAN_RUN: 1 - - name: Run tests (threads, num_threads=13) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 13 - PPC_ASAN_RUN: 1 - macos-clang-build: - needs: - - clang-format - - python-lint - runs-on: macOS-latest - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - name: Setup environment - run: | - brew update-reset - brew install ninja mpich llvm - brew install libomp - brew link libomp --overwrite --force - brew install openssl - brew link openssl --overwrite --force - - name: ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: ${{ runner.os }}-clang - create-symlink: true - max-size: 1G - - name: CMake configure - run: > - cmake -S . -B build - -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache - -G Ninja -DCMAKE_C_FLAGS="-I$(brew --prefix)/opt/libomp/include" - -DCMAKE_CXX_FLAGS="-I$(brew --prefix)/opt/libomp/include" - -D CMAKE_BUILD_TYPE=RELEASE - -DCMAKE_INSTALL_PREFIX=install - - name: Build project - run: | - cmake --build build --parallel - - name: Install project - run: | - cmake --build build --target install - - name: Archive installed package - run: | - tar -czvf macos-clang-sanitizer-install.tar.gz -C install . - - name: Upload installed package - uses: actions/upload-artifact@v4 - with: - name: macos-clang-sanitizer-install - path: macos-clang-sanitizer-install.tar.gz - macos-clang-build-debug: - needs: - - clang-format - - python-lint - runs-on: macOS-latest - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - name: Setup environment - run: | - brew update-reset - brew install ninja mpich llvm - brew install libomp - brew link libomp --overwrite --force - brew install openssl - brew link openssl --overwrite --force - - name: ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: ${{ runner.os }}-clang - create-symlink: true - max-size: 1G - - name: CMake configure - run: > - cmake -S . -B build - -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache - -G Ninja -DCMAKE_C_FLAGS="-I$(brew --prefix)/opt/libomp/include" - -DCMAKE_CXX_FLAGS="-I$(brew --prefix)/opt/libomp/include" - -D CMAKE_BUILD_TYPE=DEBUG - -DCMAKE_INSTALL_PREFIX=install - - name: Build project - run: | - cmake --build build --parallel - - name: Install project - run: | - cmake --build build --target install - - name: Archive installed package - run: | - tar -czvf macos-clang-debug-install.tar.gz -C install . - - name: Upload installed package - uses: actions/upload-artifact@v4 - with: - name: macos-clang-debug-install - path: macos-clang-debug-install.tar.gz - macos-clang-test: - needs: - - macos-clang-build - runs-on: macOS-latest - steps: - - uses: actions/checkout@v4 - - name: Setup environment - run: | - brew update-reset - brew install ninja mpich llvm - brew install libomp - brew link libomp --overwrite --force - brew install openssl - brew link openssl --overwrite --force - - name: Download installed package - uses: actions/download-artifact@v4 - with: - name: macos-clang-sanitizer-install - - name: Extract installed package - run: | - mkdir -p install - tar -xzvf macos-clang-sanitizer-install.tar.gz -C install - - name: Run func tests (MPI, num_proc=1) - run: python3 scripts/run_tests.py --running-type="processes" - env: - PPC_NUM_PROC: 1 - PPC_NUM_THREADS: 3 - - name: Run func tests (MPI, num_proc=2) - run: python3 scripts/run_tests.py --running-type="processes" - env: - PPC_NUM_PROC: 2 - PPC_NUM_THREADS: 2 - - name: Run func tests (MPI, num_proc=3) - run: python3 scripts/run_tests.py --running-type="processes" - env: - PPC_NUM_PROC: 3 - PPC_NUM_THREADS: 1 - - name: Run func tests (MPI, num_proc=4) - run: python3 scripts/run_tests.py --running-type="processes" - env: - PPC_NUM_PROC: 4 - PPC_NUM_THREADS: 1 - - name: Run tests (threads, num_threads=1) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 1 - - name: Run tests (threads, num_threads=2) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 2 - - name: Run tests (threads, num_threads=3) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 3 - - name: Run tests (threads, num_threads=4) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 4 - macos-clang-test-extended: - needs: - - macos-clang-test - runs-on: macOS-latest - steps: - - uses: actions/checkout@v4 - - name: Setup environment - run: | - brew update-reset - brew install ninja mpich llvm - brew install libomp - brew link libomp --overwrite --force - brew install openssl - brew link openssl --overwrite --force - - name: Download installed package - uses: actions/download-artifact@v4 - with: - name: macos-clang-sanitizer-install - - name: Extract installed package - run: | - mkdir -p install - tar -xzvf macos-clang-sanitizer-install.tar.gz -C install - - name: Run tests (threads, num_threads=5) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 5 - - name: Run tests (threads, num_threads=7) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 7 - - name: Run tests (threads, num_threads=11) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 11 - - name: Run tests (threads, num_threads=13) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 13 - windows-msvc-build: - needs: - - clang-format - - python-lint - runs-on: windows-latest - defaults: - run: - shell: bash - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v2 - with: - vs-version: 'latest' - - name: Setup MPI - uses: mpi4py/setup-mpi@v1 - with: - mpi: msmpi - - name: Setup ccache - uses: Chocobo1/setup-ccache-action@v1 - with: - windows_compile_environment: msvc - - name: Setup ninja - uses: seanmiddleditch/gha-setup-ninja@v6 - - name: Setup MSVC for Ninja again - uses: ilammy/msvc-dev-cmd@v1 - - name: CMake configure - shell: bash - run: > - cmake -S . -B build -G Ninja -D CMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl - -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache - -D CMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=install - - name: Build project - shell: bash - run: | - cmake --build build --config Release --parallel - - name: Install project - run: | - cmake --build build --target install - - name: Archive installed package - run: Compress-Archive -Path install -DestinationPath windows-msvc-install.zip - shell: pwsh - - name: Upload installed package - uses: actions/upload-artifact@v4 - with: - name: windows-msvc-install - path: windows-msvc-install.zip - windows-msvc-build-debug: - needs: - - clang-format - - python-lint - runs-on: windows-latest - defaults: - run: - shell: bash - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v2 - with: - vs-version: 'latest' - - name: Setup MPI - uses: mpi4py/setup-mpi@v1 - with: - mpi: msmpi - - name: Setup ccache - uses: Chocobo1/setup-ccache-action@v1 - with: - windows_compile_environment: msvc - - name: Setup ninja - uses: seanmiddleditch/gha-setup-ninja@v6 - - name: Setup MSVC for Ninja again - uses: ilammy/msvc-dev-cmd@v1 - - name: CMake configure - shell: bash - run: > - cmake -S . -B build -G Ninja -D CMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl - -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache - -D CMAKE_BUILD_TYPE=DEBUG -DCMAKE_INSTALL_PREFIX=install - - name: Build project - shell: bash - run: | - cmake --build build --config Debug --parallel - - name: Install project - run: | - cmake --build build --target install - - name: Archive installed package - run: Compress-Archive -Path install -DestinationPath windows-msvc-debug-install.zip - shell: pwsh - - name: Upload installed package - uses: actions/upload-artifact@v4 - with: - name: windows-msvc-debug-install - path: windows-msvc-debug-install.zip - windows-msvc-test: - needs: - - windows-msvc-build - runs-on: windows-latest - defaults: - run: - shell: bash - steps: - - uses: actions/checkout@v4 - - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v2 - with: - vs-version: 'latest' - - name: Setup MPI - uses: mpi4py/setup-mpi@v1 - with: - mpi: msmpi - - name: Download installed package - uses: actions/download-artifact@v4 - with: - 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, num_proc=1) - run: python3 scripts/run_tests.py --running-type="processes" - env: - PPC_NUM_PROC: 1 - PPC_NUM_THREADS: 3 - - name: Run func tests (MPI, num_proc=2) - run: python3 scripts/run_tests.py --running-type="processes" - env: - PPC_NUM_PROC: 2 - PPC_NUM_THREADS: 2 - - name: Run func tests (MPI, num_proc=3) - run: python3 scripts/run_tests.py --running-type="processes" - env: - PPC_NUM_PROC: 3 - PPC_NUM_THREADS: 1 - - name: Run func tests (MPI, num_proc=4) - run: python3 scripts/run_tests.py --running-type="processes" - env: - PPC_NUM_PROC: 4 - PPC_NUM_THREADS: 1 - - name: Run tests (threads, num_threads=1) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 1 - - name: Run tests (threads, num_threads=2) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 2 - - name: Run tests (threads, num_threads=3) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 3 - - name: Run tests (threads, num_threads=4) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 4 - windows-msvc-test-extended: - needs: - - windows-msvc-test - runs-on: windows-latest - defaults: - run: - shell: bash - steps: - - uses: actions/checkout@v4 - - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v2 - with: - vs-version: 'latest' - - name: Setup MPI - uses: mpi4py/setup-mpi@v1 - with: - mpi: msmpi - - name: Download installed package - uses: actions/download-artifact@v4 - with: - name: windows-msvc-install - - name: Extract installed package - run: Expand-Archive -Path .\windows-msvc-install.zip -DestinationPath . -Force - shell: pwsh - - name: Run tests (threads, num_threads=5) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 5 - - name: Run tests (threads, num_threads=7) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 7 - - name: Run tests (threads, num_threads=11) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 11 - - name: Run tests (threads, num_threads=13) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 13 - windows-clang-build: - needs: - - clang-format - - python-lint - runs-on: windows-latest - defaults: - run: - shell: bash - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v2 - with: - vs-version: 'latest' - - name: Setup MPI - uses: mpi4py/setup-mpi@v1 - with: - mpi: msmpi - - name: Setup ccache - uses: Chocobo1/setup-ccache-action@v1 - with: - windows_compile_environment: msvc - - name: Setup ninja - uses: seanmiddleditch/gha-setup-ninja@v6 - - name: Setup MSVC for Ninja again - uses: ilammy/msvc-dev-cmd@v1 - - name: CMake configure - run: > - cmake -S . -B build -G Ninja -D CMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl - -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache - -D CMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=install - env: - CC: clang-cl - CXX: clang-cl - - name: Build project - run: | - cmake --build build --config Release --parallel - env: - CC: clang-cl - CXX: clang-cl - - name: Install project - run: | - cmake --install build - - name: Archive installed package - run: Compress-Archive -Path install -DestinationPath windows-clang-install.zip - shell: pwsh - - name: Upload installed package - uses: actions/upload-artifact@v4 - with: - name: windows-clang-install - path: windows-clang-install.zip - windows-clang-test: - needs: - - windows-clang-build - runs-on: windows-latest - defaults: - run: - shell: bash - steps: - - uses: actions/checkout@v4 - - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v2 - with: - vs-version: 'latest' - - name: Setup MPI - uses: mpi4py/setup-mpi@v1 - with: - mpi: msmpi - - name: Download installed package - uses: actions/download-artifact@v4 - with: - name: windows-clang-install - - name: Extract installed package - run: Expand-Archive -Path .\windows-clang-install.zip -DestinationPath . -Force - shell: pwsh - - name: Run tests (threads, num_threads=1) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 1 - - name: Run tests (threads, num_threads=2) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 2 - - name: Run tests (threads, num_threads=3) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 3 - - name: Run tests (threads, num_threads=4) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 4 - windows-clang-test-extended: - needs: - - windows-clang-test - runs-on: windows-latest - defaults: - run: - shell: bash - steps: - - uses: actions/checkout@v4 - - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v2 - with: - vs-version: 'latest' - - name: Setup MPI - uses: mpi4py/setup-mpi@v1 - with: - mpi: msmpi - - name: Download installed package - uses: actions/download-artifact@v4 - with: - name: windows-clang-install - - name: Extract installed package - run: Expand-Archive -Path .\windows-clang-install.zip -DestinationPath . -Force - shell: pwsh - - name: Run tests (threads, num_threads=5) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 5 - - name: Run tests (threads, num_threads=7) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 7 - - name: Run tests (threads, num_threads=11) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 11 - - name: Run tests (threads, num_threads=13) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 13 - ubuntu-gcc-build-codecov: - needs: - - ubuntu-gcc-test-extended - - ubuntu-clang-test-extended - - macos-clang-test-extended - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - name: Setup environment - run: | - sudo apt-get update - sudo apt-get install --no-install-recommends -y \ - gcc-14 g++-14 ninja-build libmpich-dev libomp-dev valgrind gcovr - - name: ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: ${{ runner.os }}-gcc - create-symlink: true - max-size: 1G - - name: CMake configure - run: > - cmake -S . -B build - -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache - -D CMAKE_BUILD_TYPE=RELEASE - -D CMAKE_VERBOSE_MAKEFILE=ON -D USE_COVERAGE=ON - - name: Build project - run: | - cmake --build build --parallel - - name: Run tests (MPI) - run: python3 scripts/run_tests.py --running-type="processes" - env: - PPC_NUM_PROC: 2 - PPC_NUM_THREADS: 2 - - name: Run tests (threads, num_threads=1) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 1 - - name: Run tests (threads, num_threads=2) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 2 - - name: Run tests (threads, num_threads=3) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 3 - - name: Run tests (threads, num_threads=4) - run: python3 scripts/run_tests.py --running-type="threads" - env: - PPC_NUM_THREADS: 4 - - name: Generate gcovr Coverage Data - run: | - mkdir cov-report - cd build - gcovr -r ../ \ - --exclude '.*3rdparty/.*' \ - --exclude '/usr/.*' \ - --exclude '.*/perf_tests/.*' \ - --exclude '.*/func_tests/.*' \ - --exclude '.*/all/runner.cpp' \ - --exclude '.*/mpi/runner.cpp' \ - --exclude '.*/omp/runner.cpp' \ - --exclude '.*/seq/runner.cpp' \ - --exclude '.*/stl/runner.cpp' \ - --exclude '.*/tbb/runner.cpp' \ - --xml --output ../coverage.xml \ - --html=../cov-report/index.html --html-details - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v5.4.3 - with: - files: coverage.xml - - name: Upload coverage report artifact - uses: actions/upload-artifact@v4 - with: - name: cov-report - path: 'cov-report' - ubuntu-gcc-build-perf-stats: - needs: - - ubuntu-gcc-build-codecov - - ubuntu-gcc-test-extended - - ubuntu-clang-sanitizer-test-extended - - ubuntu-clang-test-extended - - windows-clang-test-extended - - windows-msvc-test-extended - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@v4 - - name: Setup environment - run: | - sudo apt-get update - sudo apt-get install --no-install-recommends -y gcc-14 g++-14 ninja-build libmpich-dev libomp-dev valgrind - python3 -m pip install -r requirements.txt - - name: Download installed package - uses: actions/download-artifact@v4 - with: - 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 count checker - run: | - python3 scripts/run_perf_counter.py --required-tests-number=2 - env: - PPC_NUM_THREADS: 2 - PPC_NUM_PROC: 2 - - name: Run perf tests - run: | - bash -e scripts/generate_perf_results.sh - env: - PPC_NUM_THREADS: 2 - PPC_NUM_PROC: 2 - - name: Archive results - uses: montudor/action-zip@v1 - with: - args: zip -qq -r perf-stat.zip build/perf_stat_dir - - name: Upload results - uses: actions/upload-artifact@v4 - with: - name: perf-stat - path: perf-stat.zip + lint: + uses: ./.github/workflows/lint.yml + ubuntu: + needs: + - lint + uses: ./.github/workflows/ubuntu.yml + mac: + needs: + - lint + uses: ./.github/workflows/mac.yml + windows: + needs: + - lint + uses: ./.github/workflows/windows.yml + perf: + needs: + - ubuntu + - mac + - windows + uses: ./.github/workflows/perf.yml diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml new file mode 100644 index 000000000..4e45995de --- /dev/null +++ b/.github/workflows/perf.yml @@ -0,0 +1,42 @@ +on: + workflow_call: + +jobs: + ubuntu-gcc-build-perf-stats: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - name: Setup environment + run: | + sudo apt-get update + sudo apt-get install --no-install-recommends -y gcc-14 g++-14 ninja-build libmpich-dev libomp-dev valgrind + python3 -m pip install -r requirements.txt + - name: Download installed package + uses: actions/download-artifact@v4 + with: + 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 count checker + run: | + python3 scripts/run_perf_counter.py --required-tests-number=2 + env: + PPC_NUM_THREADS: 2 + PPC_NUM_PROC: 2 + - name: Run perf tests + run: | + bash -e scripts/generate_perf_results.sh + env: + PPC_NUM_THREADS: 2 + PPC_NUM_PROC: 2 + - name: Archive results + uses: montudor/action-zip@v1 + with: + args: zip -qq -r perf-stat.zip build/perf_stat_dir + - name: Upload results + uses: actions/upload-artifact@v4 + with: + name: perf-stat + path: perf-stat.zip diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml new file mode 100644 index 000000000..816d72fc2 --- /dev/null +++ b/.github/workflows/ubuntu.yml @@ -0,0 +1,580 @@ +on: + workflow_call: + +jobs: + ubuntu-gcc-build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: ["ubuntu-24.04", "ubuntu-24.04-arm"] + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - name: Setup environment + run: | + sudo apt-get update + sudo apt-get install --no-install-recommends -y gcc-14 g++-14 ninja-build libmpich-dev libomp-dev valgrind + python3 -m pip install -r requirements.txt + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ runner.os }}-gcc + create-symlink: true + max-size: 1G + - name: CMake configure + run: > + cmake -S . -B build + -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache + -G Ninja + -D CMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=install + env: + CC: gcc-14 + CXX: g++-14 + - name: Archive revert list + uses: actions/upload-artifact@v4 + if: ${{ matrix.os == 'ubuntu-24.04' }} + with: + name: revert-list + path: build/revert-list.txt + - name: Build project + run: | + cmake --build build --parallel + env: + CC: gcc-14 + CXX: g++-14 + - name: Install project + run: | + cmake --build build --target install + - name: Archive installed package + run: | + tar -czvf ubuntu-gcc-install-${{ matrix.os }}.tar.gz -C install . + - name: Upload installed package + uses: actions/upload-artifact@v4 + with: + name: ubuntu-gcc-install-${{ matrix.os }} + path: ubuntu-gcc-install-${{ matrix.os }}.tar.gz + ubuntu-gcc-build-debug: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: ["ubuntu-24.04"] + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - name: Setup environment + run: | + sudo apt-get update + sudo apt-get install --no-install-recommends -y gcc-14 g++-14 ninja-build libmpich-dev libomp-dev valgrind + python3 -m pip install -r requirements.txt + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ runner.os }}-gcc + create-symlink: true + max-size: 1G + - name: CMake configure + run: > + cmake -S . -B build + -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache + -G Ninja + -D CMAKE_BUILD_TYPE=DEBUG -DCMAKE_INSTALL_PREFIX=install + env: + CC: gcc-14 + CXX: g++-14 + - name: Build project + run: | + cmake --build build --parallel + env: + CC: gcc-14 + CXX: g++-14 + - name: Install project + run: | + cmake --build build --target install + - name: Archive installed package + run: | + tar -czvf ubuntu-gcc-debug-install-${{ matrix.os }}.tar.gz -C install . + - name: Upload installed package + uses: actions/upload-artifact@v4 + with: + name: ubuntu-gcc-debug-install-${{ matrix.os }} + path: ubuntu-gcc-debug-install-${{ matrix.os }}.tar.gz + ubuntu-gcc-test: + needs: + - ubuntu-gcc-build + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: ["ubuntu-24.04", "ubuntu-24.04-arm"] + steps: + - uses: actions/checkout@v4 + - name: Setup environment + run: | + sudo apt-get update + sudo apt-get install --no-install-recommends -y gcc-14 g++-14 ninja-build libmpich-dev libomp-dev valgrind + python3 -m pip install -r requirements.txt + - name: Download installed package + uses: actions/download-artifact@v4 + with: + 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, num_proc=1) + run: python3 scripts/run_tests.py --running-type="processes" + env: + PPC_NUM_PROC: 1 + PPC_NUM_THREADS: 3 + - name: Run func tests (MPI, num_proc=2) + run: python3 scripts/run_tests.py --running-type="processes" + env: + PPC_NUM_PROC: 2 + PPC_NUM_THREADS: 2 + - name: Run func tests (MPI, num_proc=3) + run: python3 scripts/run_tests.py --running-type="processes" + env: + PPC_NUM_PROC: 3 + PPC_NUM_THREADS: 1 + - name: Run func tests (MPI, num_proc=4) + run: python3 scripts/run_tests.py --running-type="processes" + env: + PPC_NUM_PROC: 4 + PPC_NUM_THREADS: 1 + - name: Run func tests (threads, num_threads=1) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 1 + - name: Run func tests (threads, num_threads=2) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 2 + - name: Run func tests (threads, num_threads=3) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 3 + - name: Run func tests (threads, num_threads=4) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 4 + ubuntu-gcc-test-extended: + needs: + - ubuntu-gcc-test + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: ["ubuntu-24.04", "ubuntu-24.04-arm"] + steps: + - uses: actions/checkout@v4 + - name: Setup environment + run: | + sudo apt-get update + sudo apt-get install --no-install-recommends -y gcc-14 g++-14 ninja-build libmpich-dev libomp-dev valgrind + python3 -m pip install -r requirements.txt + - name: Download installed package + uses: actions/download-artifact@v4 + with: + 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, num_threads=5) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 5 + - name: Run func tests (threads, num_threads=7) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 7 + - name: Run func tests (threads, num_threads=11) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 11 + - name: Run func tests (threads, num_threads=13) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 13 + ubuntu-clang-build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: ["ubuntu-24.04", "ubuntu-24.04-arm"] + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - name: Setup environment + run: | + sudo apt-get update + sudo apt-get install --no-install-recommends -y ninja-build libmpich-dev python3-pip valgrind + wget https://apt.llvm.org/llvm.sh + chmod u+x llvm.sh + sudo ./llvm.sh 20 all + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ runner.os }}-clang + create-symlink: true + max-size: 1G + - name: CMake configure + run: > + cmake -S . -B build + -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache + -G Ninja + -D CMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=install + env: + CC: clang-20 + CXX: clang++-20 + - name: Build project + run: | + cmake --build build --parallel + env: + CC: clang-20 + CXX: clang++-20 + - name: Install project + run: | + cmake --build build --target install + - name: Archive installed package + run: | + tar -czvf ubuntu-clang-install-${{ matrix.os }}.tar.gz -C install . + - name: Upload installed package + uses: actions/upload-artifact@v4 + with: + name: ubuntu-clang-install-${{ matrix.os }} + path: ubuntu-clang-install-${{ matrix.os }}.tar.gz + ubuntu-clang-test: + needs: + - ubuntu-clang-build + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: ["ubuntu-24.04", "ubuntu-24.04-arm"] + steps: + - uses: actions/checkout@v4 + - name: Setup environment + run: | + sudo apt-get update + sudo apt-get install --no-install-recommends -y ninja-build libmpich-dev python3-pip valgrind + wget https://apt.llvm.org/llvm.sh + chmod u+x llvm.sh + sudo ./llvm.sh 20 all + - name: Download installed package + uses: actions/download-artifact@v4 + with: + 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, num_proc=1) + run: python3 scripts/run_tests.py --running-type="processes" + env: + PPC_NUM_PROC: 1 + PPC_NUM_THREADS: 3 + - name: Run func tests (MPI, num_proc=2) + run: python3 scripts/run_tests.py --running-type="processes" + env: + PPC_NUM_PROC: 2 + PPC_NUM_THREADS: 2 + - name: Run func tests (MPI, num_proc=3) + run: python3 scripts/run_tests.py --running-type="processes" + env: + PPC_NUM_PROC: 3 + PPC_NUM_THREADS: 1 + - name: Run func tests (MPI, num_proc=4) + run: python3 scripts/run_tests.py --running-type="processes" + env: + PPC_NUM_PROC: 4 + PPC_NUM_THREADS: 1 + - name: Run tests (threads, num_threads=1) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 1 + - name: Run tests (threads, num_threads=2) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 2 + - name: Run tests (threads, num_threads=3) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 3 + - name: Run tests (threads, num_threads=4) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 4 + ubuntu-clang-test-extended: + needs: + - ubuntu-clang-test + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: ["ubuntu-24.04", "ubuntu-24.04-arm"] + steps: + - uses: actions/checkout@v4 + - name: Setup environment + run: | + sudo apt-get update + sudo apt-get install --no-install-recommends -y ninja-build libmpich-dev python3-pip valgrind + wget https://apt.llvm.org/llvm.sh + chmod u+x llvm.sh + sudo ./llvm.sh 20 all + - name: Download installed package + uses: actions/download-artifact@v4 + with: + 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, num_threads=5) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 5 + - name: Run tests (threads, num_threads=7) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 7 + - name: Run tests (threads, num_threads=11) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 11 + - name: Run tests (threads, num_threads=13) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 13 + ubuntu-clang-sanitizer-build: + needs: + - ubuntu-clang-build + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: ["ubuntu-24.04"] + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - name: Setup environment + run: | + sudo apt-get update + sudo apt-get install --no-install-recommends -y ninja-build python3-pip \ + openmpi-bin openmpi-common libopenmpi-dev + wget https://apt.llvm.org/llvm.sh + chmod u+x llvm.sh + sudo ./llvm.sh 20 all + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ runner.os }}-clang + create-symlink: true + max-size: 1G + - name: CMake configure + run: > + cmake -S . -B build + -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache + -G Ninja + -D CMAKE_BUILD_TYPE=RELEASE -D ENABLE_ADDRESS_SANITIZER=ON -D ENABLE_UB_SANITIZER=ON + -D CMAKE_INSTALL_PREFIX=install + env: + CC: clang-20 + CXX: clang++-20 + - name: Build project + run: | + cmake --build build --parallel + env: + CC: clang-20 + CXX: clang++-20 + - name: Install project + run: | + cmake --build build --target install + - name: Archive installed package + run: | + tar -czvf ubuntu-clang-sanitizer-install-${{ matrix.os }}.tar.gz -C install . + - name: Upload installed package + uses: actions/upload-artifact@v4 + with: + name: ubuntu-clang-sanitizer-install-${{ matrix.os }} + path: ubuntu-clang-sanitizer-install-${{ matrix.os }}.tar.gz + ubuntu-clang-sanitizer-test: + needs: + - ubuntu-clang-sanitizer-build + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: ["ubuntu-24.04"] + steps: + - uses: actions/checkout@v4 + - name: Setup environment + run: | + sudo apt-get update + sudo apt-get install --no-install-recommends -y ninja-build python3-pip valgrind \ + openmpi-bin openmpi-common libopenmpi-dev + wget https://apt.llvm.org/llvm.sh + chmod u+x llvm.sh + sudo ./llvm.sh 20 all + - name: Download installed package + uses: actions/download-artifact@v4 + with: + 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: python3 scripts/run_tests.py --running-type="processes" --additional-mpi-args="--oversubscribe" + env: + PPC_NUM_PROC: 2 + PPC_NUM_THREADS: 2 + PPC_ASAN_RUN: 1 + ASAN_OPTIONS: abort_on_error=1 + UBSAN_OPTIONS: halt_on_error=1 + - name: Run tests (threads, num_threads=1) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 1 + PPC_ASAN_RUN: 1 + ASAN_OPTIONS: abort_on_error=1 + UBSAN_OPTIONS: halt_on_error=1 + - name: Run tests (threads, num_threads=2) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 2 + PPC_ASAN_RUN: 1 + ASAN_OPTIONS: abort_on_error=1 + UBSAN_OPTIONS: halt_on_error=1 + - name: Run tests (threads, num_threads=3) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 3 + PPC_ASAN_RUN: 1 + ASAN_OPTIONS: abort_on_error=1 + UBSAN_OPTIONS: halt_on_error=1 + - name: Run tests (threads, num_threads=4) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 4 + PPC_ASAN_RUN: 1 + ASAN_OPTIONS: abort_on_error=1 + UBSAN_OPTIONS: halt_on_error=1 + ubuntu-clang-sanitizer-test-extended: + needs: + - ubuntu-clang-sanitizer-test + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: ["ubuntu-24.04"] + steps: + - uses: actions/checkout@v4 + - name: Setup environment + run: | + sudo apt-get update + sudo apt-get install --no-install-recommends -y ninja-build python3-pip valgrind \ + openmpi-bin openmpi-common libopenmpi-dev + wget https://apt.llvm.org/llvm.sh + chmod u+x llvm.sh + sudo ./llvm.sh 20 all + - name: Download installed package + uses: actions/download-artifact@v4 + with: + 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, num_threads=5) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 5 + PPC_ASAN_RUN: 1 + - name: Run tests (threads, num_threads=7) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 7 + PPC_ASAN_RUN: 1 + - name: Run tests (threads, num_threads=11) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 11 + PPC_ASAN_RUN: 1 + - name: Run tests (threads, num_threads=13) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 13 + PPC_ASAN_RUN: 1 + ubuntu-gcc-build-codecov: + needs: + - ubuntu-gcc-test-extended + - ubuntu-clang-test-extended + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - name: Setup environment + run: | + sudo apt-get update + sudo apt-get install --no-install-recommends -y \ + gcc-14 g++-14 ninja-build libmpich-dev libomp-dev valgrind gcovr + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ runner.os }}-gcc + create-symlink: true + max-size: 1G + - name: CMake configure + run: > + cmake -S . -B build + -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache + -D CMAKE_BUILD_TYPE=RELEASE + -D CMAKE_VERBOSE_MAKEFILE=ON -D USE_COVERAGE=ON + - name: Build project + run: | + cmake --build build --parallel + - name: Run tests (MPI) + run: python3 scripts/run_tests.py --running-type="processes" + env: + PPC_NUM_PROC: 2 + PPC_NUM_THREADS: 2 + - name: Run tests (threads, num_threads=1) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 1 + - name: Run tests (threads, num_threads=2) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 2 + - name: Run tests (threads, num_threads=3) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 3 + - name: Run tests (threads, num_threads=4) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 4 + - name: Generate gcovr Coverage Data + run: | + mkdir cov-report + cd build + gcovr -r ../ \ + --exclude '.*3rdparty/.*' \ + --exclude '/usr/.*' \ + --exclude '.*/perf_tests/.*' \ + --exclude '.*/func_tests/.*' \ + --exclude '.*/all/runner.cpp' \ + --exclude '.*/mpi/runner.cpp' \ + --exclude '.*/omp/runner.cpp' \ + --exclude '.*/seq/runner.cpp' \ + --exclude '.*/stl/runner.cpp' \ + --exclude '.*/tbb/runner.cpp' \ + --xml --output ../coverage.xml \ + --html=../cov-report/index.html --html-details + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v5.4.3 + with: + files: coverage.xml + - name: Upload coverage report artifact + uses: actions/upload-artifact@v4 + with: + name: cov-report + path: 'cov-report' diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 000000000..17536458d --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,326 @@ +on: + workflow_call: + +jobs: + windows-msvc-build: + runs-on: windows-latest + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v2 + with: + vs-version: 'latest' + - name: Setup MPI + uses: mpi4py/setup-mpi@v1 + with: + mpi: msmpi + - name: Setup ccache + uses: Chocobo1/setup-ccache-action@v1 + with: + windows_compile_environment: msvc + - name: Setup ninja + uses: seanmiddleditch/gha-setup-ninja@v6 + - name: Setup MSVC for Ninja again + uses: ilammy/msvc-dev-cmd@v1 + - name: CMake configure + shell: bash + run: > + cmake -S . -B build -G Ninja -D CMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl + -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache + -D CMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=install + - name: Build project + shell: bash + run: | + cmake --build build --config Release --parallel + - name: Install project + run: | + cmake --build build --target install + - name: Archive installed package + run: Compress-Archive -Path install -DestinationPath windows-msvc-install.zip + shell: pwsh + - name: Upload installed package + uses: actions/upload-artifact@v4 + with: + name: windows-msvc-install + path: windows-msvc-install.zip + windows-msvc-build-debug: + runs-on: windows-latest + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v2 + with: + vs-version: 'latest' + - name: Setup MPI + uses: mpi4py/setup-mpi@v1 + with: + mpi: msmpi + - name: Setup ccache + uses: Chocobo1/setup-ccache-action@v1 + with: + windows_compile_environment: msvc + - name: Setup ninja + uses: seanmiddleditch/gha-setup-ninja@v6 + - name: Setup MSVC for Ninja again + uses: ilammy/msvc-dev-cmd@v1 + - name: CMake configure + shell: bash + run: > + cmake -S . -B build -G Ninja -D CMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl + -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache + -D CMAKE_BUILD_TYPE=DEBUG -DCMAKE_INSTALL_PREFIX=install + - name: Build project + shell: bash + run: | + cmake --build build --config Debug --parallel + - name: Install project + run: | + cmake --build build --target install + - name: Archive installed package + run: Compress-Archive -Path install -DestinationPath windows-msvc-debug-install.zip + shell: pwsh + - name: Upload installed package + uses: actions/upload-artifact@v4 + with: + name: windows-msvc-debug-install + path: windows-msvc-debug-install.zip + windows-msvc-test: + needs: + - windows-msvc-build + runs-on: windows-latest + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v4 + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v2 + with: + vs-version: 'latest' + - name: Setup MPI + uses: mpi4py/setup-mpi@v1 + with: + mpi: msmpi + - name: Download installed package + uses: actions/download-artifact@v4 + with: + 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, num_proc=1) + run: python3 scripts/run_tests.py --running-type="processes" + env: + PPC_NUM_PROC: 1 + PPC_NUM_THREADS: 3 + - name: Run func tests (MPI, num_proc=2) + run: python3 scripts/run_tests.py --running-type="processes" + env: + PPC_NUM_PROC: 2 + PPC_NUM_THREADS: 2 + - name: Run func tests (MPI, num_proc=3) + run: python3 scripts/run_tests.py --running-type="processes" + env: + PPC_NUM_PROC: 3 + PPC_NUM_THREADS: 1 + - name: Run func tests (MPI, num_proc=4) + run: python3 scripts/run_tests.py --running-type="processes" + env: + PPC_NUM_PROC: 4 + PPC_NUM_THREADS: 1 + - name: Run tests (threads, num_threads=1) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 1 + - name: Run tests (threads, num_threads=2) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 2 + - name: Run tests (threads, num_threads=3) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 3 + - name: Run tests (threads, num_threads=4) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 4 + windows-msvc-test-extended: + needs: + - windows-msvc-test + runs-on: windows-latest + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v4 + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v2 + with: + vs-version: 'latest' + - name: Setup MPI + uses: mpi4py/setup-mpi@v1 + with: + mpi: msmpi + - name: Download installed package + uses: actions/download-artifact@v4 + with: + name: windows-msvc-install + - name: Extract installed package + run: Expand-Archive -Path .\windows-msvc-install.zip -DestinationPath . -Force + shell: pwsh + - name: Run tests (threads, num_threads=5) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 5 + - name: Run tests (threads, num_threads=7) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 7 + - name: Run tests (threads, num_threads=11) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 11 + - name: Run tests (threads, num_threads=13) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 13 + windows-clang-build: + runs-on: windows-latest + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v2 + with: + vs-version: 'latest' + - name: Setup MPI + uses: mpi4py/setup-mpi@v1 + with: + mpi: msmpi + - name: Setup ccache + uses: Chocobo1/setup-ccache-action@v1 + with: + windows_compile_environment: msvc + - name: Setup ninja + uses: seanmiddleditch/gha-setup-ninja@v6 + - name: Setup MSVC for Ninja again + uses: ilammy/msvc-dev-cmd@v1 + - name: CMake configure + run: > + cmake -S . -B build -G Ninja -D CMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl + -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache + -D CMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=install + env: + CC: clang-cl + CXX: clang-cl + - name: Build project + run: | + cmake --build build --config Release --parallel + env: + CC: clang-cl + CXX: clang-cl + - name: Install project + run: | + cmake --install build + - name: Archive installed package + run: Compress-Archive -Path install -DestinationPath windows-clang-install.zip + shell: pwsh + - name: Upload installed package + uses: actions/upload-artifact@v4 + with: + name: windows-clang-install + path: windows-clang-install.zip + windows-clang-test: + needs: + - windows-clang-build + runs-on: windows-latest + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v4 + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v2 + with: + vs-version: 'latest' + - name: Setup MPI + uses: mpi4py/setup-mpi@v1 + with: + mpi: msmpi + - name: Download installed package + uses: actions/download-artifact@v4 + with: + name: windows-clang-install + - name: Extract installed package + run: Expand-Archive -Path .\windows-clang-install.zip -DestinationPath . -Force + shell: pwsh + - name: Run tests (threads, num_threads=1) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 1 + - name: Run tests (threads, num_threads=2) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 2 + - name: Run tests (threads, num_threads=3) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 3 + - name: Run tests (threads, num_threads=4) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 4 + windows-clang-test-extended: + needs: + - windows-clang-test + runs-on: windows-latest + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v4 + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v2 + with: + vs-version: 'latest' + - name: Setup MPI + uses: mpi4py/setup-mpi@v1 + with: + mpi: msmpi + - name: Download installed package + uses: actions/download-artifact@v4 + with: + name: windows-clang-install + - name: Extract installed package + run: Expand-Archive -Path .\windows-clang-install.zip -DestinationPath . -Force + shell: pwsh + - name: Run tests (threads, num_threads=5) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 5 + - name: Run tests (threads, num_threads=7) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 7 + - name: Run tests (threads, num_threads=11) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 11 + - name: Run tests (threads, num_threads=13) + run: python3 scripts/run_tests.py --running-type="threads" + env: + PPC_NUM_THREADS: 13