diff --git a/.github/workflows/compiler.yaml b/.github/workflows/compiler.yaml new file mode 100644 index 00000000000..019e7441d30 --- /dev/null +++ b/.github/workflows/compiler.yaml @@ -0,0 +1,56 @@ +name: Compiler Test Only +on: + push: + branches: + - main + - '**' + +env: + IS_OWN_PR: "${{ secrets.MAVEN_MIRROR_URL }}" + +jobs: + compiler-tests: + name: "Compiler Tests (${{matrix.run}})" + if: ${{ !(github.ref == 'refs/heads/main' && contains(github.event.head_commit.message, '[maven-release-plugin]')) }} + # needs: [test-linux] # CHANGED w.r.t buid.yaml + runs-on: buildjet-2vcpu-ubuntu-2204 + strategy: # CHANGED w.r.t. buildyaml + matrix: + run: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] + env: + MAVEN_OPTS: "-Xmx512M -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true" + steps: + - uses: actions/checkout@v4 + + - uses: s4u/maven-settings-action@v3.1.0 + if: ${{ env.IS_OWN_PR != '' }} + with: + servers: '[{"id": "usethesource-gh", "username":"github", "password": "${{ secrets.MAVEN_MIRROR_PASSWORD }}"}]' + mirrors: '[{"id": "usethesource-gh", "name": "uts mirror", "mirrorOf": "usethesource", "url": "${{ secrets.MAVEN_MIRROR_URL }}"}]' + - uses: actions/setup-java@v4 + with: + java-version: 11 + distribution: 'temurin' + cache: 'maven' + overwrite-settings: false + + - name: Retrieve dependencies for integration tests + run: bash src/org/rascalmpl/compiler/lang/rascalcore/check/tests/download-test-jars.sh + + - name: Run Tests + run: mvn -B -Pcompiler-tests -Drascal.compile.skip -Drascal.tutor.skip -Drascal.test.memory=10 test + + - uses: codecov/codecov-action@v4 + continue-on-error: true # sometimes this one fails, that shouldn't stop a build + with: + fail_ci_if_error: false + verbose: true + token: ${{ secrets.CODECOV_TOKEN }} + + - name: Publish Test Report on github action + if: ${{ always() && github.event_name != 'pull_request' }} # to bad this doesn't work nicely with external pull requests + continue-on-error: true # sometimes this one fails, that shouldn't stop a build + uses: scacap/action-surefire-report@v1 + with: + check_name: "Compiler Test Report" +