merge the release and sign-artifacts profiles #64
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: CI | |
on: [ push, pull_request ] | |
env: | |
LTSMIN_VERSION: v3.1.0 | |
LTSMIN_REPO: Meijuh | |
jobs: | |
tests-and-analysis: | |
name: "Tests and Analysis (JDK: ${{ matrix.jdk }})" | |
strategy: | |
matrix: | |
jdk: [ 8, 11, 17, 21 ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: ${{ matrix.jdk }} | |
- name: Set up cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/ltsmin | |
~/.m2 | |
!~/.m2/repository/net/automatalib | |
!~/.m2/repository/de/learnlib | |
key: cache-tests-and-analysis-${{ matrix.jdk }}-${{ hashFiles('**/pom.xml') }} | |
restore-keys: cache-tests-and-analysis-${{ matrix.jdk }}- | |
- name: Set up GraphViz | |
run: sudo apt-get install graphviz | |
- name: Set up LTSmin | |
shell: bash | |
run: | | |
$GITHUB_WORKSPACE/.github/install-ltsmin.sh | |
echo "$HOME/ltsmin/${{ env.LTSMIN_VERSION }}/bin" >> $GITHUB_PATH | |
- name: Set up AutomataLib | |
shell: bash | |
# Set environment variables "AUTOMATALIB_FORK" and "AUTOMATALIB_BRANCH" to build custom AutomataLib versions. | |
# Defaults are "LearnLib" and the current/targeted LearnLib branch ($GITHUB_REF, relies on the same naming | |
# conventions between AutomataLib and LearnLib branches). | |
run: | | |
git clone -b ${AUTOMATALIB_BRANCH:-develop} --single-branch https://github.com/${AUTOMATALIB_FORK:-LearnLib}/automatalib.git ${HOME}/automatalib-git | |
cd ${HOME}/automatalib-git | |
mvn -B install -DskipTests | |
cd $GITHUB_WORKSPACE | |
- name: Run Maven | |
run: mvn -B install site -Pintegration-tests,code-analysis,bundles | |
platform-integration: | |
name: "Platform Integration (JDK: ${{ matrix.jdk }}, OS: ${{ matrix.os }})" | |
needs: [ tests-and-analysis ] | |
strategy: | |
matrix: | |
jdk: [ 8, 11, 17, 21 ] | |
os: [ ubuntu-latest, windows-latest, macOS-latest ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: ${{ matrix.jdk }} | |
- name: Set up cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.m2 | |
!~/.m2/repository/net/automatalib | |
!~/.m2/repository/de/learnlib | |
key: cache-platform-integration-${{ matrix.jdk }}-${{ hashFiles('**/pom.xml') }} | |
restore-keys: cache-platform-integration-${{ matrix.jdk }}- | |
- name: Set up AutomataLib | |
shell: bash | |
# Set environment variables "AUTOMATALIB_FORK" and "AUTOMATALIB_BRANCH" to build custom AutomataLib versions. | |
# Defaults are "LearnLib" and the current/targeted LearnLib branch ($GITHUB_REF, relies on the same naming | |
# conventions between AutomataLib and LearnLib branches). | |
run: | | |
git clone -b ${AUTOMATALIB_BRANCH:-develop} --single-branch https://github.com/${AUTOMATALIB_FORK:-LearnLib}/automatalib.git ${HOME}/automatalib-git | |
cd ${HOME}/automatalib-git | |
mvn -B '-Dmaven.compiler.source=${{ matrix.jdk }}' '-Dmaven.compiler.target=${{ matrix.jdk }}' '-Dautomatalib.targetVersion=${{ matrix.jdk }}' install -DskipTests | |
cd $GITHUB_WORKSPACE | |
- name: Run Maven | |
run: mvn -B '-Dmaven.compiler.source=${{ matrix.jdk }}' '-Dmaven.compiler.target=${{ matrix.jdk }}' '-Dlearnlib.targetVersion=${{ matrix.jdk }}' install | |
coverage: | |
name: "Coverage" | |
needs: [ platform-integration ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: 8 | |
- name: Set up cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/ltsmin | |
~/.m2 | |
!~/.m2/repository/net/automatalib | |
!~/.m2/repository/de/learnlib | |
key: cache-coverage-${{ hashFiles('**/pom.xml') }} | |
restore-keys: cache-coverage- | |
- name: Set up GraphViz | |
run: sudo apt-get install graphviz | |
- name: Set up LTSmin | |
shell: bash | |
run: | | |
$GITHUB_WORKSPACE/.github/install-ltsmin.sh | |
echo "$HOME/ltsmin/${{ env.LTSMIN_VERSION }}/bin" >> $GITHUB_PATH | |
- name: Set up AutomataLib | |
shell: bash | |
# Set environment variables "AUTOMATALIB_FORK" and "AUTOMATALIB_BRANCH" to build custom AutomataLib versions. | |
# Defaults are "LearnLib" and the current/targeted LearnLib branch ($GITHUB_REF, relies on the same naming | |
# conventions between AutomataLib and LearnLib branches). | |
run: | | |
git clone -b ${AUTOMATALIB_BRANCH:-develop} --single-branch https://github.com/${AUTOMATALIB_FORK:-LearnLib}/automatalib.git ${HOME}/automatalib-git | |
cd ${HOME}/automatalib-git | |
mvn -B install -DskipTests | |
cd $GITHUB_WORKSPACE | |
- name: Run Coverage # see https://github.com/trautonen/coveralls-maven-plugin/issues/136 | |
env: | |
CI_NAME: github | |
CI_BUILD_NUMBER: ${{ github.run_id }} | |
CI_BUILD_URL: https://github.com/${{ github.repository }}/commit/${{ github.event.after }}/checks | |
BRANCH_NAME_OR_REF: ${{ github.head_ref || github.ref }} | |
run: | | |
export CI_BRANCH=${BRANCH_NAME_OR_REF#refs/heads/} | |
export CI_PULL_REQUEST=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH") | |
mvn -B install -Pintegration-tests,code-coverage | |
mvn -B coveralls:report -DrepoToken=${{ secrets.GITHUB_TOKEN }} -DpullRequest=${{ github.event.number }} | |
deploy: | |
name: "Deploy" | |
if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/develop' }} | |
needs: [ platform-integration ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: 8 | |
- name: Set up cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.m2 | |
!~/.m2/repository/net/automatalib | |
!~/.m2/repository/de/learnlib | |
key: cache-deploy-${{ hashFiles('**/pom.xml') }} | |
restore-keys: cache-deploy- | |
- name: Set up AutomataLib | |
shell: bash | |
# Set environment variables "AUTOMATALIB_FORK" and "AUTOMATALIB_BRANCH" to build custom AutomataLib versions. | |
# Defaults are "LearnLib" and the current/targeted LearnLib branch ($GITHUB_REF, relies on the same naming | |
# conventions between AutomataLib and LearnLib branches). | |
run: | | |
git clone -b ${AUTOMATALIB_BRANCH:-develop} --single-branch https://github.com/${AUTOMATALIB_FORK:-LearnLib}/automatalib.git ${HOME}/automatalib-git | |
cd ${HOME}/automatalib-git | |
mvn -B install -DskipTests | |
cd $GITHUB_WORKSPACE | |
- name: Run Maven | |
env: # make secrets available as environment variables | |
OSSRH_TOKEN_USERNAME: ${{ secrets.OSSRH_TOKEN_USERNAME }} | |
OSSRH_TOKEN_PASSWORD: ${{ secrets.OSSRH_TOKEN_PASSWORD }} | |
run: mvn -B -s $GITHUB_WORKSPACE/.github/settings.xml -DskipTests deploy |