Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .github/workflows/build-test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,21 @@ on:
version:
required: true
type: string
image_name:
required: false
default: ${{ github.repository }}
type: string
docker_file:
required: false
default: Dockerfile
type: string

defaults:
run:
shell: bash

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:

Expand All @@ -29,14 +36,15 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
images: ${{ env.REGISTRY }}/${{ inputs.image_name }}


- name: Build Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ${{ inputs.docker_file }}
push: false
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:dev
${{ env.REGISTRY }}/${{ inputs.image_name }}:dev
labels: ${{ steps.meta.outputs.labels }}
9 changes: 9 additions & 0 deletions .github/workflows/create-branch-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ jobs:
with:
version: ${{ needs.set-branch-version.outputs.version }}

build-test-package-228:
needs: ['set-branch-version']
uses: "./.github/workflows/build-test-package.yml"
secrets: inherit
with:
version: ${{ needs.set-branch-version.outputs.version }}
image_name: ${{ github.repository }}-228
docker_file: "linux-228/Dockerfile"

# This job is here to have only one final step to add for "Status Checks"
# in GitHub, instead of adding every leaf test from 'build-test-package'
final-check:
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/create-pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@ jobs:
with:
version: ${{ needs.set-pr-version.outputs.version }}

build-test-package-228:
needs: ['set-pr-version']
uses: "./.github/workflows/build-test-package.yml"
secrets: inherit
with:
version: ${{ needs.set-pr-version.outputs.version }}
image_name: ${{ github.repository }}-228
docker_file: "linux-228/Dockerfile"

# This job is here to have only one final step to add for "Status Checks"
# in GitHub, instead of adding every leaf test from 'build-test-package'
final-check:
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/create-release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,12 @@ jobs:
secrets: inherit
with:
version: ${{ needs.construct-release-tag.outputs.release-tag }}

release-228:
needs: ['construct-release-tag']
uses: "./.github/workflows/release.yml"
secrets: inherit
with:
version: ${{ needs.construct-release-tag.outputs.release-tag }}
image_name: ${{ github.repository }}-228
docker_file: "linux-228/Dockerfile"
16 changes: 12 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,21 @@ on:
version:
required: true
type: string
image_name:
required: false
default: ${{ github.repository }}
type: string
docker_file:
required: false
default: Dockerfile
type: string

defaults:
run:
shell: bash

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:

Expand All @@ -29,7 +36,7 @@ jobs:
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
images: ${{ env.REGISTRY }}/${{ inputs.image_name }}

- name: Login to container registry
uses: docker/login-action@v2
Expand All @@ -41,10 +48,11 @@ jobs:
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
file: ${{ inputs.docker_file }}
push: true
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ inputs.version }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
${{ env.REGISTRY }}/${{ inputs.image_name }}:${{ inputs.version }}
${{ env.REGISTRY }}/${{ inputs.image_name }}:latest
labels: ${{ steps.meta.outputs.labels }}

- name: Create Release
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@ Linux container for building the [Amalgam](https://github.com/howsoai/amalgam) l

## Building

To build the default Amalgam Linux Build Container
```bash
docker build -t amalgam-build-container-linux .
```

To build the Oracle Linux 8.x Container to support GLIBC 2.28
```bash
docker build -f linux-228/Dockerfile -t amalgam-build-container-linux-228 .
```

## License

[License](LICENSE.txt)
Expand Down
47 changes: 47 additions & 0 deletions linux-228/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# The purpose of this dockerfile is to generate a build container
# for Amalgam builds using GLIBC_2_28 so we can support Oracle
# Linx 8.x for an important customer.
FROM oraclelinux:8

# Install necessary tools
RUN dnf update -y \
&& dnf install -y \
sudo gcc gcc-c++ make git wget python3 \
python3-pip python3-setuptools python3-wheel tzdata clang \
glibc glibc-locale-source glibc-langpack-en glibc-langpack-es binutils \
epel-release \
&& dnf install -y \
gcc-toolset-10-gcc gcc-toolset-10-gcc-c++ \
&& dnf clean all

# Set Timezone to be America/New_York aka Eastern Timezone.
RUN mkdir -p /zoneinfo && cp -r /usr/share/zoneinfo/* /zoneinfo
ENV TZ=America/New_York
RUN mkdir -p /etc \
&& sudo ln -snf /usr/share/zoneinfo/America/New_York /etc/localtime \
&& echo $TZ > /etc/timezone

# Set environment for GCC 10
ENV PATH=/opt/rh/gcc-toolset-10/root/usr/bin:$PATH

# Install cmake and ninja-build
RUN dnf install -y dnf-plugins-core \
&& dnf --enablerepo=ol8_codeready_builder install cmake ninja-build \
&& dnf clean all

# Print version info
RUN cmake --version \
&& ninja --version \
&& ldd --version

# Locale setup for Spanish (no locales package, use langpack instead)
ENV LANG=es_ES.UTF-8
RUN localedef -i es_ES -f UTF-8 es_ES.UTF-8

# Default GCC setup
RUN update-alternatives --install /usr/bin/gcc gcc /opt/rh/gcc-toolset-10/root/usr/bin/gcc 100 \
--slave /usr/bin/g++ g++ /opt/rh/gcc-toolset-10/root/usr/bin/g++ \
--slave /usr/bin/gcov gcov /opt/rh/gcc-toolset-10/root/usr/bin/gcov \
&& update-alternatives --set gcc /opt/rh/gcc-toolset-10/root/usr/bin/gcc

RUN gcc --version && ldd --version