update-fmu-native-loader-1.4.1 #2097
Workflow file for this run
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
# This workflow will build a Java project with Maven | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
name: Maestro2 | |
on: | |
workflow_dispatch: | |
push: | |
branches-ignore: | |
- master | |
pull_request: | |
env: | |
JAVA_VERSION: 11.0.3 | |
SERVER_ID: ossrh | |
PYTHON_VERSION: '3.11.8' | |
MAVEN_VERSION: 3.8.1 | |
WINDOWS_VERSION: 'windows-2019' | |
MACOS_VERSION: 'macos-latest' | |
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-22.04, windows-2019, macos-latest ] | |
steps: | |
- name: Set up Java | |
uses: actions/[email protected] | |
with: | |
java-version: ${{ env.JAVA_VERSION }} | |
- name: Set up maven | |
uses: stCarolas/[email protected] | |
with: | |
maven-version: ${{ ENV.MAVEN_VERSION }} | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Put MSYS2_MinGW64 on PATH for windows | |
if: ${{matrix.os == env.WINDOWS_VERSION }} | |
# there is not yet an environment variable for this path from msys2/setup-msys2 | |
run: echo "C:\msys64/mingw64/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
- uses: actions/checkout@v2 | |
- name: Cache local Maven repository | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Maven Build | |
run: mvn -B package --file pom.xml -DskipTests -fae | |
- name: Maven Test | |
# if: matrix.os == env.WINDOWS_VERSION | |
# shell: msys2 {0} | |
run: mvn -Pinclude-fullSpecCppTest test | |
# - name: Maven Test | |
# if: matrix.os != env.WINDOWS_VERSION | |
# run: mvn test -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn | |
- name: upload test reports win | |
uses: actions/upload-artifact@v2 | |
if: ${{ failure() && matrix.os == env.WINDOWS_VERSION}} | |
with: | |
name: surfire-win | |
path: | | |
**/target/surefire-reports/* | |
**/target/FullSpecCppTest/spec.mabl | |
**/target/FullSpecCppTest/co-sim.cxx | |
retention-days: 1 | |
- name: upload test reports ubuntu | |
uses: actions/upload-artifact@v2 | |
if: ${{ failure() && matrix.os == 'ubuntu-22.04' }} | |
with: | |
name: surfire-ubuntu | |
path: | | |
**/target/surefire-reports/* | |
retention-days: 1 | |
- name: Install Python Dependencies | |
run: | | |
cd external_tester | |
python3 -m pip install --upgrade pip | |
pip3 install -r requirements.txt | |
- name: CLI Test | |
timeout-minutes: 5 | |
run: | | |
cd external_tester | |
python3 maestro_cli_test.py --includeSlowTests | |
- name: Web API Test | |
timeout-minutes: 2 | |
run: | | |
cd external_tester | |
pip3 install -r requirements.txt | |
pip3 install requests --upgrade | |
python3 webapi_test.py | |
- name: Legacy CLI Test | |
timeout-minutes: 2 | |
run: | | |
cd external_tester | |
python3 cli_legacy_test.py | |
#- name: Threaded Web API test | |
# timeout-minutes: 5 | |
# run: | | |
# cd external_tester | |
# python test_simultaneous_simulations.py | |
deploy: | |
needs: build | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Cache local Maven repository | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Environment variables | |
run: echo ${{ env.SERVER_ID }} | |
- id: install-secret-key | |
name: Install gpg secret key | |
run: | | |
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import | |
gpg --list-secret-keys --keyid-format LONG | |
- name: Set up JDK | |
uses: actions/setup-java@v1 | |
with: | |
java-version: ${{ env.JAVA_VERSION }} | |
server-id: ${{ env.SERVER_ID }} | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_PASSWORD | |
gpg-passphrase: MAVEN_GPG_PASSPHRASE | |
- name: Set up maven | |
uses: stCarolas/[email protected] | |
with: | |
maven-version: ${{ ENV.MAVEN_VERSION }} | |
- name: Maven Package feature SNAPSHOT | |
if: github.event_name == 'push' && (github.ref != 'refs/heads/development' && github.ref != 'refs/heads/master' ) | |
run: mvn -Psonatype -B package -Dsha1=-`git rev-parse --abbrev-ref HEAD | sed "s|/|-|g;s|#||g;s|<||g;s|>||g;s|:||g;s|\"||g;s|/||g;s|\|||g;s|?||g;s|*||g;s|;||g"` -fae -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} | |
env: | |
MAVEN_USERNAME: ${{ secrets.OSS_SONATYPE_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.OSS_SONATYPE_PASSWORD }} | |
MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} | |
- name: Maven Package SNAPSHOT | |
if: github.event_name == 'push' && (github.ref == 'refs/heads/development' ) | |
run: mvn -Psonatype -B deploy -Dsha1= -fae -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} | |
env: | |
MAVEN_USERNAME: ${{ secrets.OSS_SONATYPE_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.OSS_SONATYPE_PASSWORD }} | |
MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} | |