-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
137 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
FROM ubuntu:20.04 | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Install build and runtime deps | ||
RUN apt-get update && apt-get install -y \ | ||
software-properties-common \ | ||
build-essential \ | ||
cmake \ | ||
ninja-build \ | ||
git \ | ||
libhwloc-dev \ | ||
libgtest-dev \ | ||
libyaml-cpp-dev \ | ||
libboost-all-dev \ | ||
wget | ||
|
||
# Install clang 17 | ||
RUN wget https://apt.llvm.org/llvm.sh && \ | ||
chmod u+x llvm.sh && \ | ||
./llvm.sh 17 && \ | ||
apt install -y libc++-17-dev libc++abi-17-dev && \ | ||
ln -s /usr/bin/clang-17 /usr/bin/clang && \ | ||
ln -s /usr/bin/clang++-17 /usr/bin/clang++ | ||
|
||
# Install clang-format | ||
RUN apt install -y clang-format-17 && \ | ||
ln -s /usr/bin/clang-format-17 /usr/bin/clang-format |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
FROM ubuntu:22.04 | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Install build and runtime deps | ||
RUN apt-get update && apt-get install -y \ | ||
software-properties-common \ | ||
build-essential \ | ||
cmake \ | ||
ninja-build \ | ||
git \ | ||
libhwloc-dev \ | ||
libgtest-dev \ | ||
libyaml-cpp-dev \ | ||
libboost-all-dev \ | ||
wget | ||
|
||
# Install clang 17 | ||
RUN wget https://apt.llvm.org/llvm.sh && \ | ||
chmod u+x llvm.sh && \ | ||
./llvm.sh 17 && \ | ||
apt install -y libc++-17-dev libc++abi-17-dev && \ | ||
ln -s /usr/bin/clang-17 /usr/bin/clang && \ | ||
ln -s /usr/bin/clang++-17 /usr/bin/clang++ | ||
|
||
# Install clang-format | ||
RUN apt install -y clang-format-17 && \ | ||
ln -s /usr/bin/clang-format-17 /usr/bin/clang-format |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: Build and Publish Docker Image | ||
|
||
on: | ||
workflow_dispatch: | ||
workflow_call: | ||
push: | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: | ||
- in-service | ||
- builder | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
build: [ | ||
{name: ubuntu-22.04}, | ||
{name: ubuntu-20.04}, | ||
] | ||
|
||
env: | ||
CI_IMAGE_NAME: ghcr.io/${{ github.repository }}/tt-umd-ci-${{ matrix.build.name }} | ||
|
||
name: Building docker image ${{ env.CI_IMAGE_NAME }} | ||
runs-on: ${{ matrix.build.name }} | ||
|
||
steps: | ||
|
||
- name: Fix permissions | ||
run: sudo chmod 777 -R $GITHUB_WORKSPACE | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Log in to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Build image | ||
|
||
- name: Build and export base Docker image | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: .github | ||
file: .github/${{ matrix.build.name }}.Dockerfile | ||
push: true | ||
build-args: | | ||
GIT_SHA=${{ github.sha }} | ||
tags: | | ||
${{ env.BASE_IMAGE_NAME}}:${{ github.sha }} | ||
# Tag image as latest | ||
|
||
- name: Build and push base Docker image | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: .github | ||
file: .github/${{ matrix.build.name }}.Dockerfile | ||
push: true | ||
build-args: | | ||
GIT_SHA=${{ github.sha }} | ||
tags: | | ||
${{ env.BASE_IMAGE_NAME}}:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters