From 5bd7e30d7697f5a8c2d8886cc8aa7a173f951276 Mon Sep 17 00:00:00 2001 From: Noah Santschi-Cooney Date: Wed, 2 Dec 2020 19:33:23 +0000 Subject: [PATCH] Dockerized with Github Action --- .dockerignore | 5 +++++ .github/workflows/release.yml | 28 ++++++++++++++++++++++++++++ Dockerfile | 17 +++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 .dockerignore create mode 100644 .github/workflows/release.yml create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000..0be97f5fe9 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +massif.out.* +.vscode +.devcontainer +build/ +bin/ \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000000..bcecbd798a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,28 @@ +name: release + +on: + push: + branches: + - llvm-10.0.0-lsif-clang + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Unshallow + run: git fetch --prune --unshallow && git submodule update --init --recursive + - name: Docker login + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + push: true + tags: sourcegraph/lsif-clang:latest + - name: Image digest + run: echo ${{ steps.docker_build.outputs.digest }} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..95f1b9fb73 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM ubuntu:20.04 as build + +RUN apt update && apt install -y llvm-10 clang clang-10 libclang-10-dev cmake + +WORKDIR /lsif-clang + +COPY . . + +RUN cmake -B build && make -C build -j$(nproc) + +FROM ubuntu:20.04 + +RUN apt update && apt install -y llvm-10 cmake + +COPY --from=build /lsif-clang/bin/lsif-clang /usr/local/bin/lsif-clang + +ENTRYPOINT [ "lsif-clang" ] \ No newline at end of file