Continuous Integration (Low Cadence) #74
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
name: Continuous Integration (Low Cadence) | |
on: | |
workflow_dispatch: | |
repository_dispatch: | |
types: run-slow-tests | |
schedule: | |
- cron: '0 0,12 * * *' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
GRADLE_OPTS: '-Dorg.gradle.daemon=false -Dorg.gradle.java.installations.auto-detect=false -Dorg.gradle.warning.mode=fail' | |
INSTALL_COMPILER_RETRIES: '5' | |
permissions: | |
contents: read | |
jobs: | |
java-slow-tests: | |
name: Java Slow Tests (JDK ${{ matrix.java }}, ${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
java: [ '8', '17', '21' ] | |
os: [ 'ubuntu-22.04', 'windows-latest', 'macos-14' ] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.sha }} | |
- name: Cache Gradle dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle') }} | |
restore-keys: | | |
${{ runner.os }}-gradle-caches- | |
- name: Cache Gradle wrappers | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} | |
- name: Setup java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: ${{ matrix.java }} | |
- name: Setup BUILD_JAVA_HOME & BUILD_JAVA_VERSION (Linux/MacOS) | |
if: runner.os == 'Linux' || runner.os == 'macOS' | |
run: | | |
java -Xinternalversion | |
echo "BUILD_JAVA_HOME=${JAVA_HOME}" >> $GITHUB_ENV | |
echo "BUILD_JAVA_VERSION=${{ matrix.java }}" >> $GITHUB_ENV | |
- name: Setup BUILD_JAVA_HOME & BUILD_JAVA_VERSION (Windows) | |
if: runner.os == 'Windows' | |
run: | | |
java -Xinternalversion | |
echo "BUILD_JAVA_HOME=$env:JAVA_HOME" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append | |
echo "BUILD_JAVA_VERSION=${{ matrix.java }}" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append | |
- name: Setup localhost name (MacOS) | |
if: runner.os == 'macOS' | |
run: | | |
sudo sed -i bak "s/localhost/localhost $(hostname)/" /etc/hosts | |
dscacheutil -flushcache | |
- name: Setup java 8 to run the Gradle script | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 8 | |
- name: Build and Run Slow Tests with Gradle | |
run: ./gradlew slowTest | |
env: | |
BUILD_JAVA_VERSION: ${{ matrix.java }} | |
- name: Copy test logs | |
id: copy_test_logs | |
if: failure() | |
run: | | |
echo "file=build/distributions/test_logs.tbz2" >> $GITHUB_OUTPUT | |
./gradlew tarTestLogs | |
- name: Upload crash logs | |
if: always() && steps.copy_test_logs.outputs.file == 'build/distributions/test_logs.tbz2' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: crash-logs-${{ matrix.os }}-java-${{ matrix.java }} | |
path: ${{ steps.copy_test_logs.outputs.file }} | |
java-javadoc: | |
name: JavaDoc (JDK ${{ matrix.java }}, ${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
java: [ '8', '17', '21' ] | |
os: [ 'ubuntu-22.04' ] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.sha }} | |
- name: Cache Gradle dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle') }} | |
restore-keys: | | |
${{ runner.os }}-gradle-caches- | |
- name: Cache Gradle wrappers | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} | |
- name: Setup java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: ${{ matrix.java }} | |
- name: Setup BUILD_JAVA_HOME & BUILD_JAVA_VERSION (Linux) | |
if: runner.os == 'Linux' | |
run: | | |
java -Xinternalversion | |
echo "BUILD_JAVA_HOME=${JAVA_HOME}" >> $GITHUB_ENV | |
echo "BUILD_JAVA_VERSION=${{ matrix.java }}" >> $GITHUB_ENV | |
- name: Setup java 8 to run the Gradle script | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 8 | |
- name: Build and Run Javadoc | |
run: ./gradlew javadoc | |
env: | |
BUILD_JAVA_VERSION: ${{ matrix.java }} | |
cpp-slow-tests-gcc: | |
name: C++ Slow System Tests GCC ${{ matrix.version }} | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
version: [ '13' ] | |
env: | |
CC: gcc-${{ matrix.version }} | |
CXX: g++-${{ matrix.version }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.sha }} | |
- name: Cache Gradle dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle') }} | |
restore-keys: | | |
${{ runner.os }}-gradle-caches- | |
- name: Cache Gradle wrappers | |
uses: actions/cache@v4 | |
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@v4 | |
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: | | |
echo 'Acquire::Retries "${INSTALL_COMPILER_RETRIES}";' | sudo tee -a /etc/apt/apt.conf.d/99retries | |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test | |
sudo apt-get update | |
sudo apt-get install -y g++-${{ matrix.version }} libbsd-dev uuid-dev | |
- name: Build | |
run: cppbuild/cppbuild --c-warnings-as-errors --cxx-warnings-as-errors --slow-system-tests --no-system-tests --no-unit-tests | |
- name: Copy test logs | |
id: copy_test_logs | |
if: failure() | |
run: | | |
echo "file=build/distributions/test_logs.tbz2" >> $GITHUB_OUTPUT | |
./gradlew tarTestLogs | |
- name: Upload crash logs | |
if: always() && steps.copy_test_logs.outputs.file == 'build/distributions/test_logs.tbz2' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: crash-logs-cpp-slow-tests-gcc-${{ matrix.version }} | |
path: ${{ steps.copy_test_logs.outputs.file }} | |
cpp-slow-tests-clang: | |
name: C++ Slow System Tests Clang ${{ matrix.version }} | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
version: [ '18' ] | |
env: | |
CC: clang-${{ matrix.version }} | |
CXX: clang++-${{ matrix.version }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.sha }} | |
- name: Cache Gradle dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle') }} | |
restore-keys: | | |
${{ runner.os }}-gradle-caches- | |
- name: Cache Gradle wrappers | |
uses: actions/cache@v4 | |
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@v4 | |
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: | | |
echo 'Acquire::Retries "${INSTALL_COMPILER_RETRIES}";' | sudo tee -a /etc/apt/apt.conf.d/99retries | |
sudo mkdir -p /etc/apt/keyrings/ | |
curl --retry ${INSTALL_COMPILER_RETRIES} https://apt.llvm.org/llvm-snapshot.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/llvm-snapshot.gpg | |
echo "deb [signed-by=/etc/apt/keyrings/llvm-snapshot.gpg] http://apt.llvm.org/jammy/ llvm-toolchain-jammy-${{ matrix.version }} main" | sudo tee /etc/apt/sources.list.d/llvm.list | |
sudo apt-get update | |
sudo apt-get install -y clang-${{ matrix.version }} libbsd-dev uuid-dev | |
- name: Build | |
run: cppbuild/cppbuild --c-warnings-as-errors --cxx-warnings-as-errors --slow-system-tests --no-system-tests --no-unit-tests | |
- name: Copy test logs | |
id: copy_test_logs | |
if: failure() | |
run: | | |
echo "file=build/distributions/test_logs.tbz2" >> $GITHUB_OUTPUT | |
./gradlew tarTestLogs | |
- name: Upload crash logs | |
if: always() && steps.copy_test_logs.outputs.file == 'build/distributions/test_logs.tbz2' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: crash-logs-cpp-slow-tests-clang-${{ matrix.version }} | |
path: ${{ steps.copy_test_logs.outputs.file }} | |
cpp-slow-tests-msvc: | |
name: C++ Slow System Tests MSVC | |
runs-on: windows-latest | |
env: | |
CC: cl | |
CXX: cl | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.sha }} | |
- name: Cache Gradle dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle') }} | |
restore-keys: | | |
${{ runner.os }}-gradle-caches- | |
- name: Cache Gradle wrappers | |
uses: actions/cache@v4 | |
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@v4 | |
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: Build | |
run: cppbuild/cppbuild.ps1 --slow-system-tests --no-system-tests --no-unit-tests | |
- name: Copy test logs | |
id: copy_test_logs | |
if: failure() | |
run: | | |
echo "file=build/distributions/test_logs.tbz2" >> $GITHUB_OUTPUT | |
./gradlew tarTestLogs | |
- name: Upload crash logs | |
if: always() && steps.copy_test_logs.outputs.file == 'build/distributions/test_logs.tbz2' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: crash-logs-cpp-slow-tests-msvc-latest | |
path: ${{ steps.copy_test_logs.outputs.file }} | |
cpp-sanitize-gcc: | |
name: C++ Sanitise Build GCC ${{ matrix.version }} | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
version: [ '13' ] | |
env: | |
CC: gcc-${{ matrix.version }} | |
CXX: g++-${{ matrix.version }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.sha }} | |
- name: Cache Gradle dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle') }} | |
restore-keys: | | |
${{ runner.os }}-gradle-caches- | |
- name: Cache Gradle wrappers | |
uses: actions/cache@v4 | |
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@v4 | |
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: | | |
echo 'Acquire::Retries "${INSTALL_COMPILER_RETRIES}";' | sudo tee -a /etc/apt/apt.conf.d/99retries | |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test | |
sudo apt-get update | |
sudo apt-get install -y g++-${{ matrix.version }} libbsd-dev uuid-dev | |
- name: Build | |
run: cmake --version; make --version; ldd --version; g++-${{ matrix.version }} --version; cppbuild/cppbuild --relwithdebinfo-build --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 "file=build/distributions/test_logs.tbz2" >> $GITHUB_OUTPUT | |
./gradlew tarTestLogs | |
- name: Upload crash logs | |
if: always() && steps.copy_test_logs.outputs.file == 'build/distributions/test_logs.tbz2' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: crash-logs-cpp-sanitize-gcc-${{ matrix.version }} | |
path: ${{ steps.copy_test_logs.outputs.file }} | |
cpp-sanitize-clang: | |
name: C++ Sanitise Build Clang ${{ matrix.version }} | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
version: [ '18' ] | |
env: | |
CC: clang-${{ matrix.version }} | |
CXX: clang++-${{ matrix.version }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.sha }} | |
- name: Cache Gradle dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle') }} | |
restore-keys: | | |
${{ runner.os }}-gradle-caches- | |
- name: Cache Gradle wrappers | |
uses: actions/cache@v4 | |
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@v4 | |
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: | | |
echo 'Acquire::Retries "${INSTALL_COMPILER_RETRIES}";' | sudo tee -a /etc/apt/apt.conf.d/99retries | |
sudo mkdir -p /etc/apt/keyrings/ | |
curl --retry ${INSTALL_COMPILER_RETRIES} https://apt.llvm.org/llvm-snapshot.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/llvm-snapshot.gpg | |
echo "deb [signed-by=/etc/apt/keyrings/llvm-snapshot.gpg] http://apt.llvm.org/jammy/ llvm-toolchain-jammy-${{ matrix.version }} main" | sudo tee /etc/apt/sources.list.d/llvm.list | |
sudo apt-get update | |
sudo apt-get install -y clang-${{ matrix.version }} libbsd-dev uuid-dev | |
- name: Build | |
run: cppbuild/cppbuild --relwithdebinfo-build --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 "file=build/distributions/test_logs.tbz2" >> $GITHUB_OUTPUT | |
./gradlew tarTestLogs | |
- name: Upload crash logs | |
if: always() && steps.copy_test_logs.outputs.file == 'build/distributions/test_logs.tbz2' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: crash-logs-cpp-sanitize-clang-${{ matrix.version }} | |
path: ${{ steps.copy_test_logs.outputs.file }} |