Skip to content

Refactoring

Refactoring #354

Workflow file for this run

name: Clang
on: [push, pull_request]
jobs:
build-and-test:
strategy:
matrix:
include:
- clang_ver: '3.6'
build_type: 'Release'
flags: '-std=c++11 -Werror -msse2'
ubuntu_ver: '20.04'
- clang_ver: '3.6'
build_type: 'Release'
flags: '-std=c++11 -Werror -fno-rtti -DMOMO_USE_SAFE_MAP_BRACKETS -DMOMO_USE_UNORDERED_HINT_ITERATORS -DMOMO_DISABLE_TYPE_INFO'
ubuntu_ver: '20.04'
- clang_ver: '4.0'
build_type: 'Release'
flags: '-std=c++14 -Werror -msse2'
ubuntu_ver: '20.04'
- clang_ver: '5.0'
build_type: 'Release'
flags: '-std=c++17 -Werror -msse2'
ubuntu_ver: '20.04'
- clang_ver: '6.0'
build_type: 'Release'
flags: '-std=c++17 -Werror -msse2'
ubuntu_ver: '20.04'
- clang_ver: '7'
build_type: 'Release'
flags: '-std=c++17 -Werror -msse2'
ubuntu_ver: '20.04'
- clang_ver: '8'
build_type: 'Release'
flags: '-std=c++17 -Werror -msse2 -DLIBCPP_TEST_DEDUCTION_GUIDES'
ubuntu_ver: '20.04'
- clang_ver: '9'
build_type: 'Release'
flags: '-std=c++17 -Werror -msse2 -DLIBCPP_TEST_DEDUCTION_GUIDES'
ubuntu_ver: '20.04'
- clang_ver: '10'
build_type: 'Release'
flags: '-std=c++20 -Werror -msse2 -DLIBCPP_TEST_DEDUCTION_GUIDES'
ubuntu_ver: '20.04'
- clang_ver: '11'
build_type: 'Release'
flags: '-std=c++20 -Werror -msse2 -DLIBCPP_TEST_DEDUCTION_GUIDES'
ubuntu_ver: '20.04'
- clang_ver: '12'
build_type: 'Release'
flags: '-std=c++20 -Werror -msse2 -DLIBCPP_TEST_DEDUCTION_GUIDES'
ubuntu_ver: '20.04'
- clang_ver: '13'
build_type: 'Release'
flags: '-std=c++20 -Werror -msse2 -DLIBCPP_TEST_DEDUCTION_GUIDES'
ubuntu_ver: '22.04'
- clang_ver: '14'
build_type: 'Release'
flags: '-std=c++20 -Werror -msse2 -DLIBCPP_TEST_DEDUCTION_GUIDES'
ubuntu_ver: '22.04'
- clang_ver: '15'
build_type: 'Release'
flags: '-std=c++20 -Werror -msse2 -DLIBCPP_TEST_DEDUCTION_GUIDES'
ubuntu_ver: '22.04'
- clang_ver: '15'
build_type: 'Release'
flags: '-std=c++20 -Werror -DLIBCPP_TEST_DEDUCTION_GUIDES -fno-rtti -DMOMO_USE_SAFE_MAP_BRACKETS -DMOMO_USE_UNORDERED_HINT_ITERATORS -DMOMO_DISABLE_TYPE_INFO'
ubuntu_ver: '22.04'
- clang_ver: '15'
build_type: 'Debug'
flags: '-std=c++20 -Werror -fsanitize=address,undefined -msse2 -DLIBCPP_TEST_DEDUCTION_GUIDES'
ubuntu_ver: '22.04'
runs-on: ubuntu-${{ matrix.ubuntu_ver }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Prepare Xenial and Bionic
if: matrix.ubuntu_ver == '20.04'
run: |
echo "deb http://dk.archive.ubuntu.com/ubuntu/ xenial main universe" | sudo tee -a /etc/apt/sources.list
echo "deb http://dk.archive.ubuntu.com/ubuntu/ bionic main universe" | sudo tee -a /etc/apt/sources.list
sudo apt update
- name: Install Ninja
run: sudo apt-get install ninja-build
- name: Install Clang
if: matrix.ubuntu_ver == '20.04'
run: sudo apt install clang-${{ matrix.clang_ver }}
- name: Setup Clang
if: matrix.ubuntu_ver == '22.04'
uses: egor-tensin/setup-clang@v1
with:
version: ${{ matrix.clang_ver }}
- name: Build
env:
CXX: clang++-${{ matrix.clang_ver }}
CXXFLAGS: ${{ matrix.flags }}
run: |
cd test
mkdir build
cd build
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
cmake --build . -v
- name: Test
run: test/build/momo_test