-
Notifications
You must be signed in to change notification settings - Fork 1
146 lines (121 loc) · 4.3 KB
/
continuous-integration.yaml
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
name: Apply ATP prover on FOF files
on:
push:
tags:
- v*.*.*
pull_request:
branches:
- '*'
jobs:
release:
runs-on: ubuntu-latest
name: Create release
steps:
- name: Set env
run: |
RELEASE_NAME="${GITHUB_REF#refs/*/}"
RELEASE_NAME="$(echo $RELEASE_NAME | sed 's/\//-/g')"
echo "RELEASE_NAME=${RELEASE_NAME}" >> $GITHUB_ENV
- name: Create a release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
prerelease: false
automatic_release_tag: ${{ env.RELEASE_NAME }}
push_to_registry:
needs: release
name: Push Docker image to Container Registry
runs-on: ubuntu-latest
outputs:
docker_image: ${{ steps.meta.outputs.tags }}
release_name: ${{ env.RELEASE_NAME }}
permissions:
packages: write
contents: read
steps:
- name: Set env
run: |
RELEASE_NAME="${GITHUB_REF#refs/*/}"
RELEASE_NAME="$(echo $RELEASE_NAME | sed 's/\//-/g')"
echo "RELEASE_NAME=${RELEASE_NAME}" >> $GITHUB_ENV
echo "release_name=${RELEASE_NAME}" >> $GITHUB_OUTPUT
- name: Check out the repo
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Log in to the Container registry
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81
with:
images: |
ghcr.io/${{ github.repository }}
- name: Build and push Docker images
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-fof_apply-provers:
needs: push_to_registry
name: Build FOF files, apply provers, parse results
runs-on: ubuntu-latest
defaults:
run:
shell: bash
container:
image: ${{ needs.push_to_registry.outputs.docker_image }}
credentials:
username: ${{ github.actor }}
password: ${{ secrets.github_token }}
volumes:
- ${{ github.workspace }}:/workspace
options: --cpus 2
env:
RELEASE_NAME: ${{ needs.push_to_registry.outputs.release_name }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Check out the repo
uses: actions/checkout@v4.1.1
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Run tests
working-directory: /usr/local/atp-prolog-verification
run: make test
- name: Make FOF files
working-directory: /usr/local/atp-prolog-verification
run: |
echo 'release '$RELEASE_NAME
make build-fof-for-each-program
## - name: Applying provers on FOF files for all programs available in ./src
## working-directory: /usr/local/atp-prolog-verification
## run: make apply-provers-for-each-program
- name: Parse results
working-directory: /usr/local/atp-prolog-verification
run: make all-results
- name: Convert results to LaTeX
working-directory: /usr/local/atp-prolog-verification
run: make all-results-in-latex
- name: Archive FOF files, results
working-directory: /usr/local/atp-prolog-verification
run: |
echo 'release '$RELEASE_NAME
RELEASE_NAME=$RELEASE_NAME /bin/bash -c '. .github/workflows/release/build-archive.sh'
cp /usr/local/atp-prolog-verification/$RELEASE_NAME /workspace/$RELEASE_NAME
- uses: actions/upload-artifact@main
with:
path: |
${{ github.workspace }}/$RELEASE_NAME
- name: Publish release
working-directory: /usr/local/atp-prolog-verification
run: |
echo 'release '$RELEASE_NAME
GITHUB_TOKEN=$GITHUB_TOKEN \
RELEASE_NAME=$RELEASE_NAME \
/bin/bash -c '. ./.github/workflows/release/publish-archive.sh'