Skip to content

Commit

Permalink
[CI] Add Clang sanitise build to the slow tests build.
Browse files Browse the repository at this point in the history
  • Loading branch information
vyazelenko committed May 14, 2021
1 parent 071f3ba commit c4ade94
Showing 1 changed file with 67 additions and 7 deletions.
74 changes: 67 additions & 7 deletions .github/workflows/ci-low-cadence.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
INSTALL_COMPILER_RETRIES: "5"

jobs:
java-slow-test-build:
java-slow-tests:
name: Java Slow Tests (JDK ${{ matrix.java }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
name: crash-logs-${{ matrix.os }}-java-${{ matrix.java }}
path: ${{ steps.copy_test_logs.outputs.dir }}

c-driver-slow-system-test-gcc-build:
cpp-slow-tests-gcc:
name: C++ Slow System Tests GCC ${{ matrix.version }}
runs-on: ubuntu-20.04
strategy:
Expand Down Expand Up @@ -125,10 +125,10 @@ jobs:
if: always() && steps.copy_test_logs.outputs.dir == 'build/test_logs'
uses: actions/upload-artifact@v2
with:
name: crash-logs-c-gcc-${{ matrix.version }}
name: crash-logs-cpp-slow-tests-gcc-${{ matrix.version }}
path: ${{ steps.copy_test_logs.outputs.dir }}

c-driver-slow-system-test-msvc-build:
cpp-slow-tests-msvc:
name: C++ Slow System Tests MSVC
runs-on: windows-latest
env:
Expand Down Expand Up @@ -171,10 +171,10 @@ jobs:
if: always() && steps.copy_test_logs.outputs.dir == 'build/test_logs'
uses: actions/upload-artifact@v2
with:
name: crash-logs-c-msvc-latest
name: crash-logs-cpp-slow-tests-msvc-latest
path: ${{ steps.copy_test_logs.outputs.dir }}

cpp-gcc-sanitize-build:
cpp-sanitize-gcc:
name: C++ Sanitise Build GCC ${{ matrix.version }}
runs-on: ubuntu-20.04
strategy:
Expand Down Expand Up @@ -226,5 +226,65 @@ jobs:
if: always() && steps.copy_test_logs.outputs.dir == 'build/test_logs'
uses: actions/upload-artifact@v2
with:
name: crash-logs-gcc-sanitize-${{ matrix.version }}
name: crash-logs-cpp-sanitize-gcc-${{ matrix.version }}
path: ${{ steps.copy_test_logs.outputs.dir }}

cpp-sanitize-clang:
name: C++ Sanitise Build Clang ${{ matrix.version }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
version: [ '12' ]
env:
CC: clang-${{ matrix.version }}
CXX: clang++-${{ matrix.version }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Cache Gradle dependencies
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.os }}-gradle-caches-
- name: Cache Gradle wrappers
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
- name: Setup java 8 to run the Gradle script
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: 8
- name: Setup BUILD_JAVA_HOME & BUILD_JAVA_VERSION
run: |
java -Xinternalversion
echo "BUILD_JAVA_HOME=${JAVA_HOME}" >> $GITHUB_ENV
echo "BUILD_JAVA_VERSION=8" >> $GITHUB_ENV
- name: Install compiler
run: |
curl --retry ${INSTALL_COMPILER_RETRIES} -L https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
echo 'Acquire::Retries "${INSTALL_COMPILER_RETRIES}";' | sudo tee -a /etc/apt/apt.conf.d/99retries
sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-${{ matrix.version }} main"
sudo apt-get update
sudo apt-get install -y clang-${{ matrix.version }} libstdc++-7-dev libbsd-dev uuid-dev libidn11
curl --retry ${INSTALL_COMPILER_RETRIES} -O -L https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz
tar xf cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz
echo "cmake-${CMAKE_VERSION}-Linux-x86_64/bin" >> $GITHUB_PATH
- name: Build
run: cppbuild/cppbuild --sanitise-build --c-warnings-as-errors --cxx-warnings-as-errors --slow-system-tests
- name: Copy test logs
id: copy_test_logs
if: failure()
run: |
echo "::set-output name=dir::build/test_logs"
./gradlew copyTestLogs
- name: Upload crash logs
if: always() && steps.copy_test_logs.outputs.dir == 'build/test_logs'
uses: actions/upload-artifact@v2
with:
name: crash-logs-cpp-sanitize-clang-${{ matrix.version }}
path: ${{ steps.copy_test_logs.outputs.dir }}

0 comments on commit c4ade94

Please sign in to comment.