Integrate work dispatchers into our drivers #340
Workflow file for this run
This file contains 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: C++ backend | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
# Newer commits should cancel old runs | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
clang-format: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
path: | |
- "src" | |
- "include" | |
- "tests" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run clang-format style check | |
uses: jidicula/[email protected] | |
with: | |
clang-format-version: "19" | |
check-path: ${{ matrix.path }} | |
# TODO: Re-enable the linting checks | |
test: | |
needs: clang-format | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
btype: [Release, Debug] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: applied-material-modeling/neml2-ci@main | |
with: | |
python-version: 3.9 | |
cmake-version: 3.28 | |
torch-version: 2.5.1 | |
- name: Configure | |
run: cmake --preset dev -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.btype }} -S . | |
- name: Build | |
run: cmake --build --preset dev-cpp | |
- name: Run tests | |
run: | | |
./build/dev/tests/unit/unit_tests -r JUnit::out=unit_tests.xml -r console::out=-::colour-mode=ansi | |
./build/dev/tests/regression/regression_tests -r JUnit::out=regression_tests.xml -r console::out=-::colour-mode=ansi | |
./build/dev/tests/verification/verification_tests -r JUnit::out=verification_tests.xml -r console::out=-::colour-mode=ansi | |
./build/dev/tests/dispatchers/dispatcher_tests -r JUnit::out=dispatcher_tests.xml -r console::out=-::colour-mode=ansi | |
- name: Test results | |
uses: EnricoMi/publish-unit-test-result-action/linux@v2 | |
if: always() | |
with: | |
files: tests/*.xml | |
check_name: Test Results | |
check_run: false | |
action_fail: true | |
comment_mode: off | |
runner: | |
needs: clang-format | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: applied-material-modeling/neml2-ci@main | |
with: | |
python-version: 3.9 | |
cmake-version: 3.28 | |
torch-version: 2.5.1 | |
- name: Configure | |
run: cmake --preset runner -GNinja -S . | |
- name: Build | |
run: cmake --build --preset runner | |
- name: Run tests | |
run: ctest --preset runner --output-on-failure |