Update FreeBSD Clang to 15 #123
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: Ubuntu-Clang-CMake | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: setup clang | |
run: | | |
sudo update-alternatives \ | |
--install /usr/lib/llvm llvm /usr/lib/llvm-15 1000 \ | |
--slave /usr/bin/llvm-ar llvm-ar /usr/bin/llvm-ar-15 \ | |
--slave /usr/bin/llvm-ranlib llvm-ranlib /usr/bin/llvm-ranlib-15 | |
sudo update-alternatives \ | |
--install /usr/bin/clang clang /usr/bin/clang-15 1000 | |
sudo update-alternatives \ | |
--install /usr/bin/clang++ clang++ /usr/bin/clang++-15 1000 | |
sudo update-alternatives \ | |
--install /usr/bin/clang-format clang-format /usr/bin/clang-format-15 1000 | |
- name: install conan | |
run: sudo pip install 'conan<2' | |
- name: build with cmake | |
run: | | |
mkdir build && cd build | |
CC=clang CXX=clang++ conan install .. -g cmake_find_package --build missing -s compiler=clang -s compiler.version=12 -s compiler.libcxx=libstdc++11 | |
CC=clang CXX=clang++ cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_MODULE_PATH=${PWD} -DBUILD_TESTING=ON -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=/tmp/install | |
cmake --build . | |
- name: test | |
run: cd build/ && cmake --build . --target test | |
- name: install | |
run: cd build/ && cmake --build . --target install |