Skip to content

Commit

Permalink
CI to create Docker releases
Browse files Browse the repository at this point in the history
  • Loading branch information
volkm committed May 29, 2024
1 parent 818b46b commit 4c69474
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 5 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/release_docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Release Docker
# Builds and deploys images to Dockerhub

on:
workflow_dispatch:
inputs:
tag:
description: 'Docker tag (e.g. 1.1.0 or stable)'
required: true
default: 'x.y.z'

env:
# GitHub runners currently have two cores
NR_JOBS: "2"

jobs:
deploy:
name: Deploy (${{ matrix.buildType.name }})
runs-on: ubuntu-latest
strategy:
matrix:
buildType:
- {name: "Debug",
suffix: "-debug",
Developer: "ON"
}
- {name: "Release",
suffix: "",
Developer: "OFF"
}
steps:
- name: Git clone
uses: actions/checkout@v4
- name: Build storm from Dockerfile
run: |
docker build -t movesrwth/storm:${{ github.event.inputs.tag }}${{ matrix.buildType.suffix }} . \
--build-arg BASE_IMG=movesrwth/storm-dependencies:latest${{ matrix.buildType.suffix }} \
--build-arg build_type="${{ matrix.buildType.name }}" \
--build-arg developer="${{ matrix.buildType.Developer }}" \
--build-arg cmake_args="${{ matrix.buildType.cmakeArgs }}" \
--build-arg no_threads=${NR_JOBS}
# Omitting arguments gurobi_support, soplex_support, spot_support, cln_exact, cln_ratfunc, all_sanitizers
- name: Login to Docker Hub
# Only login if using original repo
if: github.repository_owner == 'moves-rwth'
uses: docker/login-action@v3
with:
username: ${{ secrets.STORM_CI_DOCKER_USERNAME }}
password: ${{ secrets.STORM_CI_DOCKER_TOKEN }}
- name: Deploy storm
# Only deploy if using original repo
if: github.repository_owner == 'moves-rwth'
run: |
docker push movesrwth/storm:${{ github.event.inputs.tag }}${{ matrix.buildType.suffix }}
12 changes: 7 additions & 5 deletions doc/checklist_new_release.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ Note that in most cases a simultaneous release of [carl](https://github.com/smtr
```
The new tag should now be visible on [GitHub](https://github.com/moves-rwth/storm/tags).

6. [Add new release](https://github.com/moves-rwth/storm/releases/new) in GitHub.
6. Use the [CI](https://github.com/moves-rwth/storm/actions/workflows/release_docker.yml) on the tag, provide the version `X.Y.Z` as tag and automatically create the [Docker containers](https://hub.docker.com/r/movesrwth/storm) for the new version.

7. Update `stable` branch:
7. [Add new release](https://github.com/moves-rwth/storm/releases/new) in GitHub.

8. Update `stable` branch:

```console
git checkout stable
Expand All @@ -40,8 +42,8 @@ Note that in most cases a simultaneous release of [carl](https://github.com/smtr
git push --force origin stable
```

8. Update [Homebrew formula](https://github.com/moves-rwth/homebrew-storm).
9. Use the [CI](https://github.com/moves-rwth/storm/actions/workflows/release_docker.yml) on the `stable` branch, provide the tag 'stable' and automatically create the [Docker containers](https://hub.docker.com/r/movesrwth/storm).

9. Announce new storm version on [website](http://www.stormchecker.org/news.html).
10. Update [Homebrew formula](https://github.com/moves-rwth/homebrew-storm).

10. Create [Docker containers](https://hub.docker.com/r/movesrwth/storm) for new version.
11. Announce new storm version on [website](http://www.stormchecker.org/news.html).

0 comments on commit 4c69474

Please sign in to comment.