|
| 1 | +name: Compiler Test Only |
| 2 | +on: |
| 3 | + push: |
| 4 | + branches: |
| 5 | + - main |
| 6 | + tags: |
| 7 | + - 'v[0-9]+.*' |
| 8 | + pull_request: |
| 9 | + branches: |
| 10 | + - main |
| 11 | + - 'feat/*' |
| 12 | + |
| 13 | +env: |
| 14 | + MAVEN_OPTS: "-Xmx4G -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true" |
| 15 | + IS_OWN_PR: "${{ secrets.MAVEN_MIRROR_URL }}" |
| 16 | + |
| 17 | +jobs: |
| 18 | + compiler-tests: |
| 19 | + name: "Compiler Tests (${{matrix.run}})" |
| 20 | + if: ${{ !(github.ref == 'refs/heads/main' && contains(github.event.head_commit.message, '[maven-release-plugin]')) }} |
| 21 | + # needs: [test-linux] # CHANGED w.r.t buid.yaml |
| 22 | + runs-on: buildjet-4vcpu-ubuntu-2204 |
| 23 | + strategy: # CHANGED w.r.t. buildyaml |
| 24 | + matrix: |
| 25 | + run: [1, 2, 3, 4, 5, 6] # based on 50% failure rate, this gives us ~1% chance of a false negative |
| 26 | + env: |
| 27 | + MAVEN_OPTS: "-Xmx512M -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true" |
| 28 | + steps: |
| 29 | + - uses: actions/checkout@v4 |
| 30 | + |
| 31 | + |
| 32 | + if: ${{ env.IS_OWN_PR != '' }} |
| 33 | + with: |
| 34 | + servers: '[{"id": "usethesource-gh", "username":"github", "password": "${{ secrets.MAVEN_MIRROR_PASSWORD }}"}]' |
| 35 | + mirrors: '[{"id": "usethesource-gh", "name": "uts mirror", "mirrorOf": "usethesource", "url": "${{ secrets.MAVEN_MIRROR_URL }}"}]' |
| 36 | + - uses: actions/setup-java@v4 |
| 37 | + with: |
| 38 | + java-version: 11 |
| 39 | + distribution: 'temurin' |
| 40 | + cache: 'maven' |
| 41 | + overwrite-settings: false |
| 42 | + |
| 43 | + - name: Retrieve dependencies for integration tests |
| 44 | + run: bash src/org/rascalmpl/compiler/lang/rascalcore/check/tests/download-test-jars.sh |
| 45 | + |
| 46 | + - name: Run Tests |
| 47 | + run: mvn -B -Pcompiler-tests -Drascal.compile.skip -Drascal.tutor.skip -Drascal.test.memory=10 test |
| 48 | + |
| 49 | + - uses: codecov/codecov-action@v4 |
| 50 | + continue-on-error: true # sometimes this one fails, that shouldn't stop a build |
| 51 | + with: |
| 52 | + fail_ci_if_error: false |
| 53 | + verbose: true |
| 54 | + token: ${{ secrets.CODECOV_TOKEN }} |
| 55 | + |
| 56 | + - name: Publish Test Report on github action |
| 57 | + if: ${{ always() && github.event_name != 'pull_request' }} # to bad this doesn't work nicely with external pull requests |
| 58 | + continue-on-error: true # sometimes this one fails, that shouldn't stop a build |
| 59 | + uses: scacap/action-surefire-report@v1 |
| 60 | + with: |
| 61 | + check_name: "Compiler Test Report" |
| 62 | + |
0 commit comments