python script to preview render orientation #166
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Premerge tests on CPUs with different configurations | |
| on: | |
| push: | |
| pull_request: | |
| types: [ready_for_review] | |
| jobs: | |
| check-commit: | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| run_tests: ${{ steps.check_message.outputs.run_tests }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Check commit message | |
| id: check_message | |
| run: | | |
| if [[ "${{ github.event_name }}" == "pull_request" && "${{ github.event.action }}" == "ready_for_review" ]]; then | |
| echo "run_tests=true" >> "$GITHUB_OUTPUT" | |
| exit 0 | |
| fi | |
| if git log -1 --pretty=%B | grep -q "RUNTESTS"; then | |
| echo "run_tests=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "run_tests=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| tests: | |
| needs: check-commit | |
| if: needs.check-commit.outputs.run_tests == 'true' | |
| name: UNIT_TESTS with (precision=${{ matrix.precision }}, mpi=${{ matrix.mpi }}, output=${{ matrix.output }}) | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| precision: [single, double] | |
| mpi: [ON, OFF] | |
| output: [ON, OFF] | |
| exclude: | |
| - precision: single | |
| mpi: ON | |
| output: ON | |
| - precision: double | |
| mpi: ON | |
| output: ON | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install GCC 14 and build tools | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gcc-14 g++-14 gfortran-14 build-essential wget libevent-dev libhwloc-dev | |
| sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 50 | |
| sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 50 | |
| sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-14 50 | |
| gcc --version | |
| g++ --version | |
| - name: Install CMake (3.x) | |
| run: | | |
| sudo apt-get install -y cmake | |
| cmake --version | |
| - name: Install OpenMPI 5 | |
| run: | | |
| if [ "${{ matrix.mpi }}" = "ON" ]; then | |
| sudo apt-get install -y libopenmpi-dev openmpi-bin | |
| mpirun --version | |
| fi | |
| - name: Compile and run all tests | |
| run: | | |
| if [ "${{ matrix.mpi }}" = "ON" ]; then | |
| export CC=mpicc | |
| export CXX=mpicxx | |
| else | |
| export CC=gcc-14 | |
| export CXX=g++-14 | |
| fi | |
| ./dev/scripts/tests.sh --build build --with_tests --flags "-D precision=${{ matrix.precision }} -D mpi=${{ matrix.mpi }} -D output=${{ matrix.output }}" |