Skip to content

Commit

Permalink
replacing ubuntu with ubi8 binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
gangatp committed Jan 24, 2024
1 parent a1a744f commit 35e8951
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 92 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
file: ./CI/Dockerfile
platforms: linux/amd64
tags: lib3mf_ubi8:latest
load: true
Expand All @@ -51,14 +51,14 @@ jobs:
id: extract
with:
image: lib3mf_ubi8:latest
path: /out.zip
path: /lib3mf-repo/build/lib3mf.so.2
destination: dist
-
name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: lib3mf_ubi8_gcc12.zip
path: dist/out.zip
name: lib3mf.so
path: dist/lib3mf.so.2

build-macos:
runs-on: macos-latest
Expand Down Expand Up @@ -175,7 +175,7 @@ jobs:
working-directory: ./build
assemble-sdk:
runs-on: ubuntu-20.04
needs: [build-windows-release, build-linux, build-macos]
needs: [build-windows-release, build-macos, build-linux-ubi8-gcc12]
steps:
- run: sudo apt install -y zip unzip
- run: mkdir build
Expand Down
62 changes: 58 additions & 4 deletions CI/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,72 @@
# Copy this to root folder of lib3mf then build and run this image.
FROM ubuntu:20.04
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest

RUN apt-get update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install build-essential uuid-dev wget
LABEL maintainer="[email protected]"

ENV GCCTOOLSET=gcc-toolset-12

RUN \
microdnf update -y && \
microdnf -y install --nodocs \
git \
git-lfs \
wget \
which \
libuuid-devel \
glibc-langpack-en \
python39-pip \
tar \
gzip \
zip \
unzip \
${GCCTOOLSET} \
&& microdnf clean all

ENV LD_LIBRARY_PATH=/opt/rh/${GCCTOOLSET}/root/usr/lib64:/opt/rh/${GCCTOOLSET}/root/usr/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
ENV PKG_CONFIG_PATH=/opt/rh/${GCCTOOLSET}/root/usr/lib64/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}
ENV PATH=/opt/rh/${GCCTOOLSET}/root/usr/bin${PATH:+:${PATH}}

# CMake
ARG CMAKE_VERSION=3.28.1
ADD "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz" /usr/tmp/
RUN tar xzf /usr/tmp/cmake-$CMAKE_VERSION-linux-x86_64.tar.gz -C /opt && rm /usr/tmp/cmake-$CMAKE_VERSION-linux-x86_64.tar.gz
ENV PATH /opt/cmake-$CMAKE_VERSION-linux-x86_64/bin:${PATH}


RUN ln -s /opt/cmake-$CMAKE_VERSION-linux-x86_64/bin/cmake /usr/bin/cmake3
RUN ln -s /opt/cmake-$CMAKE_VERSION-linux-x86_64/bin/cpack /usr/bin/cpack3
RUN ln -s /opt/cmake-$CMAKE_VERSION-linux-x86_64/bin/ctest /usr/bin/ctest3

# Add Python site to PATH
ENV PATH /root/.local/bin:${PATH}



RUN ldd --version
RUN cmake --version
RUN cmake3 --version
RUN git --version
RUN git lfs version
RUN python3 --version
RUN pip3 --version
RUN gcc --version

RUN wget -qO- "https://cmake.org/files/v3.28/cmake-3.28.1-linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C /usr/local

ADD . lib3mf-repo

WORKDIR "/lib3mf-repo"

RUN chmod +x cmake/GenerateMake.sh

RUN cmake/GenerateMake.sh

WORKDIR "/lib3mf-repo/build"

RUN cmake --build .

RUN ctest -V .

WORKDIR "/../../"




18 changes: 18 additions & 0 deletions CI/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copy this to root folder of lib3mf then build and run this image.
FROM ubuntu:20.04

RUN apt-get update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install build-essential uuid-dev wget

RUN wget -qO- "https://cmake.org/files/v3.28/cmake-3.28.1-linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C /usr/local

ADD . lib3mf-repo

WORKDIR "/lib3mf-repo"

RUN cmake/GenerateMake.sh

WORKDIR "/lib3mf-repo/build"

RUN cmake --build .

RUN ctest -V .
83 changes: 0 additions & 83 deletions Dockerfile

This file was deleted.

0 comments on commit 35e8951

Please sign in to comment.