-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit adds the clang toolchain to the CI. We turn the main jobs into a test matrix that either runs with the clang, or gcc toolchain. When using the gcc toolchain everything stays as-is. When using the clang toolchain we use clang/clang++ as C/C++ compilers, respectively. We also build `AnyBlob` using `-DANYBLOB_LIBCXX_COMPAT=1`, which ensures that `libcxx` is used as a standard library. In principle, the test matrix could be even bigger: we could build with libcxx and gcc, and gnu c++ and clang. But we don't tests this for now.
- Loading branch information
Showing
7 changed files
with
81 additions
and
31 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: "Build AnyBlob" | ||
description: "Build AnyBlob using either clang or gcc" | ||
inputs: | ||
clang-toolchain: | ||
required: false | ||
description: "Build with clang and use libcxx as the standard library" | ||
default: false | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
# CMake configuration option 1 - GCC toolchain | ||
- name: Configure CMake | ||
if: ${{ inputs.clang-toolchain == 'false' }} | ||
run: | | ||
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | ||
shell: bash | ||
|
||
# CMake configuration option 2 - Clang toolchain | ||
- name: Configure CMake | ||
if: ${{ inputs.clang-toolchain == 'true' }} | ||
# Explicitly use clang-15. The runner comes with clang-13, 14, and 15. | ||
# However, only clang-15 and up support `-Wno-unqualified-std-cast-call`. | ||
run: | | ||
sudo apt install libc++-15-dev libc++abi-15-dev | ||
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \ | ||
-DCMAKE_C_COMPILER=clang-15 \ | ||
-DCMAKE_CXX_COMPILER=clang++-15 \ | ||
-DANYBLOB_LIBCXX_COMPAT=1 | ||
shell: bash | ||
|
||
# Build library and test binaries | ||
- name: Build | ||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | ||
shell: bash |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: "Install Dependencies" | ||
description: "Installs dynamic libraries required by AnyBlob" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
# Install dependencies | ||
- name: Install dependencies | ||
run: sudo apt update && sudo apt install liburing-dev openssl libssl-dev libjemalloc-dev lld | ||
shell: bash | ||
|
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
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
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
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
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