Skip to content

Speed up build

Speed up build #273

name: CMake integration
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:
test:
runs-on: ubuntu-latest
steps:
- uses: applied-material-modeling/neml2-ci@main
with:
path: neml2
python-version: 3.9
cmake-version: 3.28
torch-version: 2.5.1
- name: Create a source file for testing purposes
run: cp neml2/cmake/subproject/main.cxx .
- name: Create a CMakeLists.txt file for testing purposes
run: cp neml2/cmake/subproject/CMakeLists.txt .
- name: Configure with CMake
run: cmake -DNEML2_TESTS=OFF -GNinja -B build .
- name: Compile
run: cmake --build build --target all
- run: ./build/foo