Skip to content

Add ability to build with Clang on macOS #2240

Add ability to build with Clang on macOS

Add ability to build with Clang on macOS #2240

Workflow file for this run

name: CMake
on:
pull_request:
types: [opened, synchronize, reopened]
#paths-ignore:
#- docs/**
#- README.md
#- README_PYPI.md
#- cli/**
#- images/**
#- .gitignore
#- COPYING
#- pyproject.toml
#- examples/**
push:
branches:
- main
#paths-ignore:
#- docs/**
#- README.md
#- README_PYPI.md
#- cli/**
#- images/**
#- .gitignore
#- COPYING
#- pyproject.toml
#- examples/**
workflow_dispatch:
jobs:
run_tests_gcc:
runs-on: ubuntu-latest
strategy:
matrix:
cfg:
- { BUILD_TYPE: Release }
- { BUILD_TYPE: Debug }
- { BUILD_TYPE: Debug, SANITIZER : ADDRESS }
- { BUILD_TYPE: Debug, SANITIZER : UB }
steps:
- uses: actions/checkout@v3
- name: Download libraries
uses: ./.github/composite-actions/download-libraries
- name: Download datasets
uses: ./.github/composite-actions/download-datasets
- name: Build
run: |
export CC=gcc-10
export CXX=g++-10
if [[ "${{matrix.cfg.BUILD_TYPE}}" == "Debug" ]]; then
./build.sh --debug --sanitizer=${{ matrix.cfg.SANITIZER }}
else
./build.sh
fi
- name: Test
working-directory: ${{github.workspace}}/build/target
shell: bash
run: ./Desbordante_test --gtest_filter='*:-*HeavyDatasets*'
run_tests_clang:
runs-on: ubuntu-latest
strategy:
matrix:
cfg:
- { BUILD_TYPE: Release }
- { BUILD_TYPE: Debug }
- { BUILD_TYPE: Debug, SANITIZER : ADDRESS }
- { BUILD_TYPE: Debug, SANITIZER : UB }
steps:
- uses: actions/checkout@v3
- name: Download libraries
uses: ./.github/composite-actions/download-libraries
with:
install-gcc: false
install-clang: true
install-boost-gcc: false
install-boost-clang: true
- name: Download datasets
uses: ./.github/composite-actions/download-datasets
- name: Build
run: |
export CC=clang-17
export CXX=clang++-17
export CXXFLAGS="-stdlib=libc++"
export LDFLAGS="-lc++abi"
if [[ "${{matrix.cfg.BUILD_TYPE}}" == "Debug" ]]; then
./build.sh --debug --sanitizer=${{ matrix.cfg.SANITIZER }}
else
./build.sh
fi
- name: Test
working-directory: ${{github.workspace}}/build/target
shell: bash
run: ./Desbordante_test --gtest_filter='*:-*HeavyDatasets*'
run_tests_macos_clang:
runs-on: macos-14
strategy:
matrix:
cfg:
- { BUILD_TYPE: Release }
- { BUILD_TYPE: Debug }
- { BUILD_TYPE: Debug, SANITIZER : ADDRESS }
- { BUILD_TYPE: Debug, SANITIZER : UB }
steps:
- uses: actions/checkout@v3
- name: Download libraries
run: brew install llvm@17 make boost
shell: bash
- name: Download datasets
uses: ./.github/composite-actions/download-datasets
- name: Build
run: |
export CC=$(brew --prefix llvm@17)/bin/clang
export CXX=$(brew --prefix llvm@17)/bin/clang++
if [[ "${{matrix.cfg.BUILD_TYPE}}" == "Debug" ]]; then
./build.sh --debug --sanitizer=${{ matrix.cfg.SANITIZER }}
else
./build.sh
fi
- name: Test
working-directory: ${{github.workspace}}/build/target
shell: bash
run: ./Desbordante_test --gtest_filter='*:-*HeavyDatasets*'