Skip to content

Commit 6b32a38

Browse files
DockerHub push (#168)
* Pushing docker image to DockerHub, only if all tests pass --------- Co-authored-by: AndrewQuijano <andrewquijano92@gmail.com> Co-authored-by: Andrew <afq2101@columbia.edu>
1 parent c89b6cc commit 6b32a38

File tree

4 files changed

+63
-8
lines changed

4 files changed

+63
-8
lines changed

.github/workflows/check_style.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ jobs:
44
coding_style:
55
runs-on: ubuntu-22.04
66
steps:
7-
- uses: actions/checkout@v3
7+
- uses: actions/checkout@v4
88
with:
99
fetch-depth: 0
1010
- name: Run clang-format
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Publish SymCC Docker image
2+
# for testing only
3+
#on: [pull_request, workflow_dispatch]
4+
#
5+
# we want to push a docker image when the Compile and test SymCC
6+
# workflow completed successfully
7+
on:
8+
workflow_run:
9+
workflows: [Compile and test SymCC]
10+
branches: master
11+
types:
12+
- completed
13+
14+
jobs:
15+
upload_dockerhub:
16+
if: github.repository == 'eurecom-s3/symcc' && github.ref == 'refs/heads/master'
17+
# not when testing
18+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
19+
runs-on: ubuntu-latest
20+
steps:
21+
-
22+
name: Checkout project sources
23+
uses: actions/checkout@v4
24+
-
25+
name: Login to Docker Hub
26+
uses: docker/login-action@v3
27+
with:
28+
username: ${{ secrets.DOCKER_USERNAME }}
29+
password: ${{ secrets.DOCKER_PASSWORD }}
30+
-
31+
name: Set up Docker Buildx
32+
uses: docker/setup-buildx-action@v3
33+
-
34+
name: Build and push
35+
uses: docker/build-push-action@v5
36+
with:
37+
context: .
38+
file: ./Dockerfile
39+
push: true
40+
tags: ${{ secrets.DOCKER_USERNAME }}/symcc:latest

.github/workflows/run_tests.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Compile and test SymCC
22
on: [pull_request, workflow_dispatch]
33
jobs:
4+
# Building and running the tests with Dockerfile
45
build_and_test_symcc:
56
runs-on: ubuntu-20.04
67
steps:
@@ -15,21 +16,23 @@ jobs:
1516
run: docker build --target builder_qsym -t symcc .
1617
- name: Creation of the final SymCC docker image with Qsym backend and libcxx
1718
run: docker build -t symcc .
19+
20+
# checking compatibility with ubuntu llvm packages
1821
llvm_compatibility:
1922
runs-on: ubuntu-22.04
2023
strategy:
2124
matrix:
2225
llvm_version: [11, 12, 13, 14, 15]
2326
steps:
24-
- uses: actions/checkout@v3
27+
- uses: actions/checkout@v4
2528
with:
2629
submodules: true
2730
- name: Install dependencies
2831
run: |
2932
sudo apt-get update
3033
sudo apt-get install -y \
3134
llvm-${{ matrix.llvm_version }}-dev \
32-
libz3-dev \
35+
libz3-dev
3336
- name: Build SymCC with the QSYM backend
3437
run: |
3538
mkdir build
@@ -41,13 +44,15 @@ jobs:
4144
-DLLVM_DIR=/usr/lib/llvm-${{ matrix.llvm_version }}/cmake \
4245
..
4346
make
47+
48+
# checking compatibility (compilation only) with more recent packages
4449
llvm_compatibility_latest_llvm:
4550
runs-on: ubuntu-22.04
4651
strategy:
4752
matrix:
4853
llvm_version: [16, 17, 18]
4954
steps:
50-
- uses: actions/checkout@v3
55+
- uses: actions/checkout@v4
5156
with:
5257
submodules: true
5358
- name: Add LLVM project deb repository
@@ -62,7 +67,7 @@ jobs:
6267
sudo apt-get update
6368
sudo apt-get install -y \
6469
llvm-${{ matrix.llvm_version }}-dev \
65-
libz3-dev \
70+
libz3-dev
6671
- name: Build SymCC with the QSYM backend
6772
run: |
6873
mkdir build

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,16 @@ contains detailed instructions to replicate our experiments, as well as the raw
141141
results that we obtained.
142142
143143
### Video demonstration
144-
On YouTube you can find [a practical introduction to SymCC](https://www.youtube.com/watch?v=htDrNBiL7Y8) as well as a video on [how to combine AFL and SymCC](https://www.youtube.com/watch?v=zmC-ptp3W3k)
144+
On YouTube you can find [a practical introduction to
145+
SymCC](https://www.youtube.com/watch?v=htDrNBiL7Y8) as well as a video on [how
146+
to combine AFL and SymCC](https://www.youtube.com/watch?v=zmC-ptp3W3k)
145147
146148
## Building a Docker image
147149
148150
If you prefer a Docker container over building SymCC natively, just tell Docker
149151
to build the image after pulling the QSYM code as above. (Be warned though: the
150-
Docker image enables optional C++ support from source, so creating
151-
the image can take quite some time!)
152+
Docker image enables optional C++ support from source, so creating the image can
153+
take quite some time!)
152154
153155
```
154156
$ git submodule init
@@ -157,6 +159,14 @@ $ docker build -t symcc .
157159
$ docker run -it --rm symcc
158160
```
159161
162+
Alternatively, you can pull an existing image (current master branch) from
163+
Docker Hub:
164+
165+
```
166+
$ docker pull eurecoms3/symcc
167+
$ docker run -it --rm symcc
168+
```
169+
160170
This will build a Docker image and run an ephemeral container to try out SymCC.
161171
Inside the container, `symcc` is available as a drop-in replacement for `clang`,
162172
using the QSYM backend; similarly, `sym++` can be used instead of `clang++`. Now

0 commit comments

Comments
 (0)