Integration Test #95
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
name: Integration Test | |
on: | |
workflow_dispatch: | |
inputs: | |
rascal_version: | |
description: 'rascal branch/tag to checkout' | |
required: true | |
default: 'main' | |
typepal_version: | |
description: 'typepal branch/tag to checkout' | |
required: true | |
default: 'main' | |
rascal_core_version: | |
description: 'rascal-core branch/tag to checkout' | |
required: true | |
default: 'master' | |
dependencies_on_lib_path: | |
description: 'Put tpls of dependencies on lib path' | |
required: true | |
default: 'true' | |
jobs: | |
prepare-deps: | |
runs-on: buildjet-2vcpu-ubuntu-2204 | |
steps: | |
- uses: actions/checkout@v4 | |
name: 'Checkout rascal (${{ inputs.rascal_version }})' | |
with: | |
repository: 'usethesource/rascal' | |
ref: ${{ inputs.rascal_version }} | |
path: 'deps/rascal' | |
- uses: actions/checkout@v4 | |
name: 'Checkout typepal (${{ inputs.typepal_version }})' | |
with: | |
repository: 'usethesource/typepal' | |
ref: ${{ inputs.typepal_version }} | |
path: 'deps/typepal' | |
- uses: actions/checkout@v4 | |
name: 'Checkout rascal-core (${{ inputs.rascal_core_version }})' | |
with: | |
repository: 'usethesource/rascal-core' | |
ref: ${{ inputs.rascal_core_version }} | |
path: 'deps/rascal-core' | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: 11 | |
distribution: 'temurin' | |
cache: 'maven' | |
cache-dependency-path: 'deps/rascal/pom.xml' | |
- name: Compile rascal java | |
run: mvn -B clean compile package -Drascal.tutor.skip -DskipTests -Drascal.compile.skip | |
working-directory: deps/rascal | |
- name: copy rascal jar to predictable location and cleanup | |
run: | | |
rm deps/rascal/target/*-sources.jar | |
find deps/rascal/target -name 'rascal-*.jar' -exec mv '{}' deps/rascal/rascal.jar \; | |
rm -rf deps/rascal/target | |
- uses: actions/upload-artifact@v4 | |
name: 'Store dependencies for the other jobs' | |
with: | |
name: deps | |
path: deps/ | |
retention-days: 1 | |
rascal: | |
runs-on: buildjet-2vcpu-ubuntu-2204 | |
needs: prepare-deps | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: 11 | |
distribution: 'temurin' | |
- uses: actions/download-artifact@v4 | |
with: | |
name: deps | |
- name: Typecheck rascal | |
run: | | |
java -Xmx500m -jar rascal/rascal.jar Main \ | |
--libs "${{ inputs.dependencies_on_lib_path }}" \ | |
--memory 5G \ | |
--rascalVersion "|cwd:///rascal/rascal.jar|" \ | |
--typepalVersion "|cwd:///typepal|" \ | |
--rascalCoreVersion "|cwd:///rascal-core|" \ | |
--repoFolder "|cwd:///repos|" \ | |
--full false \ | |
--clean \ | |
--printWarnings \ | |
--tests rascal | |
- uses: actions/upload-artifact@v4 | |
name: Store rascal tpls | |
with: | |
name: rascal-tpls | |
path: repos | |
retention-days: 1 | |
if-no-files-found: error | |
other-projects: | |
runs-on: buildjet-2vcpu-ubuntu-2204 | |
strategy: | |
matrix: | |
target: | |
- "'rascal-lsp' 'flybytes' 'php-analysis' 'rascal-git' 'salix-core' 'drambiguity' 'salix-contrib' 'rascal-all'" | |
- "'typepal' 'rascal-lsp-all' 'rascal-core'" | |
fail-fast: false | |
needs: [rascal, prepare-deps] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: 11 | |
distribution: 'temurin' | |
- uses: actions/download-artifact@v4 | |
with: | |
name: deps | |
- uses: actions/download-artifact@v4 | |
with: | |
name: rascal-tpls | |
path: repos | |
- run: tree repos/ | |
- name: Typecheck rascal-libs (deps on libs=${{ inputs.dependencies_on_lib_path }}) | |
run: | | |
java -Xmx500m -jar rascal/rascal.jar Main \ | |
--libs "${{ inputs.dependencies_on_lib_path }}" \ | |
--memory 5G \ | |
--rascalVersion "|cwd:///rascal/rascal.jar|" \ | |
--typepalVersion "|cwd:///typepal|" \ | |
--rascalCoreVersion "|cwd:///rascal-core|" \ | |
--repoFolder "|cwd:///repos|" \ | |
--full false \ | |
--clean \ | |
--printWarnings \ | |
--tests ${{ matrix.target }} |