Skip to content

Commit 146f539

Browse files
committed
fix(ci): run ci on dev branch
1 parent 26dacab commit 146f539

10 files changed

+172
-24
lines changed

.github/workflows/nightly-crab-docker.yaml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,25 +30,22 @@ jobs:
3030
uses: actions/checkout@v2
3131
with:
3232
ref: master
33-
- name: Build crab without external libraries + run tests
34-
run: docker build --build-arg UBUNTU=bionic --build-arg BUILD_TYPE=Release -t seahorn/crab:bionic -f docker/crab.Dockerfile .
35-
#- name: Build crab without external libraries + run tests
36-
# run: docker build --build-arg UBUNTU=bionic --build-arg BUILD_TYPE=Coverage -t seahorn/crab:bionic -f docker/crab.Dockerfile .
33+
#- name: Build crab without external libraries for coverage
34+
# run: docker build --build-arg UBUNTU=bionic --build-arg BUILD_TYPE=Coverage -t seahorn/crab:nightly -f docker/crab.Dockerfile .
3735
#- name: Generate coverage report and upload to codecov
38-
# run: docker run -v $(pwd):/host -it seahorn/crab:bionic /bin/sh -c "bash /crab/tests/run_coverage.sh /crab/build /crab && mv /crab/build/all.info /host" && bash <(curl -s https://codecov.io/bash) -Z -f all.info -t ${{ secrets.CODECOV_TOKEN }}
36+
# run: docker run -v $(pwd):/host -it seahorn/crab:nightly /bin/sh -c "bash /crab/tests/run_coverage.sh /crab/build /crab && mv /crab/build/all.info /host" && bash <(curl -s https://codecov.io/bash) -Z -f all.info -t ${{ secrets.CODECOV_TOKEN }}
37+
- name: Build crab without external libraries + run tests
38+
run: docker build --build-arg UBUNTU=bionic --build-arg BUILD_TYPE=Release -t seahorn/crab:nightly -f docker/crab.Dockerfile .
3939
- name: Build crab+apron+ldd-boxes and run tests
40-
run: docker build --build-arg UBUNTU=bionic --build-arg BUILD_TYPE=Release -t seahorn/crab_apron_boxes:bionic -f docker/crab.apron.Dockerfile .
40+
run: docker build --build-arg UBUNTU=bionic --build-arg BUILD_TYPE=Release -t seahorn/crab_apron_boxes:nightly -f docker/crab.apron.Dockerfile .
4141
- name: Build crab+elina and run tests
42-
run: docker build --build-arg UBUNTU=bionic --build-arg BUILD_TYPE=Release -t seahorn/crab_elina:bionic -f docker/crab.elina.Dockerfile .
43-
#- name: Build crab+pplite and run tests
44-
# run: docker build --build-arg UBUNTU=bionic --build-arg BUILD_TYPE=Release -t seahorn/crab_pplite:bionic -f docker/crab.pplite.Dockerfile .
42+
run: docker build --build-arg UBUNTU=bionic --build-arg BUILD_TYPE=Release -t seahorn/crab_elina:nightly -f docker/crab.elina.Dockerfile .
4543
- name: Login to DockerHub Registry
4644
if: ${{ github.event_name == 'schedule' }} # only push if nightly run
4745
run: echo ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin
4846
- name: Tag and push crab (nightly) to DockerHub
4947
if: ${{ github.event_name == 'schedule' }} # only push if nightly run
5048
run: |
51-
docker push seahorn/crab:bionic
52-
docker push seahorn/crab_apron_boxes:bionic
53-
docker push seahorn/crab_elina:bionic
54-
#docker push seahorn/crab_pplite:bionic
49+
docker push seahorn/crab:nightly
50+
docker push seahorn/crab_apron_boxes:nightly
51+
docker push seahorn/crab_elina:nightly

.github/workflows/test-crab-dev-docker.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ jobs:
2525
with:
2626
ref: dev
2727
- name: Build crab without external libraries + run tests
28-
run: docker build --build-arg UBUNTU=bionic --build-arg BUILD_TYPE=Release -t seahorn/crab:bionic -f docker/crab.Dockerfile .
28+
run: docker build --build-arg BUILD_TYPE=Release -t seahorn/crab -f docker/crab.dev.Dockerfile .
2929
- name: Build crab+apron+ldd-boxes and run tests
30-
run: docker build --build-arg UBUNTU=bionic --build-arg BUILD_TYPE=Release -t seahorn/crab_apron_boxes:bionic -f docker/crab.apron.Dockerfile .
30+
run: docker build --build-arg BUILD_TYPE=Release -t seahorn/crab_apron_boxes -f docker/crab.dev.apron.Dockerfile .
3131
- name: Build crab+elina and run tests
32-
run: docker build --build-arg UBUNTU=bionic --build-arg BUILD_TYPE=Release -t seahorn/crab_elina:bionic -f docker/crab.elina.Dockerfile .
32+
run: docker build --build-arg BUILD_TYPE=Release -t seahorn/crab_elina -f docker/crab.dev.elina.Dockerfile .

.github/workflows/test-crab-docker.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ jobs:
2525
with:
2626
ref: master
2727
- name: Build crab without external libraries + run tests
28-
run: docker build --build-arg UBUNTU=bionic --build-arg BUILD_TYPE=Release -t seahorn/crab:bionic -f docker/crab.Dockerfile .
28+
run: docker build --build-arg UBUNTU=bionic --build-arg BUILD_TYPE=Release -t seahorn/crab -f docker/crab.Dockerfile .
2929
- name: Build crab+apron+ldd-boxes and run tests
30-
run: docker build --build-arg UBUNTU=bionic --build-arg BUILD_TYPE=Release -t seahorn/crab_apron_boxes:bionic -f docker/crab.apron.Dockerfile .
30+
run: docker build --build-arg UBUNTU=bionic --build-arg BUILD_TYPE=Release -t seahorn/crab_apron_boxes -f docker/crab.apron.Dockerfile .
3131
- name: Build crab+elina and run tests
32-
run: docker build --build-arg UBUNTU=bionic --build-arg BUILD_TYPE=Release -t seahorn/crab_elina:bionic -f docker/crab.elina.Dockerfile .
32+
run: docker build --build-arg UBUNTU=bionic --build-arg BUILD_TYPE=Release -t seahorn/crab_elina -f docker/crab.elina.Dockerfile .

docker/buildpack-deps-crab.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Dockerfile for building Crab dependencies.
2+
# Dockerfile for building Crab dependencies for Ubuntu xenial and bionic.
33
#
44
# Arguments:
55
# - UBUNTU: xenial, bionic
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#
2+
# Dockerfile for building Crab dependencies for Ubuntu 22.04 jammy
3+
#
4+
5+
# Pull base image.
6+
FROM buildpack-deps:jammy
7+
8+
RUN apt-get update && \
9+
apt-get install -yqq software-properties-common && \
10+
apt-get install -yqq build-essential && \
11+
add-apt-repository -y ppa:mhier/libboost-latest && \
12+
apt-get update && \
13+
apt-get install -yqq cmake cmake-data \
14+
ninja-build \
15+
g++-12 \
16+
libboost1.74-dev libboost-program-options1.74-dev \
17+
libgmp-dev libmpfr-dev libflint-dev
18+

docker/crab.dev.Dockerfile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#
2+
# Dockerfile for Crab image without external libraries.
3+
#
4+
# Pull base image.
5+
FROM seahorn/buildpack-deps-crab:jammy
6+
7+
# Assume that docker-build is ran in the top-level Crab directory
8+
COPY . /crab
9+
# Re-create the build directory that might have been present in the source tree
10+
RUN rm -rf /crab/build /crab/debug /crab/release && mkdir /crab/build
11+
12+
WORKDIR /crab/build
13+
14+
ARG BUILD_TYPE
15+
# Build configuration.
16+
RUN cmake -GNinja \
17+
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
18+
-DCMAKE_INSTALL_PREFIX=run \
19+
-DCMAKE_CXX_COMPILER=g++-12 \
20+
-DCMAKE_EXPORT_COMPILE_COMMANDS=1 \
21+
-DCRAB_ENABLE_TESTS=ON \
22+
../ && \
23+
cmake --build . --target install
24+
25+
# Run tests
26+
RUN /crab/tests/run_tests.sh /crab/tests/expected_results.out /crab/build
27+
28+
WORKDIR /crab
29+

docker/crab.dev.apron.Dockerfile

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#
2+
# Dockerfile for Crab image with apron and boxes libraries.
3+
#
4+
5+
# Pull base image.
6+
FROM seahorn/buildpack-deps-crab:jammy
7+
8+
# Assume that docker-build is ran in the top-level Crab directory
9+
COPY . /crab
10+
# Re-create the build directory that might have been present in the source tree
11+
RUN rm -rf /crab/build /crab/debug /crab/release && mkdir /crab/build
12+
WORKDIR /crab/build
13+
14+
ARG BUILD_TYPE
15+
# Build configuration.
16+
RUN cmake -GNinja \
17+
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
18+
-DCMAKE_INSTALL_PREFIX=run \
19+
-DCMAKE_CXX_COMPILER=g++-12 \
20+
-DCMAKE_EXPORT_COMPILE_COMMANDS=1 \
21+
-DCRAB_USE_LDD=ON \
22+
-DCRAB_USE_APRON=ON \
23+
-DCRAB_ENABLE_TESTS=ON \
24+
../ && \
25+
cmake --build . --target ldd && cmake .. && \
26+
cmake --build . --target apron && cmake .. && \
27+
cmake --build . --target install
28+
29+
# Run tests
30+
RUN /crab/tests/run_tests.sh /crab/tests/expected_results.apron.out /crab/build
31+
RUN /crab/tests/run_tests.sh /crab/tests/expected_results.boxes.out /crab/build
32+
33+
WORKDIR /crab
34+

docker/crab.dev.elina.Dockerfile

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#
2+
# Dockerfile for Crab image with elina library.
3+
#
4+
5+
# Pull base image.
6+
FROM seahorn/buildpack-deps-crab:jammy
7+
8+
# Assume that docker-build is ran in the top-level Crab directory
9+
COPY . /crab
10+
# Re-create the build directory that might have been present in the source tree
11+
RUN rm -rf /crab/build /crab/debug /crab/release && mkdir /crab/build
12+
WORKDIR /crab/build
13+
14+
ARG BUILD_TYPE
15+
# Build configuration.
16+
RUN cmake -GNinja \
17+
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
18+
-DCMAKE_INSTALL_PREFIX=run \
19+
-DCMAKE_CXX_COMPILER=g++-12 \
20+
-DCMAKE_EXPORT_COMPILE_COMMANDS=1 \
21+
-DCRAB_USE_ELINA=ON \
22+
-DCRAB_ENABLE_TESTS=ON \
23+
../ && \
24+
cmake --build . --target elina && cmake .. && \
25+
cmake --build . --target install
26+
27+
# To find elina dynamic libraries
28+
ENV LD_LIBRARY_PATH "/crab/build/run/elina/lib:$LD_LIBRARY_PATH"
29+
30+
# Run tests
31+
RUN /crab/tests/run_tests.sh /crab/tests/expected_results.elina.out /crab/build
32+
33+
WORKDIR /crab
34+

docker/crab.dev.pplite.Dockerfile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#
2+
# Dockerfile for Crab image with pplite library.
3+
#
4+
5+
# Pull base image.
6+
FROM seahorn/buildpack-deps-crab:jammy
7+
8+
# Assume that docker-build is ran in the top-level Crab directory
9+
COPY . /crab
10+
# Re-create the build directory that might have been present in the source tree
11+
RUN rm -rf /crab/build /crab/debug /crab/release && mkdir /crab/build
12+
WORKDIR /crab/build
13+
14+
ARG BUILD_TYPE
15+
# Build configuration.
16+
RUN cmake -GNinja \
17+
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
18+
-DCMAKE_INSTALL_PREFIX=run \
19+
-DCMAKE_CXX_COMPILER=g++-12 \
20+
-DCMAKE_EXPORT_COMPILE_COMMANDS=1 \
21+
-DCRAB_USE_APRON=ON -DCRAB_USE_PPLITE=ON \
22+
-DCRAB_ENABLE_TESTS=ON \
23+
../ && \
24+
cmake --build . --target apron && cmake .. && \
25+
cmake --build . --target pplite && cmake .. && \
26+
cmake --build . --target pplite_domains
27+
28+
# Run tests
29+
RUN /crab/tests/run_tests.sh /crab/tests/expected_results.pplite.out /crab/build
30+
31+
WORKDIR /crab
32+

docker/readme.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,21 @@
22

33

44
```shell
5-
$ docker build --build-arg UBUNTU=bionic -t seahorn/buildpack-deps-crab:bionic -f docker/buildpack-deps-crab.Dockerfile .
5+
$ docker build -t seahorn/buildpack-deps-crab:bionic -f docker/buildpack-deps-crab.Dockerfile .
66
$ docker push seahorn/buildpack-deps-crab:bionic
77
```
8+
or
89

10+
```shell
11+
$ docker build -t seahorn/buildpack-deps-crab:bionic -f docker/buildpack-deps-crab.jammy.Dockerfile .
12+
$ docker push seahorn/buildpack-deps-crab:jammy
13+
```
914

1015
# Building Docker image for Crab and running tests #
1116

1217
```shell
13-
docker build --build-arg UBUNTU=bionic --build-arg BUILD_TYPE=Release -t seahorn/crab:bionic -f docker/crab.Dockerfile .
14-
docker run -v `pwd`:/host -it seahorn/crab:bionic
18+
docker build --build-arg BUILD_TYPE=Release -t seahorn/crab -f docker/crab.Dockerfile .
19+
docker run -v `pwd`:/host -it seahorn/crab:latest
1520
```
1621

1722
This will automatically download all dependencies from a base image
@@ -20,6 +25,5 @@ and build Crab under `/crab/build`.
2025
Crab's install directory is added to `PATH`.
2126

2227
Build arguments (required):
23-
- UBUNTU: xenial, bionic
2428
- BUILD_TYPE: Release, Debug
2529

0 commit comments

Comments
 (0)