Skip to content

Serialization Overhaul (#81) #232

Serialization Overhaul (#81)

Serialization Overhaul (#81) #232

Workflow file for this run

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: [ 11, 17, 21 ]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: ${{ matrix.jdk }}
- name: Set up cache
uses: actions/cache@v4
with:
path: |
~/ltsmin
~/.m2
!~/.m2/repository/net/automatalib
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: Run Maven
run: mvn -B install site -Pcode-analysis,bundles,jlink
platform-integration:
name: "Platform Integration (JDK: ${{ matrix.jdk }}, OS: ${{ matrix.os }})"
needs: [ tests-and-analysis ]
strategy:
matrix:
jdk: [ 11, 17, 21 ]
os: [ ubuntu-latest, windows-latest, macos-13 ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: ${{ matrix.jdk }}
- name: Set up cache
uses: actions/cache@v4
with:
path: |
~/.m2
!~/.m2/repository/net/automatalib
key: cache-platform-integration-${{ matrix.jdk }}-${{ hashFiles('**/pom.xml') }}
restore-keys: cache-platform-integration-${{ matrix.jdk }}-
- name: Run Maven
run: mvn -B install -Pjlink
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@v4
with:
distribution: 'zulu'
java-version: 11
- name: Set up cache
uses: actions/cache@v4
with:
path: |
~/ltsmin
~/.m2
!~/.m2/repository/net/automatalib
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: 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 -Pcode-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@v4
with:
distribution: 'zulu'
java-version: 11
- name: Set up cache
uses: actions/cache@v4
with:
path: |
~/.m2
!~/.m2/repository/net/automatalib
key: cache-deploy-${{ hashFiles('**/pom.xml') }}
restore-keys: cache-deploy-
- 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