Skip to content

Enable configuration cache for C++ tasks #1173

Enable configuration cache for C++ tasks

Enable configuration cache for C++ tasks #1173

name: Continuous integration
on:
pull_request:
push:
branches-ignore:
- 'dependabot/**'
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build_gradle:
name: "JDK ${{ matrix.java }} on ${{ matrix.os }}"
strategy:
matrix:
include:
- os: macos-latest
java: 11
# Apple Silicon M1 CPU according to <https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories>
- os: macos-14
java: 11
- os: ubuntu-latest
java: 11
- os: windows-latest
java: 11
- os: ubuntu-latest
java: 17
- os: ubuntu-latest
java: 21
- os: ubuntu-latest
java: 23
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Check out WALA sources
uses: actions/checkout@v4
- name: 'Set up JDK ${{ matrix.java }}'
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build and test using Gradle with ECJ
# use xvfb-gradle.sh to avoid headless test failures on Linux
run: ./xvfb-gradle.sh aggregatedJavadocs build publishAllPublicationsToFakeRemoteRepository shellcheck --no-configuration-cache "-Pcom.ibm.wala.jdk-version=${{ matrix.java }}"
# testing ECJ compilation on any one OS is sufficient; we choose Linux arbitrarily
if: runner.os == 'Linux'
- name: Build and test using Gradle but without ECJ
run: ./gradlew aggregatedJavadocs javadoc build -PskipJavaUsingEcjTasks --no-configuration-cache "-Pcom.ibm.wala.jdk-version=${{ matrix.java }}"
if: runner.os != 'Linux'
- name: Check for Git cleanliness after build and test
run: ./check-git-cleanliness.sh
# not running in Borne or POSIX shell on Windows
if: runner.os != 'Windows'
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: Test results for JDK ${{ matrix.java }} on ${{ matrix.os }}
path: '**/build/test-results/test/TEST-*.xml'
upload_event_file:
name: Upload event file
runs-on: ubuntu-latest
steps:
- name: Upload event file
uses: actions/upload-artifact@v4
with:
name: Event file
path: ${{ github.event_path }}
generate_docs:
name: 'Generate latest docs'
needs: build_gradle
if: github.event_name == 'push' && github.repository == 'wala/WALA' && github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
env:
JDK_VERSION: 23
steps:
- name: 'Check out repository'
uses: actions/checkout@v4
- name: 'Set up JDK'
uses: actions/setup-java@v4
with:
java-version: ${{ env.JDK_VERSION }}
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: 'Generate latest docs'
env:
GITHUB_TOKEN: ${{ secrets.WALA_BOT_GH_TOKEN }}
run: ./generate-latest-docs.sh ${{ env.JDK_VERSION }}