diff --git a/.github/workflows/clang-tidy.yaml b/.github/workflows/clang-tidy.yaml index 8ef40d31..713cafad 100644 --- a/.github/workflows/clang-tidy.yaml +++ b/.github/workflows/clang-tidy.yaml @@ -2,12 +2,11 @@ name: OpenTurbine-CI on: push -env: - CMAKE_BUILD_PARALLEL_LEVEL: 1 - jobs: ClangTidy: runs-on: ubuntu-latest + env: + CMAKE_BUILD_PARALLEL_LEVEL: 1 strategy: fail-fast: false steps: diff --git a/.github/workflows/correctness.yaml b/.github/workflows/correctness.yaml index a7d62f2f..a6966ea3 100644 --- a/.github/workflows/correctness.yaml +++ b/.github/workflows/correctness.yaml @@ -4,7 +4,7 @@ on: push jobs: CTest: - runs-on: ${{matrix.os}} + runs-on: ubuntu-latest env: CMAKE_BUILD_PARALLEL_LEVEL: 4 CTEST_PARALLEL_LEVEL: 2 @@ -12,7 +12,6 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest] compiler: [g++, clang++] build_type: [Release, Debug] steps: @@ -21,7 +20,7 @@ jobs: uses: actions/cache@v3 with: path: ${{ github.workspace }}/spack - key: ${{runner.os}}-spack + key: linux-spack - name: Install Trilinos if: steps.cache-trilinos.outputs.cache-hit != 'true' run: | diff --git a/.github/workflows/cppcheck.yaml b/.github/workflows/cppcheck.yaml index 7c16921d..1667dbc1 100644 --- a/.github/workflows/cppcheck.yaml +++ b/.github/workflows/cppcheck.yaml @@ -2,12 +2,11 @@ name: OpenTurbine-CI on: push -env: - CMAKE_BUILD_PARALLEL_LEVEL: 1 - jobs: CppCheck: runs-on: ubuntu-latest + env: + CMAKE_BUILD_PARALLEL_LEVEL: 1 strategy: fail-fast: false steps: diff --git a/.github/workflows/formatting.yaml b/.github/workflows/formatting.yaml index 03987f92..dcc5b919 100644 --- a/.github/workflows/formatting.yaml +++ b/.github/workflows/formatting.yaml @@ -13,5 +13,5 @@ jobs: with: source: './src ./tests/unit_tests' exclude: '.' - extensions: 'H,h,cpp,hpp' + extensions: 'H,h,cpp' clangFormatVersion: 16 diff --git a/.github/workflows/macos.yaml b/.github/workflows/macos.yaml new file mode 100644 index 00000000..98d8b76a --- /dev/null +++ b/.github/workflows/macos.yaml @@ -0,0 +1,49 @@ +name: OpenTurbine-CI + +on: push + +jobs: + MacOS: + runs-on: macos-latest + env: + CMAKE_BUILD_PARALLEL_LEVEL: 4 + CTEST_PARALLEL_LEVEL: 2 + strategy: + fail-fast: false + matrix: + build_type: [Release, Debug] + steps: + - name: Cache install Trilinos + id: cache-trilinos + uses: actions/cache@v3 + with: + path: ${{ github.workspace }}/spack + key: macos-spack + - name: Install Trilinos + if: steps.cache-trilinos.outputs.cache-hit != 'true' + run: | + git clone https://github.com/spack/spack.git + source spack/share/spack/setup-env.sh + spack compiler find + spack external find + spack install googletest + spack install trilinos@master~mpi~epetra+basker + - name: Clone + uses: actions/checkout@v4 + with: + submodules: true + path: openturbine + - name: Test OpenTurbine + run: | + source spack/share/spack/setup-env.sh + spack load trilinos + spack load googletest + cd openturbine + mkdir build + cd build + cmake .. \ + -DOTURB_ENABLE_TESTS:BOOL=ON \ + -DOTURB_ENABLE_BASIC_SANITIZERS=ON \ + -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} + cmake --build . + ctest --output-on-failure