chore: make OpenMP optional for unit tests. #7
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: mac-clang | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths-ignore: | |
| - 'doc/**' | |
| - '**/*.md' | |
| - .travis.yml | |
| - .gitlab-ci.yml | |
| workflow_dispatch: | |
| pull_request: | |
| paths-ignore: | |
| - 'doc/**' | |
| - '**/*.md' | |
| - .travis.yml | |
| - .gitlab-ci.yml | |
| jobs: | |
| build: | |
| runs-on: macos-14 | |
| name: ci-macos-14-apple-clang-18 | |
| env: | |
| CLANG18_PATH: /opt/homebrew/opt/llvm@18/bin/clang | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install ccache | |
| uses: hendrikmuhs/[email protected] | |
| - name: Install clang | |
| run: | | |
| brew install llvm@18 \ | |
| && echo 'export PATH="/opt/homebrew/opt/llvm@18/bin:$PATH"' >> /Users/runner/.bash_profile \ | |
| && source /Users/runner/.bash_profile \ | |
| && which clang++ | |
| - name: Cache Conan packages | |
| id: cache-conan | |
| uses: actions/[email protected] | |
| env: | |
| cache-name: cache-conan-packages | |
| with: | |
| path: ~/.conan2 | |
| key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('conanfile.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-build-${{ env.cache-name }}- | |
| ${{ runner.os }}-build- | |
| ${{ runner.os }}- | |
| - name: Configure python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| cache: 'pip' | |
| - name: Install Python dependencies | |
| run: pip install -r .github/requirements.txt | |
| - name: Configure Conan profile | |
| run: | | |
| CC=${{ env.CLANG18_PATH }} \ | |
| CXX=${{ env.CLANG18_PATH }}++ \ | |
| conan profile detect --force --name default | |
| - name: Install Conan dependencies | |
| run: | | |
| conan install conanfile.txt \ | |
| -r conancenter \ | |
| -s compiler.cppstd=17 \ | |
| -s build_type=Release \ | |
| -c:b tools.build:compiler_executables="{'c': '${{ env.CLANG18_PATH }}', 'cpp': '${{ env.CLANG18_PATH }}++'}" \ | |
| -c:h tools.build:compiler_executables="{'c': '${{ env.CLANG18_PATH }}', 'cpp': '${{ env.CLANG18_PATH }}++'}" \ | |
| --build=missing | |
| - name: Configure CMake | |
| run: | | |
| cmake -S . -B build \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DBUILD_TESTS:BOOL=ON \ | |
| -DCMAKE_CXX_COMPILER=${{ env.CLANG18_PATH }}++ \ | |
| -DCMAKE_C_COMPILER=${{ env.CLANG18_PATH }} \ | |
| -DCMAKE_INSTALL_PREFIX=install \ | |
| -DCMAKE_TOOLCHAIN_FILE=build/Release/generators/conan_toolchain.cmake \ | |
| -DTEST_WITH_WERROR:BOOL=OFF | |
| - name: Build | |
| run: cmake --build build | |
| - name: Test | |
| run: cmake --build build --target test | |
| - name: Install | |
| run: cmake --build build --target install |