NateAM is testing a pull request #7
Workflow file for this run
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: Tests on pull request | |
| run-name: ${{ github.actor }} is testing a pull request | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - edited | |
| - synchronize | |
| branches: | |
| - dev | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| # Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable. | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest] | |
| build_type: [Release] | |
| config_zip: [ {header_only: OFF, python_bindings: OFF}, {header_only: ON, python_bindings: OFF} ] | |
| tardigrade_opt: [OFF, ON] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: MiniConda setup | |
| uses: conda-incubator/setup-miniconda@v2 | |
| with: | |
| miniforge-variant: Miniforge3 | |
| channels: conda-forge,defaults | |
| channel-priority: true | |
| auto-activate-base: false | |
| activate-environment: "test-environment" | |
| - name: Conda environment | |
| shell: bash -el {0} | |
| run: conda install --file environment.txt --yes --channel conda-forge | |
| - name: CMake linter | |
| if: ${{ matrix.os == 'ubuntu-latest' }} | |
| shell: bash -el {0} | |
| run: gersemi CMakeLists.txt src/ docs/ --check --diff | |
| - name: Configure | |
| shell: bash -el {0} | |
| run: cmake -S . -B build -DTARDIGRADE_SOLVER_TOOLS_BUILD_PYTHON_BINDINGS=${{ matrix.config_zip.python_bindings }} -DTARDIGRADE_HEADER_ONLY=${{ matrix.config_zip.header_only }} -DTARDIGRADE_ERROR_TOOLS_OPT=${{ matrix.tardigrade_opt }} -DCMAKE_EXPORT_COMPILE_COMMANDS=ON | |
| - name: clang-tidy Lint | |
| if: ${{ matrix.os == 'ubuntu-latest'}} | |
| shell: bash -el {0} | |
| run: run-clang-tidy -config-file=.clang-tidy -p build -extra-arg="-mno-sse2" | |
| - name: clang-format Lint | |
| if: ${{ matrix.os == 'ubuntu-latest' && matrix.tardigrade_opt == 'OFF' && matrix.config_zip.header_only == 'OFF' }} | |
| shell: bash -el {0} | |
| run: cmake --build build --target cpp-format-check | |
| - name: Build | |
| shell: bash -el {0} | |
| run: cmake --build build --target all | |
| - name: Test | |
| shell: bash -el {0} | |
| run: conda activate test-environment && ctest --test-dir build -V |