Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
iox-#910 Add CI jobs for latest gcc and clang
Browse files Browse the repository at this point in the history
dkroenke committed Sep 22, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent a8c40c4 commit 636508a
Showing 4 changed files with 68 additions and 22 deletions.
30 changes: 26 additions & 4 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -56,12 +56,23 @@ jobs:
- uses: actions/checkout@v2
- run: ./tools/ci/run-integration-test.sh

build-test-ubuntu-with-sanitizers:
build-test-ubuntu-with-sanitizers-gcc:
runs-on: ubuntu-20.04
needs: pre-flight-check
steps:
- uses: egor-tensin/setup-gcc@v1
with:
version: latest
platform: x64
- uses: actions/checkout@v2
- run: ./tools/ci/build-test-ubuntu-with-sanitizers.sh gcc

build-test-ubuntu-with-sanitizers-clang:
runs-on: ubuntu-20.04
needs: pre-flight-check
steps:
- uses: actions/checkout@v2
- run: ./tools/ci/build-test-ubuntu-with-sanitizers.sh
- run: ./tools/ci/build-test-ubuntu-with-sanitizers.sh clang

build-test-macos-with-sanitizers:
runs-on: macos-latest
@@ -72,12 +83,23 @@ jobs:
- uses: actions/checkout@v2
- run: ./tools/ci/build-test-macos-with-sanitizers.sh

build-test-ubuntu-with-latest-clang:
build-ubuntu-with-latest-clang-release:
runs-on: ubuntu-latest
needs: pre-flight-check
steps:
- uses: actions/checkout@v2
- run: ./tools/ci/build-test-ubuntu-with-latest-clang.sh
- run: ./tools/ci/build-ubuntu-with-latest-clang-gcc.sh clang

build-ubuntu-with-latest-gcc-release:
runs-on: ubuntu-latest
needs: pre-flight-check
steps:
- uses: egor-tensin/setup-gcc@v1
with:
version: latest
platform: x64
- uses: actions/checkout@v2
- run: ./tools/ci/build-ubuntu-with-latest-clang-gcc.sh gcc

# gcc 5.4 is compiler used in QNX 7.0
build-test-ubuntu-with-gcc54:
23 changes: 20 additions & 3 deletions tools/ci/build-test-ubuntu-with-sanitizers.sh
Original file line number Diff line number Diff line change
@@ -29,15 +29,32 @@ cd ${WORKSPACE}
msg "installing build dependencies"
sudo apt-get update && sudo apt-get install -y libacl1-dev libncurses5-dev

if [ "$COMPILER" == "clang" ]; then
msg "installing latest stable clang"
wget https://apt.llvm.org/llvm.sh -O /tmp/llvm.sh
chmod +x /tmp/llvm.sh
# set LLVM_VERSION
eval $(cat /tmp/llvm.sh | grep LLVM_VERSION= -m 1)
sudo /tmp/llvm.sh ${LLVM_VERSION}
fi

msg "creating local test users and groups for testing access control"
sudo ./tools/add_test_users.sh

msg "compiler versions:
$(gcc --version)
$(clang --version)"
$(clang-${LLVM_VERSION} --version)
$(gcc --version)"

msg "building sources"
./tools/iceoryx_build_test.sh clean build-strict build-strict build-all clang sanitize test-add-user
if [ "$COMPILER" == "gcc" ]; then
./tools/iceoryx_build_test.sh clean build-strict build-strict build-all debug sanitize test-add-user
fi

if [ "$COMPILER" == "clang" ]; then
export CC=clang-${LLVM_VERSION}
export CXX=clang++-${LLVM_VERSION}
./tools/iceoryx_build_test.sh clean build-strict build-strict build-all clang debug sanitize test-add-user
fi

msg "running all tests"
cd ./build
2 changes: 1 addition & 1 deletion tools/ci/build-test-ubuntu.sh
Original file line number Diff line number Diff line change
@@ -48,4 +48,4 @@ cd ./build
cd -

msg "building roudi examples without toml support"
./tools/iceoryx_build_test.sh out-of-tree examples toml-config-off clean
./tools/iceoryx_build_test.sh relwithdebinfo out-of-tree examples toml-config-off clean
Original file line number Diff line number Diff line change
@@ -19,6 +19,8 @@

set -e

COMPILER=${1:-gcc}

msg() {
printf "\033[1;32m%s: %s\033[0m\n" ${FUNCNAME[1]} "$1"
}
@@ -29,25 +31,30 @@ cd ${WORKSPACE}
msg "installing build dependencies"
sudo apt-get update && sudo apt-get install -y libacl1-dev libncurses5-dev

msg "installing latest stable clang"
wget https://apt.llvm.org/llvm.sh -O /tmp/llvm.sh
chmod +x /tmp/llvm.sh
# set LLVM_VERSION
eval $(cat /tmp/llvm.sh | grep LLVM_VERSION= -m 1)
sudo /tmp/llvm.sh ${LLVM_VERSION}
if [ "$COMPILER" == "clang" ]; then
msg "installing latest stable clang"
wget https://apt.llvm.org/llvm.sh -O /tmp/llvm.sh
chmod +x /tmp/llvm.sh
# set LLVM_VERSION
eval $(cat /tmp/llvm.sh | grep LLVM_VERSION= -m 1)
sudo /tmp/llvm.sh ${LLVM_VERSION}
fi

msg "creating local test users and groups for testing access control"
sudo ./tools/add_test_users.sh

msg "compiler versions:
$(clang-${LLVM_VERSION} --version)"
$(gcc --version)

msg "building sources"
export CC=clang-${LLVM_VERSION}
export CXX=clang++-${LLVM_VERSION}
./tools/iceoryx_build_test.sh clean build-all out-of-tree build-shared test-add-user

msg "running all tests"
cd ./build
./tools/run_tests.sh all
cd -

if [ "$COMPILER" == "gcc" ]; then
./tools/iceoryx_build_test.sh clean release build-all out-of-tree build-shared test-add-user
fi

if [ "$COMPILER" == "clang" ]; then
export CC=clang-${LLVM_VERSION}
export CXX=clang++-${LLVM_VERSION}
./tools/iceoryx_build_test.sh clean clang release build-all out-of-tree build-shared test-add-user
fi

0 comments on commit 636508a

Please sign in to comment.