Skip to content

Add PPC Ubuntu Docker image and use it on CI #444

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 29, 2025
Merged
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
46 changes: 46 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
on:
push:
branches:
- master
paths:
- 'docker/**'
pull_request_target:
paths:
- 'docker/**'

permissions:
contents: read
packages: write

jobs:
build-and-push:
name: Build & Push Docker Image
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: linux/amd64,linux/arm64

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Build and push multi-arch image
uses: docker/build-push-action@v4
with:
context: .
file: ./docker/ubuntu.Dockerfile
platforms: linux/amd64,linux/arm64
push: true # ${{ github.ref == 'refs/heads/master' }}
tags: ghcr.io/learning-process/ppc-ubuntu:latest
28 changes: 28 additions & 0 deletions docker/ubuntu.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM ubuntu:24.04

ENV DEBIAN_FRONTEND=noninteractive

RUN set -e \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
ca-certificates curl wget gnupg lsb-release software-properties-common \
python3 python3-pip \
ninja-build cmake make \
ccache \
valgrind \
libmpich-dev mpich \
openmpi-bin openmpi-common libopenmpi-dev \
libomp-dev \
gcc-14 g++-14 \
gcovr \
&& wget -q https://apt.llvm.org/llvm.sh \
&& chmod +x llvm.sh \
&& ./llvm.sh 20 all \
&& rm llvm.sh \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

ENV CC=gcc-14 CXX=g++-14

CMD ["bash"]