Skip to content

Commit

Permalink
Feature/ci build clang (#26)
Browse files Browse the repository at this point in the history
* 👷 ci build for clang

* 🐛 fixed missing typename issue
  • Loading branch information
bvbasavaraju authored Dec 26, 2023
1 parent 37745bd commit 7e7ade8
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 3 deletions.
File renamed without changes.
75 changes: 75 additions & 0 deletions .github/workflows/build_run_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Build and Run Unit Tests

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]

env:
DEFAULT_CXX_STANDARD: 20
DEFAULT_LLVM_VERSION: 17
DEFAULT_GCC_VERSION: 12
CMAKE_GENERATOR: Ninja
DEBIAN_FRONTEND: noninteractive

jobs:
build_and_test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
compiler: [clang]
version: [14, 15, 16, 17]
cxx_standard: [20]
build_type: [Debug]
include:
- compiler: clang
cc: "clang"
cxx: "clang++"
cxx_flags: "-stdlib=libstdc++"
- version: 17
compiler: clang
stdlib: libc++
install: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 17 && sudo apt install -y libc++-17-dev libc++abi-17-dev
cxx_flags: "-stdlib=libc++"
toolchain_root: "/usr/lib/llvm-17"
- version: 16
compiler: clang
stdlib: libc++
install: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 16 && sudo apt install -y libc++-16-dev libc++abi-16-dev
cxx_flags: "-stdlib=libc++"
toolchain_root: "/usr/lib/llvm-16"
- version: 15
compiler: clang
stdlib: libc++
install: sudo apt update && sudo apt install -y clang-15 libc++-15-dev libc++abi-15-dev
cxx_flags: "-stdlib=libc++"
toolchain_root: "/usr/lib/llvm-15"
- version: 14
compiler: clang
stdlib: libc++
install: sudo apt update && sudo apt install -y clang-14 libc++-14-dev libc++abi-14-dev
cxx_flags: "-stdlib=libc++"
toolchain_root: "/usr/lib/llvm-14"

steps:
- uses: actions/checkout@v4

- name: Install build tools
run: |
${{ matrix.install }}
sudo apt install -y ninja-build
- name: Configure CMake
env:
CC: ${{matrix.toolchain_root}}/bin/${{matrix.cc}}
CXX: ${{matrix.toolchain_root}}/bin/${{matrix.cxx}}
run: cmake -B ${{github.workspace}}/build -DCMAKE_CXX_STANDARD=${{matrix.cxx_standard}} -DCMAKE_CXX_FLAGS_INIT=${{matrix.cxx_flags}} -DCMAKE_BUILD_TYPE=${{matrix.build_type}}

- name: Build Unit Tests
run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} -v -t all

- name: Test
working-directory: ${{github.workspace}}/build/test
run: ctest -j $(nproc) -C ${{matrix.build_type}}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@
build/*
.vscode/*
.cache/*
Testing/*
6 changes: 3 additions & 3 deletions include/container/algorithms.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1397,14 +1397,14 @@ struct transform {

template <typename R, typename L>
struct transform_LL_impl<R, L> {
using type = helper<L, R>::type;
using type = typename helper<L, R>::type;
};

template <typename R, typename L, typename ...Ls>
struct transform_LL_impl<R, L, Ls...> {
using transformed = helper<L, R>::type;
using transformed = typename helper<L, R>::type;

using type = transform_LL_impl<transformed, Ls...>::type;
using type = typename transform_LL_impl<transformed, Ls...>::type;
};

using list_of_list = typename transform_LL_impl<details::temp_list<>, types...>::type;
Expand Down

0 comments on commit 7e7ade8

Please sign in to comment.