-
Notifications
You must be signed in to change notification settings - Fork 19
68 lines (63 loc) · 2.84 KB
/
buildtest.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Build Test
# Builds and tests paynt and deploys images to Dockerhub
on:
push:
branches:
- master
- mdp
schedule:
# run weekly
- cron: '0 10 * * 3'
# needed to trigger the workflow manually
workflow_dispatch:
pull_request:
env:
GIT_URL: "${{ github.server_url }}/${{ github.repository }}.git"
BRANCH: "${{ github.ref }}"
# GitHub runners currently have two cores
NR_JOBS: "2"
jobs:
deploy:
name: Deploy on latest (${{ matrix.buildType.name }})
runs-on: ubuntu-latest
strategy:
matrix:
buildType:
- {name: "Release", imageName : "randriu/paynt", dockerTag: "latest", setupArgs: ""}
fail-fast: false
if: github.ref == 'refs/heads/master'
steps:
- name: Git clone
uses: actions/checkout@v4
- name: Build paynt image from Dockerfile
run: docker build -t ${{ matrix.buildType.imageName }}:${{ matrix.buildType.dockerTag }} . --build-arg setup_args=${{ matrix.buildType.setupArgs }} --build-arg setup_args_pycarl=${{ matrix.buildType.setupArgs }} --build-arg no_threads=${NR_JOBS}
- name: Login into docker
# Only login if using master on original repo (and not for pull requests or forks)
if: github.repository_owner == 'randriu'
run: echo '${{ secrets.STORMPY_CI_DOCKER_PASSWORD }}' | docker login -u randriu --password-stdin
- name: Deploy paynt image
# Only deploy if using master on original repo (and not for pull requests or forks)
if: github.repository_owner == 'randriu'
run: docker push ${{ matrix.buildType.imageName }}:${{ matrix.buildType.dockerTag }}
deploy-mdp:
name: Deploy on branch (mdp) (${{ matrix.buildType.name }})
runs-on: ubuntu-latest
strategy:
matrix:
buildType:
- {name: "Release", imageName : "randriu/paynt", dockerTag: "mdp", baseImage : "randriu/stormpy-alex", setupArgs: "--disable-smg"}
fail-fast: false
if: github.ref == 'refs/heads/mdp'
steps:
- name: Git clone
uses: actions/checkout@v4
- name: Build paynt image from Dockerfile
run: docker build -t ${{ matrix.buildType.imageName }}:${{matrix.buildType.dockerTag}} . --build-arg base_image=${{matrix.buildType.baseImage}} --build-arg setup_args=${{ matrix.buildType.setupArgs }} --build-arg no_threads=${NR_JOBS}
- name: Login into docker
# Only login if using mdp on original repo (and not for pull requests or forks)
if: github.repository_owner == 'randriu'
run: echo '${{ secrets.STORMPY_CI_DOCKER_PASSWORD }}' | docker login -u randriu --password-stdin
- name: Deploy paynt image
# Only deploy if using mdp on original repo (and not for pull requests or forks)
if: github.repository_owner == 'randriu'
run: docker push ${{ matrix.buildType.imageName }}:${{ matrix.buildType.dockerTag }}