Skip to content

Commit

Permalink
Merge pull request #85 from open-quantum-safe/sw-update-ubuntu
Browse files Browse the repository at this point in the history
Build Ubuntu CI containers on GitHub Actions
  • Loading branch information
SWilson4 authored Aug 28, 2024
2 parents 66cde1a + cab34a7 commit dd6a00a
Show file tree
Hide file tree
Showing 5 changed files with 107 additions and 176 deletions.
170 changes: 0 additions & 170 deletions .circleci/config.yml

This file was deleted.

34 changes: 34 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build Docker images

on:
pull_request:
push:
branches-ignore: 'main'

jobs:
ubuntu:
strategy:
matrix:
arch:
- arm64
- x86_64
distro:
- focal
- jammy
- latest
include:
- arch: arm64
runner: oqs-arm64
- arch: x86_64
runner: ubuntu-latest
runs-on: ${{ matrix.runner }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build image
uses: docker/build-push-action@v6
with:
push: false
build-args: ARCH=${{ matrix.arch }}
tags: openquantumsafe/ci-ubuntu-${{ matrix.distro }}:latest-${{ matrix.arch }}
context: ubuntu-${{ matrix.distro }}
62 changes: 62 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Build and push Docker images

on:
push:
branches: 'main'

jobs:
ubuntu-arm64:
strategy:
matrix:
distro:
- focal
- jammy
- latest
runs-on: oqs-arm64
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push arm64 tag
uses: docker/build-push-action@v6
with:
push: true
build-args: ARCH=arm64
tags: openquantumsafe/ci-ubuntu-${{ matrix.distro }}:latest-arm64
context: ubuntu-${{ matrix.distro }}

ubuntu-x86_64:
needs: ubuntu-arm64
strategy:
matrix:
distro:
- focal
- jammy
- latest
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Login to Docker Hub
if: github.ref_name == 'main'
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push x86_64 tag
uses: docker/build-push-action@v6
with:
push: true
build-args: ARCH=x86_64
tags: openquantumsafe/ci-ubuntu-${{ matrix.distro }}:latest-x86_64
context: ubuntu-${{ matrix.distro }}
- name: Create multiarch image
run: |
docker manifest create openquantumsafe/ci-ubuntu-${{ matrix.distro }}:latest \
--amend openquantumsafe/ci-ubuntu-${{ matrix.distro }}:latest-x86_64 \
--amend openquantumsafe/ci-ubuntu-${{ matrix.distro }}:latest-arm64 \
&& docker manifest push openquantumsafe/ci-ubuntu-${{ matrix.distro }}:latest
4 changes: 2 additions & 2 deletions ubuntu-focal/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG ARCH
FROM multiarch/ubuntu-core:${ARCH}-focal
LABEL version="4"
FROM ubuntu:focal
LABEL version="5"
ARG ARCH

RUN DEBIAN_FRONTEND=noninteractive TZ=Europe/Zurich && \
Expand Down
13 changes: 9 additions & 4 deletions ubuntu-latest/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
FROM ubuntu:latest
LABEL version="1"
ARG ARCH
LABEL version="2"

RUN DEBIAN_FRONTEND=noninteractive TZ=Europe/Zurich && \
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
Expand All @@ -25,8 +24,11 @@ RUN DEBIAN_FRONTEND=noninteractive TZ=Europe/Zurich && \
libunwind-dev \
make \
ninja-build \
npm \
opam \
pkg-config \
python3 \
python3-git \
python3-nose \
python3-rednose \
python3-pytest \
Expand All @@ -48,8 +50,11 @@ RUN DEBIAN_FRONTEND=noninteractive TZ=Europe/Zurich && \
doxygen \
yamllint

# Why activate such old Java version? Disabling for now
#ENV JAVA_HOME="/usr/lib/jvm/java-1.11.0-openjdk-${ARCH}"
# set up jasmin compiler for libjade
RUN opam init --yes --auto-setup && opam install --confirm-level=unsafe-yes --destdir=/usr/local jasmin.2023.06.3

# install ajv for CBOM validation
RUN npm -g install ajv ajv-cli

# Activate if we want to test specific OpenSSL3 versions:
# RUN cd /root && git clone --depth 1 --branch openssl-3.0.7 https://github.com/openssl/openssl.git && cd openssl && LDFLAGS="-Wl,-rpath -Wl,/usr/local/openssl3/lib64" ./config --prefix=/usr/local/openssl3 && make -j && make install

0 comments on commit dd6a00a

Please sign in to comment.