diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index a3f318fd..9d3ec7e8 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -1,31 +1,34 @@ -# Runs whenever a pull request is created, modified, or reopened - name: VERDICT Integration Workflow +# Runs whenever a pull request is created, reopened, or modified + on: pull_request: types: [ opened, reopened, synchronize ] workflow_dispatch: -# Builds VERDICT source with Java and Maven -# Caches Maven dependencies +# Runs integration workflow as a CI check: +# - Builds VERDICT source and runs unit tests jobs: integration: + container: + image: maven:${{ matrix.maven-version }} + volumes: + - /usr/bin/docker:/usr/bin/docker + - /var/run/docker.sock:/var/run/docker.sock runs-on: ${{ matrix.os }} strategy: matrix: distribution: [ temurin ] java-version: [ 17 ] + maven-version: [ 3.9.5 ] os: [ ubuntu-22.04 ] steps: - name: Check out VERDICT source uses: actions/checkout@v4.1.1 - - name: Set up GraphViz - uses: ts-graphviz/setup-graphviz@v1 - - name: Set up Java and Maven uses: actions/setup-java@v3.13.0 with: @@ -37,5 +40,3 @@ jobs: run: | mvn -B install -f tools/verdict-back-ends/verdict-bundle/z3-native-libs/pom.xml mvn -B package -f tools/pom.xml -Dtycho.localArtifacts=ignore - env: - GraphVizPath: /usr/bin diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c38d4320..0d01c127 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,26 +1,33 @@ -# Runs whenever the main branch is changed (except for tags) - name: VERDICT Main Workflow +# Runs whenever the main branch is changed (except for tags) + on: push: branches: [ master ] tags-ignore: [ '*' ] workflow_dispatch: -# Builds soteria_pp native binary -# Builds VERDICT source with Java and Maven -# Pushes verdict-dev image to Docker Hub -# Updates verdict-dev in VERDICT-update-sites +# Runs main workflow and uploads build artifacts: +# - Builds soteria_pp native binary +# - Builds VERDICT source and runs unit tests +# - Pushes verdict-dev image to Docker Hub +# - Updates verdict-dev in VERDICT-update-sites jobs: main: + container: + image: maven:${{ matrix.maven-version }} + volumes: + - /usr/bin/docker:/usr/bin/docker + - /var/run/docker.sock:/var/run/docker.sock runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: distribution: [ temurin ] java-version: [ 17 ] + maven-version: [ 3.9.5 ] ocaml-compiler: [ 4.09.1 ] os: [ macos-12, ubuntu-22.04 ] @@ -41,10 +48,6 @@ jobs: # Run rest of steps only on Linux - macOS isn't needed - - name: Set up GraphViz - if: runner.os == 'Linux' - uses: ts-graphviz/setup-graphviz@v1 - - name: Set up Java and Maven if: runner.os == 'Linux' uses: actions/setup-java@v3.13.0 @@ -58,12 +61,6 @@ jobs: run: | mvn -B install -f tools/verdict-back-ends/verdict-bundle/z3-native-libs/pom.xml mvn -B package -f tools/pom.xml -Dtycho.localArtifacts=ignore - env: - GraphVizPath: /usr/bin - - - name: Set up Docker Buildx - if: runner.os == 'Linux' - uses: docker/setup-buildx-action@v3.0.0 - name: Login to Docker Hub if: runner.os == 'Linux' @@ -72,6 +69,10 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + - name: Set up Docker Buildx + if: runner.os == 'Linux' + uses: docker/setup-buildx-action@v3.0.0 + - name: Build and push verdict-dev image if: runner.os == 'Linux' uses: docker/build-push-action@v5.0.0 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 428511e9..ba4e98f5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,16 +1,17 @@ -# Runs whenever a release is published on GitHub - name: VERDICT Release Workflow +# Runs whenever a release is published on GitHub + on: release: types: [ published ] -# Builds & uploads kind2 & soteria_pp native binaries -# Builds VERDICT source with Java and Maven -# Uploads extern.zip and README.md to release page -# Pushes verdict image to Docker Hub -# Updates verdict-latest in VERDICT-update-sites +# Runs release workflow and uploads build artifacts: +# - Builds & uploads kind2 & soteria_pp native binaries +# - Builds VERDICT source and runs unit tests +# - Uploads extern.zip and README.md to release page +# - Pushes verdict image to Docker Hub +# - Updates verdict-latest in VERDICT-update-sites jobs: native-binaries: @@ -83,20 +84,23 @@ jobs: release: needs: native-binaries + container: + image: maven:${{ matrix.maven-version }} + volumes: + - /usr/bin/docker:/usr/bin/docker + - /var/run/docker.sock:/var/run/docker.sock runs-on: ${{ matrix.os }} strategy: matrix: distribution: [ temurin ] java-version: [ 17 ] + maven-version: [ 3.9.5 ] os: [ ubuntu-22.04 ] steps: - name: Check out VERDICT source uses: actions/checkout@v4.1.1 - - name: Set up GraphViz - uses: ts-graphviz/setup-graphviz@v1 - - name: Set up Java and Maven uses: actions/setup-java@v3.13.0 with: @@ -108,8 +112,6 @@ jobs: run: | mvn -B install -f tools/verdict-back-ends/verdict-bundle/z3-native-libs/pom.xml mvn -B package -f tools/pom.xml -Dtycho.localArtifacts=ignore - env: - GraphVizPath: /usr/bin - name: Download macOS binaries uses: actions/download-artifact@v3.0.2 @@ -142,15 +144,15 @@ jobs: extern.zip docs/README.md - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3.0.0 - - name: Login to Docker Hub uses: docker/login-action@v3.0.0 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3.0.0 + - name: Build and push verdict image uses: docker/build-push-action@v5.0.0 with: diff --git a/tools/pom.xml b/tools/pom.xml index ededcff3..7cf835a3 100644 --- a/tools/pom.xml +++ b/tools/pom.xml @@ -491,7 +491,7 @@ - [3.6.3,) + [3.9.0,)