Skip to content

Commit

Permalink
Build gcc and clang in docker
Browse files Browse the repository at this point in the history
Signed-off-by: Wojciech Madry <[email protected]>
  • Loading branch information
wojciechmadry committed Dec 19, 2023
1 parent fcbf12d commit 4dce4f8
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 86 deletions.
37 changes: 5 additions & 32 deletions .github/workflows/clang.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,19 @@ name: Clang

on:
push:
branches:
- '**'
branches:
- '**'
pull_request:
branches:
- '**'
- '**'

jobs:
build:

runs-on: ubuntu-22.04
env:
CC: clang
CXX: clang++

steps:
- uses: actions/checkout@v3

- name: Install Dependencies
run: |
sudo apt -y install clang \
libudev-dev \
libopenal-dev \
libvorbis-dev \
libflac-dev \
libx11-dev \
libxcursor-dev \
libxrandr-dev \
libfreetype-dev \
libopengl-dev \
libglx-dev \
libgl1-mesa-dev
- name: FetchSubmodules
run: |
git submodule init
git submodule update
- name: Build Clang
run: |
mkdir -p build
cd build
cmake ../
cmake --build . -j
- name: clang
run: docker build . --file Dockerfile.clang --tag kulki_docker_clang:$(date +%s)
6 changes: 3 additions & 3 deletions .github/workflows/clang_format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ name: ClangFormat

on:
push:
branches:
- '**'
branches:
- '**'
pull_request:
branches:
- '**'
- '**'

jobs:
build:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Dockerfile build
name: GCC

on:
push:
Expand All @@ -9,12 +9,12 @@ on:
- '**'

jobs:

build:

runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build . --file Dockerfile --tag kulki_docker:$(date +%s)

- name: gcc
run: docker build . --file Dockerfile.gcc --tag kulki_docker_gcc:$(date +%s)
47 changes: 0 additions & 47 deletions .github/workflows/gcc.yml

This file was deleted.

File renamed without changes.
37 changes: 37 additions & 0 deletions Dockerfile.gcc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM ubuntu:22.04

WORKDIR /ws

RUN apt update \
&& apt upgrade -y\
&& apt install -y\
cmake \
ninja-build \
gcc \
git \
libudev-dev \
libopenal-dev \
libvorbis-dev \
libflac-dev \
libx11-dev \
libxcursor-dev \
libxrandr-dev \
libfreetype-dev \
libopengl-dev \
libglx-dev \
libgl1-mesa-dev

ENV CC=gcc
ENV CXX=g++
ENV BRANCH=master

RUN git clone https://github.com/wojciechmadry/Kulki.git \
&& cd Kulki \
&& git checkout ${BRANCH} \
&& git submodule init \
&& git submodule update \
&& mkdir -p build \
&& cd build \
&& cmake -GNinja ../ \
&& ninja

0 comments on commit 4dce4f8

Please sign in to comment.