Skip to content

Commit

Permalink
chore: add ubuntu 24.04 image to the foundry
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Gershman <[email protected]>
  • Loading branch information
romange committed Mar 1, 2024
1 parent 91150fb commit b4ff54c
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 18 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [ main ]
workflow_dispatch:

permissions:
permissions:
packages: write

jobs:
Expand All @@ -25,21 +25,24 @@ jobs:
- container: "ubuntu-dev:22"
file: u22.04-dev.Dockerfile
- container: "ubuntu-dev:23.10"
file: "u23.10-dev.Dockerfile"
file: u23.10-dev.Dockerfile
- container: "fedora:30"
file: "fedora30-dev.Dockerfile"
file: fedora30-dev.Dockerfile
- container: "centos-dev:7"
file: "centos7-dev.Dockerfile"
file: centos7-dev.Dockerfile
- container: "ubuntu-dev:24"
file: u24.04-dev.Dockerfile

steps:
- name: checkout
uses: actions/checkout@v3

# https://github.com/docker/setup-qemu-action
-
-
name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v2
with:
with:
platforms: arm64,amd64
-
name: Available platforms
Expand All @@ -55,8 +58,8 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

-
name: Build
-
name: Build
uses: docker/build-push-action@v4
with:
context: .
Expand Down
2 changes: 1 addition & 1 deletion get_mold.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e

cd /tmp
ARCH=`uname -m`
MOLD_VER=2.3.3
MOLD_VER=2.4.1
BASE_URL=https://github.com/rui314/mold/releases/download
curl -L -s $BASE_URL/v${MOLD_VER}/mold-$MOLD_VER-$ARCH-linux.tar.gz -o mold.tgz
mkdir mold
Expand Down
23 changes: 15 additions & 8 deletions install_boost.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -ex

BVER=1.74.0
BVER=1.83.0
BOOST=boost_${BVER//./_} # replace all . with _

# For sake of boost install we always use g++.
Expand All @@ -17,21 +17,28 @@ install_boost() {
tar -xjf $BOOST.tar.bz2
fi

booststap_arg="--without-libraries=graph_parallel,graph,wave,test,mpi,python,fiber,filesystem"
bootstrap_arg="--prefix=/opt/boost --with-libraries=context,header"
cd $BOOST
boostrap_cmd=`readlink -f bootstrap.sh`
bootstrap_cmd=`readlink -f bootstrap.sh`

echo "CXX compiler ${CXX}"
echo "Running ${boostrap_cmd} ${booststap_arg}"
${boostrap_cmd} ${booststap_arg} || { cat bootstrap.log; return 1; }
echo "Running ${bootstrap_cmd} ${bootstrap_arg}"
${bootstrap_cmd} ${bootstrap_arg} || { cat bootstrap.log; return 1; }
b2_args=(define=BOOST_COROUTINES_NO_DEPRECATION_WARNING=1 link=static variant=release
threading=multi --without-test --without-math --without-log --without-locale --without-graph --without-wave --without-mpi --without-python --without-fiber --without-filesystem --without-iostreams --without-serialization --without-chrono --without-timer --without-regex -j4)
context-impl=ucontext
threading=multi --without-test --without-math --without-log --without-locale --without-graph --without-wave
--without-mpi --without-python --without-fiber --without-filesystem --without-iostreams
--without-serialization --without-chrono --without-timer --without-regex --without-graph_parallel
--without-url --without-program_options --without-date_time --without-json -j4)

echo "Building targets with ${b2_args[@]}"
./b2 "${b2_args[@]}" cxxflags='-std=c++14 -Wno-deprecated-declarations'
./b2 "${b2_args[@]}" \
cxxflags='-std=c++14 -Wno-deprecated-declarations -fsanitize=address -DBOOST_USE_ASAN' \
linkflags='-lasan'

./b2 install "${b2_args[@]}" -d0
popd
rm -rf /tmp/boost
}

install_boost
install_boost
2 changes: 1 addition & 1 deletion u22.04-dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ COPY ./get_mold.sh /tmp/
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && apt install -y autoconf-archive bison cmake curl gdb git libssl-dev \
libunwind-dev libfl-dev ninja-build libtool \
gcc-11 g++-11 libboost-fiber-dev libxml2-dev zip ccache libzstd-dev \
gcc-11 g++-11 libboost-context-dev libxml2-dev zip ccache libzstd-dev \
debhelper moreutils pip jq lsof lcov libflatbuffers-dev \
&& rm -rf /var/lib/apt/lists/*

Expand Down
15 changes: 15 additions & 0 deletions u24.04-dev.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM ubuntu:24.04

LABEL org.opencontainers.image.source https://github.com/romange/container-foundry

COPY ./get_mold.sh ./install_boost.sh /tmp/

# To avoid tzdata reconfigure
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && apt install -y autoconf-archive bison cmake curl gdb git libssl-dev \
libunwind-dev libfl-dev ninja-build libtool \
libboost-context-dev libxml2-dev zip ccache \
debhelper moreutils pip jq lsof lcov libflatbuffers-dev wget \
&& rm -rf /var/lib/apt/lists/*

RUN /tmp/get_mold.sh && /tmp/install_boost.sh

0 comments on commit b4ff54c

Please sign in to comment.