Skip to content

Updated logging code #1978

Updated logging code

Updated logging code #1978

Workflow file for this run

# 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: overture.au.dk
PYTHON_VERSION: '3.9.7'
MAVEN_VERSION: 3.8.1
WINDOWS_VERSION: 'windows-2019'
UBUNTU_VERSION: 'ubuntu-20.04'
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-20.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: Install Python Pipenv
run: |
python -m pip install --upgrade pip
python -m pip install pipenv
- 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 == env.UBUNTU_VERSION}}
with:
name: surfire-ubuntu
path: |
**/target/surefire-reports/*
retention-days: 1
- name: Install Python Dependencies
run: |
cd external_tester
pipenv install
- name: CLI Test
timeout-minutes: 5
run: |
cd external_tester
pipenv run python maestro_cli_test.py --includeSlowTests
- name: Web API Test
timeout-minutes: 2
run: |
cd external_tester
pipenv run python webapi_test.py
- name: Legacy CLI Test
timeout-minutes: 2
run: |
cd external_tester
pipenv run python 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-latest
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 -P au -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.ARTIFACTORY_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.ARTIFACTORY_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 -P au -B package -Dsha1= -fae -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
env:
MAVEN_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}