-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This fixes the broken Github Actions workflows, which were previously broken by Github's removal of support for their `::set-env` commands. Several bugs have been discovered through this process, and several builds are currently on-hold pending investigation. New issues have been opened up in the Github repository to track these problems, they are #8 and #9 respectively. As an added benefit, the CI for this project has also been updated now to additionally include _some_ support for sanitizers -- though these sanitizers are not run on Ubuntu yet (pending resolution of #9).
- Loading branch information
Showing
11 changed files
with
294 additions
and
254 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
name: build-linux | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
name: Ubuntu ${{matrix.compiler.cc}} ${{matrix.arch}} ${{matrix.build_type}} | ||
runs-on: ubuntu-20.04 | ||
|
||
env: | ||
build-directory: build | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
compiler: | ||
- { cc: gcc-10, cxx: g++-10 } | ||
- { cc: clang-10, cxx: clang++-10 } | ||
arch: [x86, x86_64] | ||
build_type: [Debug, Release] | ||
|
||
steps: | ||
|
||
- name: Clone | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
|
||
- name: Prepare Environment | ||
run: | | ||
if [[ "${{matrix.arch}}" == "x86" ]]; then | ||
sudo dpkg --add-architecture i386 | ||
fi | ||
sudo apt-get update | ||
sudo apt-get install -y ninja-build | ||
if [[ "${{matrix.compiler.cc}}" =~ "gcc" ]]; then | ||
sudo apt-get install -y ${{matrix.compiler.cxx}} ${{matrix.compiler.cxx}}-multilib | ||
else | ||
sudo apt-get install -y ${{matrix.compiler.cc}} g++-multilib | ||
fi | ||
cmake -E make_directory ${{env.build-directory}} | ||
- name: Prepare Architecture | ||
run: | | ||
if [[ "${{matrix.arch}}" = "x86" ]]; then | ||
echo "CXXFLAGS=${CXXFLAGS} -m32" >> ${GITHUB_ENV} | ||
fi | ||
- name: Configure | ||
working-directory: ${{env.build-directory}} | ||
env: | ||
CC: ${{matrix.compiler.cc}} | ||
CXX: ${{matrix.compiler.cxx}} | ||
run: | | ||
cmake .. \ | ||
-GNinja \ | ||
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} \ | ||
-DALLOY_COMPILE_SELF_CONTAINMENT_TESTS=On \ | ||
-DALLOY_COMPILE_TESTS=On \ | ||
-DALLOY_COMPILE_EXTRAS=On \ | ||
-DALLOY_COMPILE_EXAMPLES=On \ | ||
-DALLOY_ENABLE_EXCEPTIONS=On | ||
- name: Build | ||
working-directory: ${{env.build-directory}} | ||
run: cmake --build . | ||
|
||
- name: Test | ||
working-directory: ${{env.build-directory}} | ||
run: ctest --output-on-failure | ||
|
||
# TODO(#9): Enable sanitizer on Ubuntu | ||
# sanitize: | ||
# name: ${{matrix.compiler.cc}} '${{matrix.sanitizer}}' sanitizer | ||
# runs-on: ubuntu-20.04 | ||
# needs: test | ||
# | ||
# env: | ||
# build-directory: build | ||
# | ||
# strategy: | ||
# matrix: | ||
# compiler: | ||
# - { cc: gcc, cxx: g++ } | ||
# - { cc: clang, cxx: clang++ } | ||
# sanitizer: [address, undefined] | ||
# | ||
# steps: | ||
# - name: Clone | ||
# uses: actions/checkout@v2 | ||
# | ||
# - name: Prepare Environment | ||
# run: | | ||
# sudo apt-get install -y ninja-build | ||
# if [[ "${{matrix.compiler.cc}}" =~ "gcc" ]]; then | ||
# sudo apt-get install -y ${{matrix.compiler.cxx}} ${{matrix.compiler.cxx}}-multilib | ||
# else | ||
# sudo apt-get install -y ${{matrix.compiler.cc}} g++-multilib | ||
# fi | ||
# cmake -E make_directory ${{env.build-directory}} | ||
# | ||
# - name: Configure | ||
# working-directory: ${{env.build-directory}} | ||
# env: | ||
# CC: ${{matrix.compiler.cc}} | ||
# CXX: ${{matrix.compiler.cxx}} | ||
# run: | | ||
# cmake .. \ | ||
# -GNinja \ | ||
# -DCMAKE_BUILD_TYPE=Debug \ | ||
# -DCMAKE_CXX_FLAGS="-fsanitize=${{matrix.sanitizer}}" \ | ||
# -DALLOY_COMPILE_SELF_CONTAINMENT_TESTS=On \ | ||
# -DALLOY_COMPILE_TESTS=On \ | ||
# -DALLOY_COMPILE_EXTRAS=On \ | ||
# -DALLOY_COMPILE_EXAMPLES=On \ | ||
# -DALLOY_ENABLE_EXCEPTIONS=On | ||
# | ||
# - name: Build | ||
# working-directory: ${{env.build-directory}} | ||
# run: cmake --build . | ||
# | ||
# - name: Test (Sanitize) | ||
# working-directory: ${{env.build-directory}} | ||
# run: ctest --output-on-failure |
Oops, something went wrong.