Skip to content
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

Build Ubuntu CI containers on GitHub Actions #85

Merged
merged 5 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
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:
baentsch marked this conversation as resolved.
Show resolved Hide resolved
branches-ignore: 'main'

jobs:
ubuntu:
strategy:
matrix:
arch:
- arm64
- x86_64
distro:
- focal
- jammy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why Jammy? It's not listed in https://github.com/open-quantum-safe/liboqs/blob/main/PLATFORMS.md
Focal is listed, but shouldn't be (if this lands) -- so remove this once PLATFORMS gets updated?

Copy link
Member Author

@SWilson4 SWilson4 Aug 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My intent was to update PLATFORMS.md to list support for Focal, Jammy, and Noble (i.e., every Ubuntu LTS version still receiving standard security maintenance) on x86_64 and arm64. Do we really want to support only the latest LTS? Focal will be receiving security updates for another year and Jammy for another three.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes some sense -- although I would limit this to the last two LTS' to also minimize our support obligation (if we see it and act on it as such, i.e., to respond/fix issues found on any Tier 1 platform listed).

But is it really necessary & worth while running all platforms at every push/PR? What about running only latest on push/PR and latest-1 only in the weekly regression and release runs?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems reasonable to me.

- 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
baentsch marked this conversation as resolved.
Show resolved Hide resolved
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
baentsch marked this conversation as resolved.
Show resolved Hide resolved
LABEL version="5"
ARG ARCH

RUN DEBIAN_FRONTEND=noninteractive TZ=Europe/Zurich && \
Expand Down