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

Move CI to GitHub Actions #321

Merged
merged 35 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
0d55b45
create build and test workflow for openssl3
ajbozarth Nov 20, 2024
0609139
add curl and httpd workflows
ajbozarth Nov 20, 2024
536b568
fix test step names
ajbozarth Nov 21, 2024
e22e0eb
make building against latest liboqs optional
ajbozarth Nov 21, 2024
489007f
Merge branch 'main' into ci
ajbozarth Nov 25, 2024
55e675d
Add nginx workflow and generic curl tests
ajbozarth Nov 25, 2024
4e50cce
Add openssh workflow
ajbozarth Nov 25, 2024
7c37f3c
Create a callable workflow to trigger all builds
ajbozarth Nov 25, 2024
c3429a9
add h2load workflow
ajbozarth Nov 25, 2024
5f41da1
add haproxy workflow
ajbozarth Nov 25, 2024
b1d5079
locust workflow
ajbozarth Nov 25, 2024
1d3f07d
wireshark workflow
ajbozarth Nov 25, 2024
cbe67c9
mosquitto
ajbozarth Nov 25, 2024
0dc2cf1
ngtcp2
ajbozarth Nov 25, 2024
4c6e7ed
openvpn
ajbozarth Nov 25, 2024
d4c1957
prep for adding push steps
ajbozarth Nov 25, 2024
80dd76d
Fix run all
ajbozarth Nov 25, 2024
235541e
fix warnings
ajbozarth Nov 26, 2024
f3dd085
add push to openssl3
ajbozarth Nov 26, 2024
afe727a
dont push on pr
ajbozarth Nov 26, 2024
3d1414b
fix if statements
ajbozarth Nov 26, 2024
de0857a
Update QUIC to work on PRs
ajbozarth Nov 26, 2024
6b07b25
turn off old ci
ajbozarth Nov 26, 2024
ac39c53
Merge branch 'main' into ci
ajbozarth Nov 26, 2024
a33da46
Update locust workflow with tests
ajbozarth Nov 26, 2024
06c7662
fix CI failure
ajbozarth Nov 27, 2024
2e90ae1
remove old CI
ajbozarth Dec 5, 2024
822e30f
Add push to rest of the workflows
ajbozarth Dec 5, 2024
cfa3cfc
Switch from qemu to runners
ajbozarth Dec 9, 2024
ecc80eb
Update all workflows to use runner
ajbozarth Dec 9, 2024
1e3ed32
Merge branch 'main' into ci
ajbozarth Dec 10, 2024
f12ff66
dont push when using liboqs and oqsprovider main
ajbozarth Dec 10, 2024
70b115f
Add docs
ajbozarth Dec 10, 2024
666ab72
Add weekly cron job with build_main true
ajbozarth Dec 10, 2024
0f05a5f
Update name for better badge readability
ajbozarth Dec 10, 2024
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
680 changes: 0 additions & 680 deletions .circleci/config.yml

This file was deleted.

98 changes: 98 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Run all

on:
workflow_call:
inputs:
build_main:
description: "Build using liboqs and oqsprovider main branches"
required: false
default: false
type: boolean
release_tag:
description: "Which docker tag to push to"
required: false
type: string
workflow_dispatch:
inputs:
build_main:
description: "Build using liboqs and oqsprovider main branches"
required: false
default: false
type: boolean
release_tag:
description: "Which docker tag to push to"
required: false
type: string

jobs:
curl:
uses: ./.github/workflows/curl.yml
with:
build_main: ${{ inputs.build_main == 'true' }}
release_tag: ${{ inputs.release_tag }}

h2load:
uses: ./.github/workflows/h2load.yml
with:
build_main: ${{ inputs.build_main == 'true' }}
release_tag: ${{ inputs.release_tag }}

haproxy:
uses: ./.github/workflows/haproxy.yml
with:
build_main: ${{ inputs.build_main == 'true' }}
release_tag: ${{ inputs.release_tag }}

httpd:
uses: ./.github/workflows/httpd.yml
with:
build_main: ${{ inputs.build_main == 'true' }}
release_tag: ${{ inputs.release_tag }}

locust:
uses: ./.github/workflows/locust.yml
with:
build_main: ${{ inputs.build_main == 'true' }}
release_tag: ${{ inputs.release_tag }}

mosquitto:
uses: ./.github/workflows/mosquitto.yml
with:
build_main: ${{ inputs.build_main == 'true' }}
release_tag: ${{ inputs.release_tag }}

nginx:
uses: ./.github/workflows/nginx.yml
with:
build_main: ${{ inputs.build_main == 'true' }}
release_tag: ${{ inputs.release_tag }}

ngtcp2:
uses: ./.github/workflows/ngtcp2.yml
with:
build_main: ${{ inputs.build_main == 'true' }}
release_tag: ${{ inputs.release_tag }}

openssh:
uses: ./.github/workflows/openssh.yml
with:
build_main: ${{ inputs.build_main == 'true' }}
release_tag: ${{ inputs.release_tag }}

openssl3:
uses: ./.github/workflows/openssl3.yml
with:
build_main: ${{ inputs.build_main == 'true' }}
release_tag: ${{ inputs.release_tag }}

openvpn:
uses: ./.github/workflows/openvpn.yml
with:
build_main: ${{ inputs.build_main == 'true' }}
release_tag: ${{ inputs.release_tag }}

wireshark:
uses: ./.github/workflows/wireshark.yml
with:
build_main: ${{ inputs.build_main == 'true' }}
release_tag: ${{ inputs.release_tag }}
157 changes: 157 additions & 0 deletions .github/workflows/curl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
name: curl

on:
push:
branches: [ 'main' ]
paths: ['.github/workflows/curl.yml', 'curl/**']
pull_request:
branches: [ 'main' ]
paths: ['.github/workflows/curl.yml', 'curl/**']
workflow_call:
inputs:
build_main:
description: "Build using liboqs and oqsprovider main branches"
required: false
default: false
type: boolean
release_tag:
description: "Which docker tag to push to"
required: false
type: string
workflow_dispatch:
inputs:
build_main:
description: "Build using liboqs and oqsprovider main branches"
required: false
default: false
type: boolean
release_tag:
description: "Which docker tag to push to"
required: false
type: string

env:
build-args: |
LIBOQS_TAG=main
OQSPROVIDER_TAG=main
push: ${{ github.repository == 'open-quantum-safe/oqs-demos' && github.ref == 'refs/heads/main' && github.event_name != 'pull_request' && inputs.build_main != 'true' }}

jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- arch: x86_64
runner: ubuntu-latest
- arch: arm64
runner: oqs-arm64
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
if: env.push == 'true'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build the Docker image
uses: docker/build-push-action@v6
with:
load: true
context: curl
build-args: |
MAKE_DEFINES=-j4
${{ (inputs.build_main == 'true') && env.build-args || null }}
tags: oqs-curl

- name: Build the Docker image (dev)
uses: docker/build-push-action@v6
with:
load: true
context: curl
build-args: |
MAKE_DEFINES=-j4
${{ (inputs.build_main == 'true') && env.build-args || null }}
target: dev
tags: oqs-curl-dev

- name: Build the Docker image (with generic liboqs)
uses: docker/build-push-action@v6
with:
load: true
context: curl
build-args: |
MAKE_DEFINES=-j4
LIBOQS_BUILD_DEFINES="-DOQS_OPT_TARGET=generic"
${{ (inputs.build_main == 'true') && env.build-args || null }}
tags: oqs-curl-generic

- name: Test curl and curl generic
run: |
docker run -e TEST_TIME=5 -e KEM_ALG=kyber768 -e SIG_ALG=dilithium3 oqs-curl perftest.sh &&
docker run -e TEST_TIME=5 -e KEM_ALG=kyber768 -e SIG_ALG=dilithium3 oqs-curl-generic perftest.sh

- name: Push Docker image to registries
if: env.push == 'true'
uses: docker/build-push-action@v6
with:
push: true
context: curl
build-args: |
MAKE_DEFINES=-j4
${{ (inputs.build_main == 'true') && env.build-args || null }}
tags: |
ghcr.io/${{ github.repository_owner }}/curl:optimized-${{ matrix.arch }}
openquantumsafe/curl:optimized-${{ matrix.arch }}

- name: Push Docker image to registries (dev)
if: env.push == 'true'
uses: docker/build-push-action@v6
with:
push: true
context: curl
build-args: |
MAKE_DEFINES=-j4
${{ (inputs.build_main == 'true') && env.build-args || null }}
target: dev
tags: |
ghcr.io/${{ github.repository_owner }}/curl-dev:latest-${{ matrix.arch }}
openquantumsafe/curl-dev:latest-${{ matrix.arch }}

- name: Push Docker image to registries (with generic liboqs)
if: env.push == 'true'
uses: docker/build-push-action@v6
with:
push: true
context: curl
build-args: |
MAKE_DEFINES=-j4
LIBOQS_BUILD_DEFINES="-DOQS_OPT_TARGET=generic"
${{ (inputs.build_main == 'true') && env.build-args || null }}
tags: |
ghcr.io/${{ github.repository_owner }}/curl:${{ inputs.release_tag || 'latest' }}-${{ matrix.arch }}
openquantumsafe/curl:${{ inputs.release_tag || 'latest' }}-${{ matrix.arch }}

push:
if: ${{ github.repository == 'open-quantum-safe/oqs-demos' && github.ref == 'refs/heads/main' && github.event_name != 'pull_request' && inputs.build_main != 'true' }}
needs: build
runs-on: ubuntu-latest
steps:
- uses: ./.github/workflows/manifest
with:
image_name: curl
release_tag: optimized
- uses: ./.github/workflows/manifest
with:
image_name: curl-dev
release_tag: latest
- uses: ./.github/workflows/manifest
with:
image_name: curl
release_tag: ${{ inputs.release_tag || 'latest' }}
108 changes: 108 additions & 0 deletions .github/workflows/h2load.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: h2load

on:
push:
branches: [ 'main' ]
paths: ['.github/workflows/h2load.yml', 'h2load/**']
pull_request:
branches: [ 'main' ]
paths: ['.github/workflows/h2load.yml', 'h2load/**']
workflow_call:
inputs:
build_main:
description: "Build using liboqs and oqsprovider main branches"
required: false
default: false
type: boolean
release_tag:
description: "Which docker tag to push to"
required: false
type: string
workflow_dispatch:
inputs:
build_main:
description: "Build using liboqs and oqsprovider main branches"
required: false
default: false
type: boolean
release_tag:
description: "Which docker tag to push to"
required: false
type: string

env:
build-args: |
LIBOQS_TAG=main
OQSPROVIDER_TAG=main
push: ${{ github.repository == 'open-quantum-safe/oqs-demos' && github.ref == 'refs/heads/main' && github.event_name != 'pull_request' && inputs.build_main != 'true' }}

jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- arch: x86_64
runner: ubuntu-latest
- arch: arm64
runner: oqs-arm64
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
if: env.push == 'true'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build the Docker image
uses: docker/build-push-action@v6
with:
load: true
context: h2load
build-args: |
${{ (inputs.build_main == 'true') && env.build-args || null }}
tags: oqs-h2load

- name: Build the nginx Docker image
uses: docker/build-push-action@v6
with:
load: true
context: nginx
build-args: |
MAKE_DEFINES=-j4
${{ (inputs.build_main == 'true') && env.build-args || null }}
tags: oqs-nginx

- name: Test h2load using nginx
run: |
docker network create h2load-test &&
docker run --network h2load-test --detach --rm --name oqs-nginx oqs-nginx &&
docker run --network h2load-test oqs-h2load sh -c "h2load -n 100 -c 10 https://oqs-nginx:4433 --groups kyber512"

- name: Push Docker image to registries
if: env.push == 'true'
uses: docker/build-push-action@v6
with:
push: true
context: h2load
build-args: |
${{ (inputs.build_main == 'true') && env.build-args || null }}
tags: |
ghcr.io/${{ github.repository_owner }}/h2load:${{ inputs.release_tag || 'latest' }}-${{ matrix.arch }}
openquantumsafe/h2load:${{ inputs.release_tag || 'latest' }}-${{ matrix.arch }}

push:
if: ${{ github.repository == 'open-quantum-safe/oqs-demos' && github.ref == 'refs/heads/main' && github.event_name != 'pull_request' && inputs.build_main != 'true' }}
needs: build
runs-on: ubuntu-latest
steps:
- uses: ./.github/workflows/manifest
with:
image_name: h2load
release_tag: ${{ inputs.release_tag || 'latest' }}
Loading
Loading