Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DockerHub push #165

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check_style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
coding_style:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run clang-format
Expand Down
47 changes: 31 additions & 16 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,13 @@
name: Compile and test SymCC
on: [pull_request, workflow_dispatch]
jobs:
build_and_test_symcc:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Setup docker compilation environment
run: docker build --target builder -t symcc .
- name: Build and test SymCC with simple backend
run: docker build --target builder_simple -t symcc .
- name: Build libcxx using SymCC simple backend
run: docker build --target builder_libcxx -t symcc .
- name: Build and test SymCC with Qsym backend
run: docker build --target builder_qsym -t symcc .
- name: Creation of the final SymCC docker image with Qsym backend and libcxx
run: docker build -t symcc .
llvm_compatibility:
runs-on: ubuntu-22.04
strategy:
matrix:
llvm_version: [11, 12, 13, 14, 15]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: Install dependencies
Expand All @@ -47,7 +33,7 @@ jobs:
matrix:
llvm_version: [16, 17, 18]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: Add LLVM project deb repository
Expand All @@ -74,3 +60,32 @@ jobs:
-DLLVM_DIR=/usr/lib/llvm-${{ matrix.llvm_version }}/cmake \
..
make

# 1- This is all open source anyway, so I figure anyone working on this should maybe create a DockerHub account
# and create secrets to store their username and password to test uploading their changes to symcc.
# Also, deleting the old workflow, as if I kept it, this would build the Docker image twice.
# 2- We should only build and push to DockerHub if this passes all tests
upload_dockerhub:
# if: github.repository == 'eurecom-s3/symcc' && github.ref == 'refs/heads/master'
needs: [ llvm_compatibility, llvm_compatibility_latest_llvm ]
runs-on: ubuntu-latest
steps:
- name: Checkout project sources
uses: actions/checkout@v4

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/symcc:latest
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ $ docker build -t symcc .
$ docker run -it --rm symcc
```

Alternatively, you can pull from docker hub
```
$ docker pull eurecoms3/symcc
$ docker run -it --rm symcc
```

This will build a Docker image and run an ephemeral container to try out SymCC.
Inside the container, `symcc` is available as a drop-in replacement for `clang`,
using the QSYM backend; similarly, `sym++` can be used instead of `clang++`. Now
Expand Down