Skip to content

Nightly

Nightly #628

Workflow file for this run

name: Nightly
on:
workflow_dispatch:
schedule:
- cron: '0 1 * * *' # Nightly at 1am
defaults:
run:
shell: bash
jobs:
nightly:
strategy:
fail-fast: false
matrix:
os: [ macOS-12, ubuntu-22.04, windows-2022 ]
java: [ 11, 17 ]
runs-on: ${{ matrix.os }}
steps:
- run: git config --global core.longpaths true
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: temurin
cache: maven
- run: mvn -version
- name: Install
run: mvn install --errors --batch-mode --no-transfer-progress -Dcheckstyle.skip -T 1C
- name: Create issue if previous step fails
if: ${{ failure() }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh issue create \
--title "Nightly build for Java ${{ matrix.java }} on ${{ matrix.os }} failed." \
--body "The build has failed : https://github.com/googleapis/gapic-generator-java/actions/runs/${GITHUB_RUN_ID}"
nightly-java8: # Compile with JDK 11. Run tests with JDK 8.
strategy:
fail-fast: false
matrix:
os: [ macOS-12, ubuntu-22.04, windows-2022 ]
runs-on: ${{ matrix.os }}
steps:
- run: git config --global core.longpaths true
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 11
distribution: temurin
cache: maven
- run: mvn -version
- name: Install with Java 11
run: mvn install --errors --batch-mode --no-transfer-progress -Dcheckstyle.skip -DskipTests -T 1C
- uses: actions/setup-java@v3
with:
java-version: 8
distribution: temurin
- run: mvn -version
- name: Test with Java 8
# Direct goal invocation ("surefire:test") prevents recompiling tests
run: mvn surefire:test --errors --batch-mode --no-transfer-progress -T 1C
- name: Create issue if previous step fails
if: ${{ failure() }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh issue create \
--title "Nightly-java8 build on ${{ matrix.os }} failed." \
--body "The build has failed : https://github.com/googleapis/gapic-generator-java/actions/runs/${GITHUB_RUN_ID}"