Move CI to GitHub Actions #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build & Test - 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 | |
env: | |
build-args: | | |
LIBOQS_TAG=main | |
OQSPROVIDER_TAG=main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
- linux/amd64 | |
- linux/arm64 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: docker/setup-qemu-action@v3 | |
- uses: docker/setup-buildx-action@v3 | |
- 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 | |
platforms: ${{ matrix.platform }} | |
build-args: | | |
${{ (github.event.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 | |
platforms: ${{ matrix.platform }} | |
build-args: | | |
MAKE_DEFINES=-j4 | |
${{ (github.event.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" |