From 51694711c870c577f585a299e9a3264db55c529e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20L=C3=BCpges?= Date: Mon, 4 Nov 2024 10:48:28 +0100 Subject: [PATCH] Github Actions & Issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Alex Lüpges --- .github/ISSUE_TEMPLATE/bug_report.yml | 70 ++++++++ .github/ISSUE_TEMPLATE/config.yml | 11 ++ .github/ISSUE_TEMPLATE/feature_request.yml | 37 ++++ .github/workflows/deploy_release_mc.yml | 32 ++++ .github/workflows/deploy_snapshot_mc.yml | 58 +++++++ .github/workflows/gradle_mc.yml | 158 ++++++++++++++++++ .github/workflows/prepare_pages.yml | 3 +- .gitlab-ci.yml | 11 +- build.gradle | 28 +++- docs/CI.md | 41 +++++ gradle.properties | 9 +- monticore-generator/build.gradle | 26 ++- .../01.experiments/demonstrator/build.gradle | 7 + .../01.experiments/hooks/build.gradle | 7 + .../01.experiments/templates/build.gradle | 7 + settings.gradle | 4 +- 16 files changed, 480 insertions(+), 29 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .github/workflows/deploy_release_mc.yml create mode 100644 .github/workflows/deploy_snapshot_mc.yml create mode 100644 .github/workflows/gradle_mc.yml create mode 100644 docs/CI.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000000..718bb0ea73 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,70 @@ +name: Bug Report +description: Report an issue with MontiCore +labels: [bug] +body: + - type: checkboxes + id: version + attributes: + label: Are you able replicate the bug in the latest version of MontiCore. + options: + - label: I am able to replicate the bug in the [latest version](https://github.com/MontiCore/monticore/releases) of MontiCore + required: true + - type: textarea + id: bugdesc + attributes: + label: Describe the bug + description: | + A clear and concise description of what the bug is + validations: + required: true + - type: textarea + id: steps_reproduce + attributes: + label: Steps to reproduce + description: Tell us how we can reproduce the issue + placeholder: | + 1. Go to ... + 2. Use the ... + 3. See error + validations: + required: true + - type: input + id: expectedBehaviour + attributes: + label: Expected behaviour + description: | + A clear and concise description of what you expected to happen. + validations: + required: true + - type: textarea + id: project_reproduce + attributes: + label: Minimal reproducible example + description: If applicable, provide a minimal grammar/model/code or link to a GitHub project to reproduce your problem. + validations: + required: false + - type: input + id: ci + attributes: + label: Relevant CI workflow/pipeline + description: If applicable, provide a link to a CI artifact where this bug occurred. + validations: + required: false + - type: textarea + id: gradle_output + attributes: + label: Gradle Log + description: | + If applicable, add the Gradle's info log level output. + + You can customize the log level using the `--info` options, i.e. `gradle build --info`. + This helps us determine your Java and Gradle versions. + validations: + required: false + - type: textarea + id: additional + attributes: + label: Additional information + description: Add any other context about the problem here + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000000..742f8fe09f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,11 @@ +blank_issues_enabled: false +contact_links: + - name: MontiCore handbook + url: https://www.monticore.de/handbook.pdf + about: The handbook gives an in-detail overview over a number of core mechanisms of MontiCore + - name: Teaching + url: https://www.se-rwth.de/teaching/ + about: In case you are a student using MontiCore within a lecture, contact your teaching assistant in regards to exercises. + - name: More Information + url: https://monticore.github.io/monticore/#more-information-about-monticore + about: A list of additional resources about MontiCore diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000000..aa7de3dd88 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,37 @@ +name: Feature Request +description: Suggest an idea for the MontiCore language workbench +labels: ["feature:request"] +body: + - type: textarea + id: problem + attributes: + label: Is your feature request related to a problem? Please describe. + description: A clear and concise description of what the problem is. + placeholder: | + I'm always frustrated when ... + validations: + required: true + - type: textarea + id: suggestion + attributes: + label: Describe the solution you'd like? + description: Please described your feature request in as much detail as possible + placeholder: | + I would like to see ... added to MontiCore because ... + validations: + required: true + - type: input + id: alternatives + attributes: + label: Describe alternatives you've considered + description: | + A clear and concise description of any alternative solutions or features you've considered. + validations: + required: false + - type: textarea + id: additional + attributes: + label: Additional context + description: Add any other context or screenshots about the feature request here + validations: + required: false \ No newline at end of file diff --git a/.github/workflows/deploy_release_mc.yml b/.github/workflows/deploy_release_mc.yml new file mode 100644 index 0000000000..2a2758a6ae --- /dev/null +++ b/.github/workflows/deploy_release_mc.yml @@ -0,0 +1,32 @@ +# (c) https://github.com/MontiCore/monticore +name: Publish a Release + +on: + release: + types: + - created + +permissions: + contents: read + packages: write + +env: + GRADLE_VERSION: 7.4 # Gradle version used + GRADLE_CLI_OPTS: "-Pci" # CLI option passed to Gradle + +jobs: + # Deploy the current tag as a release + deploy-release: + runs-on: ubuntu-latest + steps: + - name: Checkout project sources + uses: actions/checkout@v3 + - name: Gradle DeployMC + uses: gradle/actions/setup-gradle@v3 + with: + gradle-version: ${{env.GRADLE_VERSION}} + # pass the tag as the version property (${{ github.ref_name }}) + arguments: deployMC ${{env.GRADLE_CLI_OPTS}} -PmavenPassword=${{env.MAVEN_PASSWORD}} -PmavenUser=${{env.MAVEN_USER}} -PgenEMF=true -PgenTR=true -PgenTagging=true -Pversion=${{ github.ref_name }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # TODO: Create and publish the monticore.tar.gz diff --git a/.github/workflows/deploy_snapshot_mc.yml b/.github/workflows/deploy_snapshot_mc.yml new file mode 100644 index 0000000000..98b5a71621 --- /dev/null +++ b/.github/workflows/deploy_snapshot_mc.yml @@ -0,0 +1,58 @@ +# (c) https://github.com/MontiCore/monticore +# This workflow publishes the jar of a (GitHub) publication, and then triggers downstream projects +name: Gradle Deploy Snapshot + +concurrency: # run this deploy workflow only once per repository + group: ${{ github.repository }}-${{ github.workflow }} + cancel-in-progress: true + +on: + workflow_run: # Note: This event will only trigger a workflow run if the workflow file is on the default branch + workflows: [ Gradle Test & Build ] + branches: [ dev ] + types: + - completed + +permissions: + contents: read + packages: write + +env: + GRADLE_VERSION: 7.4 # Gradle version used + GRADLE_CLI_OPTS: "-Pci" # CLI option passed to Gradle + +jobs: + # Deploy the snapshot-publications to the snapshot repository (both nexus and GitHub Packages) + deploy-snapshot: + if: ${{ github.event.workflow_run.conclusion == 'success' }} # only run if tests were successful + runs-on: ubuntu-latest + steps: + - name: Checkout project sources + uses: actions/checkout@v3 + - name: Deploy the snapshot + uses: gradle/actions/setup-gradle@v3 + with: + gradle-version: ${{env.GRADLE_VERSION}} + arguments: deployMC ${{env.GRADLE_CLI_OPTS}} -PmavenPassword=${{env.MAVEN_PASSWORD}} -PmavenUser=${{env.MAVEN_USER}} -PgenEMF=true -PgenTR=true -PgenTagging=true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # Trigger GitHub downstream projects (without reporting the pipeline result) + trigger-github-downstream: + needs: [ deploy-snapshot ] + runs-on: ubuntu-latest + strategy: + matrix: + project: [ "MontiCore/statecharts" ] + steps: + - name: Trigger ${{ matrix.project }} + uses: peter-evans/repository-dispatch@v3 + with: + token: ${{ secrets.DOWNSTREAM_PAT }} + repository: ${{ matrix.project }} + event-type: trigger_after_upstream_deploy + + # We do not trigger (internal) GitLab downstream projects + + + # TODO: Trigger correct Downstream Projects (both on GitHub and GitLab) diff --git a/.github/workflows/gradle_mc.yml b/.github/workflows/gradle_mc.yml new file mode 100644 index 0000000000..b443f701c7 --- /dev/null +++ b/.github/workflows/gradle_mc.yml @@ -0,0 +1,158 @@ +# (c) https://github.com/MontiCore/monticore +name: Gradle Test & Build + + +concurrency: # run this test workflow only once per "branch" + group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: + push: # run this test pipeline on every push + paths-ignore: + - "*.md" + pull_request: # and pull request + paths-ignore: + - "*.md" + repository_dispatch: # and on request of upstream projects + types: [ trigger_after_upstream_deploy ] + + +env: + GRADLE_VERSION: 7.4 # Gradle version used + GRADLE_CLI_OPTS: "-Pci --build-cache " # CLI option passed to Gradle + GRADLE_BUILD_ACTION_CACHE_KEY_JOB: "test-cache-${{ github.head_ref }}.${{ github.sha }}" + +permissions: + contents: read # This action may run somewhat unsafe code + + +jobs: + build-generator: # Note: Build-Cache may not work yet + runs-on: ubuntu-latest + steps: + - name: Checkout project sources + uses: actions/checkout@v3 + - name: Build the monticore-generator + uses: gradle/actions/setup-gradle@v3 + with: + gradle-version: ${{env.GRADLE_VERSION}} + arguments: build -p monticore-generator ${{env.GRADLE_CLI_OPTS}} + + build-mc: + runs-on: ubuntu-latest + needs: build-generator + steps: + - name: Checkout project sources + uses: actions/checkout@v3 + - name: Build monticore (buildMC) + uses: gradle/actions/setup-gradle@v3 + with: + gradle-version: ${{env.GRADLE_VERSION}} + arguments: buildMC ${{env.GRADLE_CLI_OPTS}} -PgenTR=true -PgenEMF=true -PgenTagging=true + + # first set of experiments from the handbook + test-01-experiments: + runs-on: ubuntu-latest + needs: build-mc + steps: + - name: Checkout project sources + uses: actions/checkout@v3 + - name: Test 01.experiments + uses: gradle/actions/setup-gradle@v3 + with: + gradle-version: ${{env.GRADLE_VERSION}} + arguments: build test -p monticore-test/01.experiments ${{env.GRADLE_CLI_OPTS}} -PgenEMF=true + + # second set of experiments from the handbook + test-02-experiments: + runs-on: ubuntu-latest + needs: build-mc + steps: + - name: Checkout project sources + uses: actions/checkout@v3 + - name: Test 02.experiments + uses: gradle/actions/setup-gradle@v3 + with: + gradle-version: ${{env.GRADLE_VERSION}} + arguments: build test -p monticore-test/02.experiments ${{env.GRADLE_CLI_OPTS}} -PgenEMF=true + + # test integration tests from the it project + test-it: + runs-on: ubuntu-latest + needs: build-mc + steps: + - name: Checkout project sources + uses: actions/checkout@v3 + - name: Test monticore-test/it + uses: gradle/actions/setup-gradle@v3 + with: + gradle-version: ${{env.GRADLE_VERSION}} + arguments: build test -p monticore-test/it ${{env.GRADLE_CLI_OPTS}} + - name: Checking that all file handles in the target folder are closed + run: if pgrep java | xargs -i ls -la /proc/{}/fd | grep "monticore-test/it/target/"; then echo "Found open file handles!"; exit 1; else echo "No open file handles."; exit 0; fi + + # test integration tests from the it project, using the emf profile + test-it-emf: + runs-on: ubuntu-latest + needs: build-mc + steps: + - name: Checkout project sources + uses: actions/checkout@v3 + - name: Test monticore-test/it with emf profile + uses: gradle/actions/setup-gradle@v3 + with: + gradle-version: ${{env.GRADLE_VERSION}} + arguments: build test -p monticore-test/it ${{env.GRADLE_CLI_OPTS}} -PbuildProfile=emf -PgenEMF=true + + # Grammar integration tests + test-grammar-it: + runs-on: ubuntu-latest + needs: build-mc + steps: + - name: Checkout project sources + uses: actions/checkout@v3 + - name: Test monticore-grammar-it + uses: gradle/actions/setup-gradle@v3 + with: + gradle-version: ${{env.GRADLE_VERSION}} + arguments: build test -p monticore-test/monticore-grammar-it ${{env.GRADLE_CLI_OPTS}} -PgenEMF=true + + # Transformation tests + test-montitrans: + runs-on: ubuntu-latest + needs: build-mc + steps: + - name: Checkout project sources + uses: actions/checkout@v3 + - name: Test monticore-grammar-it + uses: gradle/actions/setup-gradle@v3 + with: + gradle-version: ${{env.GRADLE_VERSION}} + arguments: build test -p monticore-test/montitrans ${{env.GRADLE_CLI_OPTS}} -PgenTR=true + + + + # Run the MontiVerse pipeline (tests this change on a suite of projects) + trigger-montiverse: + if: ${{ !github.event.client_payload && github.ref != 'refs/heads/dev'}} # do not run on upstream-changes or default branch + runs-on: ubuntu-latest + needs: [ build-mc ] + steps: + - name: Trigger MontiVerse + uses: digital-blueprint/gitlab-pipeline-trigger-action@v1 + with: + host: 'git.rwth-aachen.de' + trigger_token: ${{ secrets.MONTIVERSE_TRIGGER_TOKEN }} + access_token: ${{ secrets.MONTIVERSE_ACCESS_TOKEN }} # Access is required to show the status + id: '91803' # montiverseci project id + ref: 'main' + # TODO: Include entire git path here instead (due to PRs) + variables: '{"MONTICORE_BRANCH":"${{github.ref}}"}' + + # TODO: Proper message in PRs (turn the MontiVerse into a GitHub Action?)? + +# TODO: FIX to specific version instead of @v3 + +# TODO: check-links + +# TODO: checkMLCs diff --git a/.github/workflows/prepare_pages.yml b/.github/workflows/prepare_pages.yml index ec9b466097..f73f62faa0 100644 --- a/.github/workflows/prepare_pages.yml +++ b/.github/workflows/prepare_pages.yml @@ -1,4 +1,4 @@ -# .github/workflows/prepare_pages.yml +# (c) https://github.com/MontiCore/monticore name: Prepare And Deploy Pages # Preprocess the docs, build a site directory and push its contents to the gh-pages branch @@ -10,6 +10,7 @@ on: jobs: build: + if: false # TODO: RE-ENABLE runs-on: ubuntu-latest env: GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }} diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fabd25b6f7..96660e1c80 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,11 +14,12 @@ variables: before_script: - export GRADLE_USER_HOME=`pwd`/.gradle -#cache: -# paths: -# - .m2/ -# - .gradle/wrapper -# key: ${CI_COMMIT_REF_SLUG} # Cache per branch +# Cache the gradle build cache +cache: + key: gradle-cache-key + paths: + - .gradle/caches + policy: pull-push stages: - build diff --git a/build.gradle b/build.gradle index 2b59076287..f7a19e0a79 100644 --- a/build.gradle +++ b/build.gradle @@ -85,8 +85,6 @@ subprojects { options.deprecation false options.warnings = false options.forkOptions.jvmArgs += ["-Xmx4G"] - // TODO: reevaluate with new ecj plugin - outputs.cacheIf {false} // ECJ has problem with caching } java { withSourcesJar() @@ -256,12 +254,26 @@ configure(projectsToConfigure){ from(components.java) } } - repositories.maven { - credentials.username mavenUser - credentials.password mavenPassword - def releasesRepoUrl = "https://nexus.se.rwth-aachen.de/content/repositories/monticore-releases/" - def snapshotsRepoUrl = "https://nexus.se.rwth-aachen.de/content/repositories/monticore-snapshots/" - url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl + repositories { + maven { + name = "SE-Nexus" + credentials.username mavenUser + credentials.password mavenPassword + def releasesRepoUrl = "https://nexus.se.rwth-aachen.de/content/repositories/monticore-releases/" + def snapshotsRepoUrl = "https://nexus.se.rwth-aachen.de/content/repositories/monticore-snapshots/" + url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl + } + // Also publish to the github repository, if run on a github action + if (System.getenv("GITHUB_REPOSITORY") != null) { + maven { + name = "GitHubPackages" + url = "https://maven.pkg.github.com/" + System.getenv("GITHUB_REPOSITORY") + credentials { + username = System.getenv("GITHUB_ACTOR") + password = System.getenv("GITHUB_TOKEN") + } + } + } } } } diff --git a/docs/CI.md b/docs/CI.md new file mode 100644 index 0000000000..3157cd92db --- /dev/null +++ b/docs/CI.md @@ -0,0 +1,41 @@ + + +The CI is (as of 2024) partially run via GitHub actions and for private +projects, +on the RWTH GitLab. + +## Workflow [gradle_mc.yml](../.github/workflows/gradle_mc.yml) + +Uses Gradle to test & build the project. + +## Trigger MontiVerse [trigger_montiverse.yml](../.github/workflows/trigger_montiverse.yml) + +The MontiVerse is a collection of language projects +Publishes the release to GitHub packages (using `$GITHUB_REPOSITORY`) and +the se-nexus. +In addition, the tutorial tar.gz is packaged and added as an artifact (TODO). + +## Deploy Snapshot [deploy_snapshot_mc.yml](../.github/workflows/deploy_snapshot_mc.yml) + +Publishes the snapshot to GitHub packages (using `$GITHUB_REPOSITORY`) and +the se-nexus. + +## Deploy Release [deploy_release_mc.yml](../.github/workflows/deploy_release_mc.yml) + +Publishes the release to GitHub packages (using `$GITHUB_REPOSITORY`) and +the se-nexus. +In addition, the tutorial tar.gz is packaged and added as an artifact (TODO). + +# Secrets + +| Name | Description | Workflows | +|--------------------------|---------------------------------------------------------------------------------------------------------------------------------|---------------------------------------| +| SE_NEXUS_USER | | deploy_snapshot_mc, deploy_release_mc | +| SE_NEXUS_PASSWORD | | deploy_snapshot_mc, deploy_release_mc | +| DOWNSTREAM_PAT | Personal access token to trigger downstream projects on GitHub (fine grained: content: write, actions: write) | deploy_snapshot_mc | +| DOWNSTREAM_GITLAB_PAT | Personal access token to trigger downstream projects on GitLab (not required for now) | deploy_snapshot_mc | +| GITLAB_TOKEN | Checks out the monticore-pygments-highlighting project from GitLab | prepare_pages | +| MONTIVERSE_TRIGGER_TOKEN | Triggers the MontiVerse IT-Pipeline on GitLab [more](https://github.com/digital-blueprint/gitlab-pipeline-trigger-action) | gradle_mc | +| MONTIVERSE_ACCESS_TOKEN | Reads the MontiVerse IT-Pipeline status from GitLab [more](https://github.com/digital-blueprint/gitlab-pipeline-trigger-action) | gradle_mc | + + diff --git a/gradle.properties b/gradle.properties index 839e13d34d..d658c0cd16 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ mavenUser=${user} mavenPassword=${pass} repo=https://nexus.se.rwth-aachen.de/content/groups/public -useLocalRepo=true +useLocalRepo=false # set true or use –PshowTestOutput=true to print test output showTestOutput=false genTR=false @@ -9,8 +9,8 @@ genEMF=false genTagging=false org.gradle.jvmargs=-Xms3072m -Dfile.encoding=UTF-8 - -# org.gradle.caching=true +org.gradle.parallel=true +org.gradle.caching=true # org.gradle.caching.debug=true # versions used @@ -27,7 +27,4 @@ commons_lang3_version = 3.8.1 freemarker_version = 2.3.28 guava_version =31.1-jre - cd4a_version =7.6.0 - -org.gradle.parallel=true diff --git a/monticore-generator/build.gradle b/monticore-generator/build.gradle index c31c907830..1c0a647976 100644 --- a/monticore-generator/build.gradle +++ b/monticore-generator/build.gradle @@ -147,11 +147,25 @@ gradlePlugin.plugins { publishing { // The gradle-plugin plugin deploys automatically a pluginMaven publication (from the main component) - repositories.maven { - credentials.username mavenUser - credentials.password mavenPassword - def releasesRepoUrl = "https://nexus.se.rwth-aachen.de/content/repositories/monticore-releases/" - def snapshotsRepoUrl = "https://nexus.se.rwth-aachen.de/content/repositories/monticore-snapshots/" - url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl + repositories { + maven { + name = "SE-Nexus" + credentials.username mavenUser + credentials.password mavenPassword + def releasesRepoUrl = "https://nexus.se.rwth-aachen.de/content/repositories/monticore-releases/" + def snapshotsRepoUrl = "https://nexus.se.rwth-aachen.de/content/repositories/monticore-snapshots/" + url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl + } + // Also publish to the github repository, if run on a github action + if (System.getenv("GITHUB_REPOSITORY") != null) { + maven { + name = "GitHubPackages" + url = "https://maven.pkg.github.com/" + System.getenv("GITHUB_REPOSITORY") + credentials { + username = System.getenv("GITHUB_ACTOR") + password = System.getenv("GITHUB_TOKEN") + } + } + } } } diff --git a/monticore-test/01.experiments/demonstrator/build.gradle b/monticore-test/01.experiments/demonstrator/build.gradle index 89b47f27a5..4dbd010090 100644 --- a/monticore-test/01.experiments/demonstrator/build.gradle +++ b/monticore-test/01.experiments/demonstrator/build.gradle @@ -22,6 +22,13 @@ sourceSets { // let productTest depend on test as test produces code for productTest compileProductTestJava.dependsOn(test) +test.configure { + // The test task builds the productTest inputs + // Disable build cache & up to date check + outputs.cacheIf {false} + outputs.upToDateWhen {false} +} + // let check depend on productTest such that it is included in the build check.dependsOn(productTest) diff --git a/monticore-test/01.experiments/hooks/build.gradle b/monticore-test/01.experiments/hooks/build.gradle index 7672ef475d..73bd846f3a 100644 --- a/monticore-test/01.experiments/hooks/build.gradle +++ b/monticore-test/01.experiments/hooks/build.gradle @@ -24,6 +24,13 @@ sourceSets { // let productTest depend on test as test produces code for productTest compileProductTestJava.dependsOn(test) +test.configure { + // The test task builds the productTest inputs + // Disable build cache & up to date check + outputs.cacheIf {false} + outputs.upToDateWhen {false} +} + // let check depend on productTest such that it is included in the build check.dependsOn(productTest) diff --git a/monticore-test/01.experiments/templates/build.gradle b/monticore-test/01.experiments/templates/build.gradle index d71865509b..de99dc1ef8 100644 --- a/monticore-test/01.experiments/templates/build.gradle +++ b/monticore-test/01.experiments/templates/build.gradle @@ -22,6 +22,13 @@ sourceSets { // let productTest depend on test as test produces code for productTest compileProductTestJava.dependsOn(test) +test.configure { + // The test task builds the productTest inputs + // Disable build cache & up to date check + outputs.cacheIf {false} + outputs.upToDateWhen {false} +} + // let check depend on productTest such that it is included in the build check.dependsOn(productTest) diff --git a/settings.gradle b/settings.gradle index 237a5f309d..2cde773361 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,6 +1,4 @@ // (c) https://github.com/MontiCore/monticore - -/* (c) https://github.com/MontiCore/monticore */ pluginManagement { repositories { mavenCentral() @@ -25,7 +23,7 @@ String myGetProperty(String key){ buildCache { local { - enabled = !isCi // CI has no (persistent) local storage + enabled = true } remote(HttpBuildCache) { enabled = myGetProperty("buildCacheURL") != null