• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1on:
2  # runs on 4:30 AM PST or 5:30 AM PDT
3  schedule:
4    - cron:  '30 12 * * *'
5jobs:
6  build-and-test:
7    strategy:
8      fail-fast: false
9      matrix:
10        branch: [ main, 1.0.9-release, 1.0.10-release ]
11    runs-on: windows-latest
12    steps:
13      - name: configure Pagefile
14        uses: al-cheb/configure-pagefile-action@v1.2
15        with:
16          minimum-size: 8
17          maximum-size: 16
18          disk-root: "D:"
19      - name: Setup Java 9
20        uses: actions/setup-java@v1.4.3
21        with:
22          java-version: '9'
23          java-package: jdk
24          architecture: x64
25      - name: set JDK_9 environment variable for kotlin compiler
26        shell: bash
27        env:
28          ACTIONS_ALLOW_UNSECURE_COMMANDS: true
29        run: echo ::set-env name=JDK_9::$(echo $JAVA_HOME)
30      - name: Setup Java 11
31        uses: actions/setup-java@v1.4.3
32        with:
33          java-version: '11'
34          java-package: jdk
35          architecture: x64
36
37      # Checkout
38      - uses: actions/checkout@v2
39        with:
40          fetch-depth: 0
41          ref: ${{ matrix.branch }}
42
43      # Build cache
44      - name: Cache Gradle Cache
45        uses: actions/cache@v2
46        with:
47          path: ~/.gradle/caches
48          key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }}-${{ hashFiles('**/gradle.properties') }}
49          # An ordered list of keys to use for restoring the cache if no cache hit occurred for key
50          restore-keys: |
51            ${{ runner.os }}-gradle-
52      - name: Cache gradle wrapper
53        uses: actions/cache@v2
54        with:
55          path: ~/.gradle/wrapper
56          key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
57
58      # Run tests
59      - name: test
60        shell: bash
61        run: ./gradlew --stacktrace --info test
62      - name: Upload test results
63        if: always()
64        uses: actions/upload-artifact@v3
65        with:
66          name: test-reports-windows-latest
67          path: |
68            compiler-plugin/build/reports
69            integration-tests/build/reports
70            gradle-plugin/build/reports
71            common-util/build/reports
72