-
Notifications
You must be signed in to change notification settings - Fork 274
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Test the standalone runner nightly
- Loading branch information
Showing
1 changed file
with
74 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Workflow to run tests | ||
|
||
name: standalone compiler runner | ||
|
||
on: | ||
# runs on 2:00 AM PST or 3:00 AM PDT | ||
schedule: | ||
- cron: '0 10 * * *' | ||
|
||
jobs: | ||
build-and-test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
branch: [ main, 1.0.7-release ] | ||
|
||
# The type of runner that the job will run on | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Setup Java 9 | ||
uses: actions/[email protected] | ||
with: | ||
java-version: '9' | ||
java-package: jdk | ||
architecture: x64 | ||
- name: set JDK_9 environment variable for kotlin compiler | ||
shell: bash | ||
env: | ||
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | ||
run: echo ::set-env name=JDK_9::$(echo $JAVA_HOME) | ||
- name: Setup Java 11 | ||
uses: actions/[email protected] | ||
with: | ||
java-version: '11' | ||
java-package: jdk | ||
architecture: x64 | ||
|
||
# Checkout | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ matrix.branch }} | ||
|
||
# Build cache | ||
- name: Cache Gradle Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }}-${{ hashFiles('**/gradle.properties') }} | ||
# An ordered list of keys to use for restoring the cache if no cache hit occurred for key | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Cache gradle wrapper | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} | ||
|
||
# Run tests | ||
- name: test | ||
shell: bash | ||
run: ./gradlew -Pksp.compiler.runner=standalone --stacktrace --info :integration-tests:test :gradle-plugin:test | ||
- name: Upload test results | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: test-reports-standalone-${{ matrix.os }}-${{ matrix.branch }} | ||
path: | | ||
compiler-plugin/build/reports | ||
integration-tests/build/reports | ||
gradle-plugin/build/reports | ||
common-util/build/reports |