Skip to content

Commit

Permalink
Merge branch 'main' into reduce-maven-overhead
Browse files Browse the repository at this point in the history
  • Loading branch information
rodinaarssen committed Jul 22, 2024
2 parents f574853 + a23db0e commit fb3c978
Show file tree
Hide file tree
Showing 1,584 changed files with 20,164 additions and 59,752 deletions.
10 changes: 9 additions & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
coverage:
precision: 0

status:
project:
default:
# basic
target: auto
threshold: 1% # we accept a bit fluctuation, as we run random tests
base: auto
paths:
- "src"
23 changes: 18 additions & 5 deletions .github/ISSUE_TEMPLATE/stable-release-manual-testing-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,24 @@ First a "pre-release" of the supporting compiler/typechecker tools must be done,
- [ ] syntax highlighting in editor works
- [ ] add dependency on another project by editing `RASCAL.MF`: `Required-Libraries: |lib://otherProject|`, import a module and test the type-checker as well as the interpreter for correct resolution
- [ ] `import demo::lang::Pico::Plugin; registerPico();` and test the editor of the example pico files (syntax highlighting, menu options)
- [ ] open tutor view and test the search box
- [ ] open tutor view and test browsing the documentation
- [ ] `import demo::lang::Pico::Plugin; rascal>:edit demo::lang::Pico::Plugin`
- [ ] edit a .concept file, save it and watch the preview in the Tutor Preview view
- [ ] Tutor Preview "edit" button opens the corresponding concept file of the currently visited Concept URL
- [ ] Tutor Preview Forward/Back/Refresh buttons work
- [ ] use util::IDEServices:
- [ ] registerDiagnostics with more than one file
- [ ] test edit function (for example with vis::Graph examples that use it)
- [ ] test showInteractiveContent function (for example with vis::Chart examples)

# Actual release

- [ ] release rascal project (when resolving SNAPSHOT dependencies choose the right versions of vallang etc, and make sure to bump the new rascal SNAPSHOT release one minor version)
- [ ] bootstrap documentation site
- [ ] bump rascal version in rascal-maven-project, mvn install
- [ ] bump rascal version in rascal-website project
- [ ] set rascal-maven-project snapshot dependency in rascal-website project
- [ ] run `mvn clean package` in rascal-website project
- [ ] fix errors, possibly release rascal project patch versions, and repeat the above.
- [ ] release rascal-maven-project
- [ ] bump rascal-maven-project dependency in rascal-website project
- [ ] run `mvn clean package` in rascal-website project and `git push` to publish new docs
- [ ] release rascal-eclipse project (take care to choose the right release versions of typepal and rascal-core you release earlier and choose their new SNAPSHOT dependencies to the latest)
- [ ] change the configuration of the stable version in `update-site-nexus-link-script/refresh-nexus-data` to the released version
- [ ] test the stable update site at https://update.rascal-mpl.org/stable
Expand All @@ -75,3 +83,8 @@ The following items can be executed asynchronously, but are nevertheless not to
- [ ] change dependencies on rascal-eclipse and rascal in rascal-eclipse-libraries and the projects it depends on
- [ ] change dependencies of typepal to latest rascal and rascal-eclipse
- [ ] change dependency of rascal-core to latest stable rascal
- [ ] change dependency in all projects on new rascal-maven-project
- [ ] change dependency of rascal-maven-project and rascal in rascal-tutor
- [ ] release rascal-tutor
- [ ] bump dependency of rascal-tutor in rascal-maven-project
- [ ] release rascal-maven-project again
130 changes: 82 additions & 48 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,43 +12,85 @@ env:
MAVEN_OPTS: "-Xmx4G -Dhttps.protocols=TLSv1.2 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"

jobs:
builds:
test-linux:
if: ${{ !(github.ref == 'refs/heads/main' && contains(github.event.head_commit.message, '[maven-release-plugin]')) }}
needs: [tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
runs-on: buildjet-4vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'temurin'
cache: 'maven'

- name: Run Tests
run: mvn -B -Drascal.compile.skip -Drascal.tutor.skip -Drascal.test.memory=14 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: "Test Report - ${{ runner.os }}"

- name: Cache Maven packages
uses: actions/cache@v2
builds:
if: ${{ !(github.ref == 'refs/heads/main' && contains(github.event.head_commit.message, '[maven-release-plugin]')) }}
needs: [test-linux]
permissions:
contents: write
runs-on: buildjet-4vcpu-ubuntu-2204
steps:
- uses: browser-actions/setup-chrome@latest
with:
chrome-version: 1047731 # v107
- run: which chrome
- uses: nanasess/setup-chromedriver@v2
with:
chromedriver-version: '107.0.5304.62'
- run: which chromedriver

- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
java-version: 11
distribution: 'temurin'
cache: 'maven'

- name: Compile & Bootstrap
run: mvn -B compile
run: mvn -B compile -Dwebdriver.chrome.driver=/usr/local/bin/chromedriver -Dwebdriver.chrome.browser=`which chrome`
env:
MAVEN_OPTS: "-Xmx14G -Dhttps.protocols=TLSv1.2 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"

- name: Test if release # just to be extra sure for a release
if: startsWith(github.ref, 'refs/tags/v')
run: mvn -Drascal.test.memory=4 -Drascal.compile.skip test
run: mvn -Drascal.test.memory=10 -Drascal.compile.skip -Drascal.tutor.skip test

- name: Attach artifact
- name: Attach artifact
id: build-artifact
uses: SWAT-engineering/maven-full-artifacts-action@v1
with:
maven-options: |
-Drascal.compile.skip
-Drascal.tutor.skip
-DskipTests
- name: Prepare Draft Release
uses: softprops/action-gh-release@v1
- name: Making sure test have succeeded in the parallel jobs
if: startsWith(github.ref, 'refs/tags/')
uses: yogeshlonkar/wait-for-jobs@v0
with:
draft: true
files: ${{ steps.build-artifact.outputs.artifact-root-dir}}/**/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
gh-token: ${{ secrets.GITHUB_TOKEN }}
jobs: |
tests (macos-latest)
tests (windows-latest)
tests (buildjet-4vcpu-ubuntu-2204-arm)
ttl: 15

- name: Deploy
if: startsWith(github.ref, 'refs/tags/v')
Expand All @@ -62,54 +104,46 @@ jobs:
ssh-username: ${{ secrets.RELEASE_SSH_USERNAME }}
ssh-private-key: ${{ secrets.RELEASE_SSH_PRIVATE_KEY }}

- name: Report Failure
if: failure()
uses: act10ns/slack@v1
- name: Prepare Draft Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
draft: true
files: ${{ steps.build-artifact.outputs.artifact-root-dir}}/**/*
env:
SLACK_WEBHOOK_URL: ${{ secrets.RASCAL_SLACK_WEBHOOK }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


tests:
if: ${{ !(github.ref == 'refs/heads/main' && contains(github.event.head_commit.message, '[maven-release-plugin]')) }}
needs: [test-linux]
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [windows-latest, macos-latest, buildjet-4vcpu-ubuntu-2204-arm]
env:
MAVEN_OPTS: "-Xmx1G -Dhttps.protocols=TLSv1.2 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 11

- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
distribution: 'temurin'
cache: 'maven'

- name: Run Tests
# single quotes to help windows deal with argument splitting
run: mvn -B '-Drascal.compile.skip' '-Drascal.test.memory=4' test
run: mvn -B '-Drascal.compile.skip' '-Drascal.tutor.skip' '-Drascal.test.memory=3' test

- uses: codecov/codecov-action@v1
- uses: codecov/codecov-action@v4
continue-on-error: true # sometimes this one fails, that shouldn't stop a build
with:
token: e8b4481a-d178-4148-a4ff-502906390512

- 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: "Test Report - ${{ runner.os }}"

- name: Report Failure
if: failure()
uses: act10ns/slack@v1
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.RASCAL_SLACK_WEBHOOK }}
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,17 @@ local.properties
target/
bin/
bootstrap/
pom.xml.releaseBackup
release.properties
pom.xml.versionsBackup
rascal-DEPENDENCIES.txt

.DS_Store
/.apt_generated/

dependency-reduced-pom.xml
.ipynb_checkpoints
.vscode/settings.json

*.iml
.idea/
4 changes: 2 additions & 2 deletions .project
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
</natures>
<filteredResources>
<filter>
<id>1606738956816</id>
<id>1666611214669</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
Expand Down
Loading

0 comments on commit fb3c978

Please sign in to comment.