Skip to content

Commit

Permalink
fixed Ubuntu build
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-sitnikov committed Apr 20, 2024
1 parent b3b41c9 commit 49dfd5c
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Build Ubuntu-20.10
- name: Build Ubuntu-20.04
run: |
docker build -f Docker/Test-Build-Ubuntu-20.10.docker .
docker build -f Docker/Test-Build-Ubuntu-20.04.docker .
34 changes: 34 additions & 0 deletions Docker/Test-Build-Ubuntu-20.04.docker
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive

RUN apt update -y

# Apparently wget is not installed by default
RUN apt-get install -y wget

# Add llvm pub key
RUN wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc

# Install add-apt-repository
RUN apt-get install -y software-properties-common

# Add llvm 18 repository with sources
RUN add-apt-repository -s -y "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-18 main"

RUN echo apt-get update && apt-get install -y llvm-18 clang-18 libclang-18-dev libclang-cpp18-dev python3-pip

# Easiest way to get sufficiently new cmake appears to be using pip - Ubuntu 20.10 version is too old
RUN pip3 install --upgrade cmake

# Copy the source into the Docker container
RUN mkdir -p /c2ffi
COPY / /c2ffi
WORKDIR /c2ffi

# Build c2ffi
RUN cd /c2ffi && \
rm -rf build && mkdir -p build && cd build && \
cmake -DBUILD_CONFIG=Release .. && make

# As a sanity check, make sure the binary we built can be executed
RUN /c2ffi/build/bin/c2ffi --help
19 changes: 0 additions & 19 deletions Docker/Test-Build-Ubuntu-20.10.docker

This file was deleted.

0 comments on commit 49dfd5c

Please sign in to comment.