Skip to content

Commit

Permalink
iox-eclipse-iceoryx#932 Add CI jobs for latest gcc and clang
Browse files Browse the repository at this point in the history
Signed-off-by: Dietrich Krönke <[email protected]>
  • Loading branch information
dkroenke committed Sep 30, 2021
1 parent 72a5cf7 commit 51d453d
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 25 deletions.
30 changes: 26 additions & 4 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
24 changes: 20 additions & 4 deletions tools/ci/build-test-ubuntu-with-sanitizers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

set -e

COMPILER=${1:-gcc}

msg() {
printf "\033[1;32m%s: %s\033[0m\n" ${FUNCNAME[1]} "$1"
}
Expand All @@ -29,15 +31,29 @@ 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)"

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
Expand Down
2 changes: 1 addition & 1 deletion tools/ci/build-test-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Up @@ -19,6 +19,8 @@

set -e

COMPILER=${1:-gcc}

msg() {
printf "\033[1;32m%s: %s\033[0m\n" ${FUNCNAME[1]} "$1"
}
Expand All @@ -29,25 +31,27 @@ 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)"

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 51d453d

Please sign in to comment.