Skip to content

Commit 63b9a3a

Browse files
tmeissnereine
authored andcommitted
add 'cvc4' workflow and dockerfile
1 parent 6016365 commit 63b9a3a

File tree

7 files changed

+173
-1
lines changed

7 files changed

+173
-1
lines changed

.github/workflows/cvc4.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Authors:
2+
# Unai Martinez-Corral
3+
# Torsten Meissner
4+
#
5+
# Copyright 2020-2021 Unai Martinez-Corral <[email protected]>
6+
#
7+
# Licensed under the Apache License, Version 2.0 (the "License");
8+
# you may not use this file except in compliance with the License.
9+
# You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
#
19+
# SPDX-License-Identifier: Apache-2.0
20+
21+
name: 'cvc4'
22+
23+
on:
24+
pull_request:
25+
push:
26+
schedule:
27+
- cron: '0 0 * * 5'
28+
workflow_dispatch:
29+
repository_dispatch:
30+
types: [ cvc4 ]
31+
32+
env:
33+
DOCKER_BUILDKIT: 1
34+
35+
jobs:
36+
37+
cvc4:
38+
runs-on: ubuntu-latest
39+
steps:
40+
41+
- uses: actions/checkout@v2
42+
43+
- run: echo "$(pwd)/.github/bin" >> $GITHUB_PATH
44+
45+
- run: dockerBuild pkg:cvc4 cvc4
46+
47+
- run: dockerTestPkg cvc4
48+
49+
- name: Login to DockerHub
50+
if: github.event_name != 'pull_request' && github.repository == 'hdl/containers'
51+
uses: docker/login-action@v1
52+
with:
53+
username: ${{ secrets.DOCKER_USER }}
54+
password: ${{ secrets.DOCKER_PASS }}
55+
56+
- run: dockerPush pkg:cvc4
57+
if: github.event_name != 'pull_request' && github.repository == 'hdl/containers'

cvc4.dockerfile

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Authors:
2+
# Unai Martinez-Corral
3+
# Torsten Meissner
4+
#
5+
# Copyright 2021 Unai Martinez-Corral <[email protected]>
6+
#
7+
# Licensed under the Apache License, Version 2.0 (the "License");
8+
# you may not use this file except in compliance with the License.
9+
# You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
#
19+
# SPDX-License-Identifier: Apache-2.0
20+
21+
FROM hdlc/build:build AS build
22+
23+
RUN mkdir /usr/share/man/man1 \
24+
&& apt-get update -qq \
25+
&& DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \
26+
cmake \
27+
openjdk-11-jre-headless \
28+
libgmp-dev \
29+
python3-toml \
30+
&& apt-get autoclean && apt-get clean && apt-get -y autoremove \
31+
&& update-ca-certificates \
32+
&& rm -rf /var/lib/apt/lists/*
33+
34+
RUN mkdir /tmp/cvc4 && cd /tmp/cvc4 \
35+
&& curl -fsSL https://codeload.github.com/CVC4/CVC4/tar.gz/master | tar xzf - --strip-components=1 \
36+
&& ./contrib/get-antlr-3.4 \
37+
&& ./contrib/get-cadical \
38+
&& ./configure.sh --cadical \
39+
&& cd build \
40+
&& make -j$(nproc) \
41+
&& make DESTDIR=/opt/cvc4 install
42+
43+
#---
44+
45+
FROM scratch
46+
COPY --from=build /opt/cvc4 /cvc4

doc/index.adoc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ To Do:
3535

3636
* https://github.com/khoapham/bitman[BitMan]
3737
* https://hdl.github.io/awesome/items/cocotb[cocotb]
38-
* https://github.com/CVC4/CVC4[CVC4]
3938
* https://hdl.github.io/awesome/items/ecpprog[ecpprog]
4039
* https://hdl.github.io/awesome/items/fujprog[fujprog]
4140
* https://hdl.github.io/awesome/items/iverilog[iverilog]
@@ -121,6 +120,12 @@ include::shield_gha.adoc[]
121120
* {blank}
122121
+
123122
--
123+
:workflow: cvc4
124+
include::shield_gha.adoc[]
125+
--
126+
* {blank}
127+
+
128+
--
124129
:workflow: superprove
125130
include::shield_gha.adoc[]
126131
--

doc/tools.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,16 @@ boolector:
2727

2828
#---
2929

30+
cvc4:
31+
url: 'https://hdl.github.io/awesome/items/cvc4'
32+
pkg:
33+
- 'cvc4'
34+
in:
35+
- 'formal'
36+
- 'formal:all'
37+
38+
#---
39+
3040
ghdl:
3141
url: 'https://hdl.github.io/awesome/items/ghdl'
3242
pkg:

formal.dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ FROM min AS latest
3535

3636
COPY --from=hdlc/pkg:yices2 /yices2 /
3737
COPY --from=hdlc/pkg:boolector /boolector /
38+
COPY --from=hdlc/pkg:cvc4 /cvc4 /
3839

3940
#---
4041

graph/graph.dot

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ digraph G {
2727
{ node [shape=note, color=dodgerblue, fontcolor=dodgerblue]
2828
d_base [label="base"];
2929
d_boolector [label="boolector"];
30+
d_cvc4 [label="cvc4"];
3031
d_formal [label="formal"];
3132
d_ghdl [label="ghdl"];
3233
d_ghdlYosysPlugin [label="ghdl-yosys-plugin"];
@@ -63,6 +64,7 @@ digraph G {
6364
}
6465
{ node [color=mediumblue, fontcolor=mediumblue]
6566
"pkg:boolector"
67+
"pkg:cvc4"
6668
"pkg:ghdl"
6769
"pkg:ghdl-yosys-plugin"
6870
"pkg:gtkwave"
@@ -342,6 +344,20 @@ digraph G {
342344
"pkg:boolector" -> "t_pkg:boolector";
343345
}
344346

347+
subgraph cluster_cvc4 {
348+
{ rank=same
349+
node [shape=cylinder, color=grey, fontcolor=grey]
350+
"p_cvc4_scratch" [label="scratch"]
351+
"p_cvc4_build:build" [label="build:build"]
352+
}
353+
354+
d_cvc4 -> "pkg:cvc4" [style=dotted];
355+
356+
"t_pkg:cvc4" [shape=folder, color=red, fontcolor=red, label="cvc4.pkg"];
357+
358+
"pkg:cvc4" -> "t_pkg:cvc4";
359+
}
360+
345361
subgraph cluster_superprove {
346362
{ rank=same
347363
node [shape=cylinder, color=grey, fontcolor=grey]
@@ -388,6 +404,7 @@ digraph G {
388404
{ rank=same
389405
node [shape=cylinder, color=grey, fontcolor=grey]
390406
"p_formal_boolector" [label="pkg:boolector"]
407+
"p_formal_cvc4" [label="pkg:cvc4"]
391408
"p_formal_ghdl" [label="ghdl:yosys"]
392409
"p_formal_symbiyosys" [label="pkg:symbiyosys"]
393410
"p_formal_superprove" [label="pkg:superprove"]
@@ -429,6 +446,7 @@ digraph G {
429446

430447
{ rank=same
431448
d_boolector
449+
d_cvc4
432450
d_superprove
433451
d_symbiyosys
434452
d_yices2
@@ -442,9 +460,13 @@ digraph G {
442460
"build:build" -> "p_boolector_build:build" -> d_boolector;
443461
"scratch" -> "p_boolector_scratch" -> d_boolector;
444462

463+
"build:build" -> "p_cvc4_build:build" -> d_cvc4;
464+
"scratch" -> "p_cvc4_scratch" -> d_cvc4;
465+
445466
"ghdl:yosys" -> "p_formal_ghdl" -> d_formal;
446467
"pkg:symbiyosys" -> "p_formal_symbiyosys" -> d_formal;
447468
"pkg:boolector" -> "p_formal_boolector" -> d_formal;
469+
"pkg:cvc4" -> "p_formal_cvc4" -> d_formal;
448470
"pkg:yices2" -> "p_formal_yices2" -> d_formal;
449471
"pkg:superprove" -> "p_formal_superprove" -> d_formal;
450472
"pkg:z3" -> "p_formal_z3" -> d_formal;
@@ -505,6 +527,8 @@ digraph G {
505527

506528
"p_boolector_scratch" -> "pkg:boolector";
507529

530+
"p_cvc4_scratch" -> "pkg:cvc4";
531+
508532
"p_ghdl_scratch" -> "pkg:ghdl";
509533
"p_ghdl_build:base" -> "ghdl";
510534

@@ -553,6 +577,7 @@ digraph G {
553577

554578
{
555579
"p_formal_boolector",
580+
"p_formal_cvc4",
556581
"p_formal_yices2"
557582
} -> "formal";
558583

test/cvc4.pkg.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/sh
2+
3+
# Authors:
4+
# Unai Martinez-Corral
5+
#
6+
# Copyright 2020-2021 Unai Martinez-Corral <[email protected]>
7+
#
8+
# Licensed under the Apache License, Version 2.0 (the "License");
9+
# you may not use this file except in compliance with the License.
10+
# You may obtain a copy of the License at
11+
#
12+
# http://www.apache.org/licenses/LICENSE-2.0
13+
#
14+
# Unless required by applicable law or agreed to in writing, software
15+
# distributed under the License is distributed on an "AS IS" BASIS,
16+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
# See the License for the specific language governing permissions and
18+
# limitations under the License.
19+
#
20+
# SPDX-License-Identifier: Apache-2.0
21+
22+
set -e
23+
24+
cd $(dirname "$0")
25+
26+
./_tree.sh
27+
28+
./_todo.sh

0 commit comments

Comments
 (0)