Skip to content

Commit

Permalink
Merge pull request #87 from mbeddr/merge/master
Browse files Browse the repository at this point in the history
 Merging MPS 2022.3 → master
  • Loading branch information
danielratiu authored Aug 5, 2024
2 parents bbd038c + ea98e8f commit 8c0293e
Show file tree
Hide file tree
Showing 777 changed files with 236,311 additions and 203,708 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/PR-into-next-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: PR to merge into the next version

on:
push:
branches:
- 'maintenance/MPS-*'

jobs:
create-pr:
runs-on: ubuntu-latest
steps:
- name: Create PR
uses: specificlanguages/cascading-merge@v2
with:
branch_prefix: maintenance/MPS-
merge_prefix: merge/MPS-
default_merge_prefix: merge/
token: ${{ secrets.MPS_CI_BUILD_BOT_ACCESS_TOKEN }}
189 changes: 69 additions & 120 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,147 +1,96 @@
name: CI

name: FASTEN_CI

on: [push, pull_request]

env:
MPS_VER: "2023.2"
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.FASTEN_GITHUB_PKG_REGISTRY }}
on:
push:
branches:
- master
- 'maintenance/*'
pull_request:
workflow_dispatch:
inputs:
publish:
description: Whether to publish the build result to Maven repositories
type: boolean
default: false
required: false

jobs:
build_fasten_distribution_and_perform_checks:
build:
runs-on: ubuntu-latest
env:
DISPLAY: ':99'

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Gradle
run: |
echo "$(pwd)/rcp_resources/external_tools" >> $GITHUB_PATH
- name: Setup headless environment
run: |
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
echo "$(pwd)/rcp_resources/external_tools" >> "$GITHUB_PATH"
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17

- name: Resolve MPS
uses: gradle/gradle-build-action@v2.4.2
uses: actions/setup-java@v4
with:
arguments: resolveMps -Pgpr.user=${{github.actor}} -Pgpr.token=${{ secrets.GITHUB_TOKEN }}
distribution: 'temurin'
java-version: 17

- name: Build FASTEN
uses: gradle/gradle-build-action@v2.4.2
with:
arguments: package_fasten_safety_distribution_win -Pgpr.user=${{github.actor}} -Pgpr.token=${{ secrets.GITHUB_TOKEN }}
wrapper-cache-enabled: true
dependencies-cache-enabled: true
dependencies-cache-key: gradle/dependency-locks/**
dependencies-cache-exact: true
configuration-cache-enabled: true
gradle-executable: /home/runner/work/mbeddr.formal/mbeddr.formal/gradlew

- name: Check Consistency of the FASTEN-NuSMV Tutorial
uses: gradle/gradle-build-action@v2.4.2
with:
arguments: -PcheckProject=nusmv -Pgpr.user=${{github.actor}} -Pgpr.token=${{ secrets.GITHUB_TOKEN }}
wrapper-cache-enabled: true
dependencies-cache-enabled: true
dependencies-cache-key: gradle/dependency-locks/**
configuration-cache-enabled: true
gradle-executable: /home/runner/work/mbeddr.formal/mbeddr.formal/gradlew
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3

- name: Check Consistency of the FASTEN-Safety Tutorial
uses: gradle/gradle-build-action@v2.4.2
with:
arguments: -PcheckProject=safety -Pgpr.user=${{github.actor}} -Pgpr.token=${{ secrets.GITHUB_TOKEN }}
wrapper-cache-enabled: true
dependencies-cache-enabled: true
dependencies-cache-key: gradle/dependency-locks/**
configuration-cache-enabled: true
gradle-executable: /home/runner/work/mbeddr.formal/mbeddr.formal/gradlew

- name: Run Tests
uses: gradle/gradle-build-action@v2.4.2
with:
arguments: run_all_tests -Pgpr.user=${{github.actor}} -Pgpr.token=${{ secrets.GITHUB_TOKEN }}
wrapper-cache-enabled: true
dependencies-cache-enabled: true
dependencies-cache-key: gradle/dependency-locks/**
configuration-cache-enabled: true
gradle-executable: /home/runner/work/mbeddr.formal/mbeddr.formal/gradlew
- name: Build
run: |
xvfb-run ./gradlew package_fasten_safety_distribution_win build_all_languages check \
-Pgpr.user=${{github.actor}} -Pgpr.token=${{ secrets.GITHUB_TOKEN }}
- name: Publish Test Report
uses: mikepenz/action-junit-report@v2
- name: Publish test report
uses: mikepenz/action-junit-report@v4
if: ${{ !cancelled() }}
with:
fail_on_failure: true
require_tests: true
report_paths: 'build/**/TEST*.xml'
github_token: ${{ secrets.GITHUB_TOKEN }}
#- name: Publish to Github Maven
# uses: gradle/gradle-build-action@v2.4.2
# with:
# arguments: publishNuSMVLanguagesPublicationToGitHubPackagesRepository -Pgpr.user=${{github.actor}} -Pgpr.token=${{ secrets.GITHUB_TOKEN }}
# wrapper-cache-enabled: true
# dependencies-cache-enabled: true
# dependencies-cache-key: gradle/dependency-locks/**
# dependencies-cache-exact: true
# configuration-cache-enabled: true
# gradle-executable: /home/runner/work/mbeddr.formal/mbeddr.formal/gradlew
- name: Get Current Time
id: time
uses: nanzm/get-time-action@v1.1
with:
timeZone: 2
format: 'YYYY-MM-DD-HH-mm'
#- name: Debug Directory Layout
# run: |
# ls -alR build/artifacts/com.mbeddr.formal.safetyDistribution
- name: Archive distribution
uses: actions/upload-artifact@v2

- name: Run migrations
run: |
./gradlew migrate remigrate -x build_all_languages \
-Pgpr.user=${{github.actor}} -Pgpr.token=${{ secrets.GITHUB_TOKEN }}
- name: Check for dirty files
run: |
if [[ -n $(git status --porcelain | head --lines=1) ]]
then
echo "Dirty files detected after build/migration, run './gradlew migrate remigrate' and/or update .gitignore to fix:"
git status
echo "::group::git diff"
git diff
echo "::endgroup::"
exit 1
fi
- name: Upload distribution
uses: actions/upload-artifact@v4
with:
name: fasten-distribution-win-2023.2-${{ steps.time.outputs.time }}
path: build/distributions/fasten-2023.2-SNAPSHOT-Win-2023.2-SNAPSHOT.zip

publish:
# Only publish on push (to maintenance or master) or on dispatch if requested
if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.publish == 'true')

build_fasten_assurance_package:
runs-on: ubuntu-latest
env:
DISPLAY: ':99'

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup headless environment
run: |
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Set up JDK 17
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: 17

#- name: Build FASTEN Assurance Distribution
# uses: gradle/gradle-build-action@v2.4.2
# with:
# arguments: package_assurance -Pgpr.user=${{github.actor}} -Pgpr.token=${{ secrets.GITHUB_TOKEN }}
# wrapper-cache-enabled: true
# dependencies-cache-enabled: true
# dependencies-cache-key: gradle/dependency-locks/**
# dependencies-cache-exact: true
# configuration-cache-enabled: true
# gradle-executable: /home/runner/work/mbeddr.formal/mbeddr.formal/gradlew
- name: Build and Publish FASTEN Assurance to Github Maven Packages
uses: gradle/gradle-build-action@v2.4.2
with:
arguments: publishFASTENSafetyLanguagesPublicationToGitHubPackagesRepository -Pgpr.user=${{github.actor}} -Pgpr.token=${{ secrets.GITHUB_TOKEN }}
wrapper-cache-enabled: true
dependencies-cache-enabled: true
dependencies-cache-key: gradle/dependency-locks/**
dependencies-cache-exact: true
configuration-cache-enabled: true
gradle-executable: /home/runner/work/mbeddr.formal/mbeddr.formal/gradlew
distribution: 'temurin'
java-version: 17

- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3

- name: Publish
run: |
./gradlew publish \
-Pgpr.user=${{ github.actor }} \
-Pgpr.token=${{ secrets.GITHUB_TOKEN }} \
-Partifacts.itemis.cloud.user=${{ secrets.ARTIFACTS_ITEMIS_CLOUD_USER }} \
-Partifacts.itemis.cloud.pw=${{ secrets.ARTIFACTS_ITEMIS_CLOUD_PW }}
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,5 @@ buildDistribution.xml


# ---------------------------------------
# Generated by gradle
**/.mps/libraries.xml

# JUnit test reports
TESTS-*.xml
Loading

0 comments on commit 8c0293e

Please sign in to comment.