Skip to content

Commit

Permalink
[CI] Separate Clang builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
mjpt777 committed May 13, 2021
1 parent 6bddb60 commit c6e2e61
Showing 1 changed file with 62 additions and 2 deletions.
64 changes: 62 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,68 @@ jobs:
name: crash-logs-gcc-centos-${{ matrix.version }}
path: ${{ steps.copy_test_logs.outputs.dir }}

cpp-clang-build:
name: C++ Clang ${{ matrix.version }}
cpp-clang-ubuntu-1804-build:
name: C++ Clang Ubuntu 18.04 ${{ matrix.version }}
runs-on: ubuntu-18.04
strategy:
fail-fast: false
matrix:
version: [ '7', '8' ]
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/bionic/ llvm-toolchain-bionic-${{ 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: cmake --version && cppbuild/cppbuild --c-warnings-as-errors --cxx-warnings-as-errors
- 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-clang-${{ matrix.version }}
path: ${{ steps.copy_test_logs.outputs.dir }}

cpp-clang-ubuntu-2004-build:
name: C++ Clang Ubuntu 20.04 ${{ matrix.version }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
Expand Down

0 comments on commit c6e2e61

Please sign in to comment.