From 0609139382d6442c1b968c18d0e1e0989469e602 Mon Sep 17 00:00:00 2001 From: Alex Bozarth Date: Wed, 20 Nov 2024 17:13:29 -0600 Subject: [PATCH] add curl and httpd workflows also update openssl3 workflow to only use the available 4 cores Signed-off-by: Alex Bozarth --- .github/workflows/curl.yml | 62 ++++++++++++++++++++++++++++++++ .github/workflows/httpd.yml | 64 ++++++++++++++++++++++++++++++++++ .github/workflows/openssl3.yml | 8 ++--- 3 files changed, 130 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/curl.yml create mode 100644 .github/workflows/httpd.yml diff --git a/.github/workflows/curl.yml b/.github/workflows/curl.yml new file mode 100644 index 0000000..31e8ba3 --- /dev/null +++ b/.github/workflows/curl.yml @@ -0,0 +1,62 @@ +name: Build & Test - curl + +on: + push: + branches: [ 'main' ] + paths: ['.github/workflows/curl.yml', 'curl/**'] + pull_request: + branches: [ 'main' ] + paths: ['.github/workflows/curl.yml', 'curl/**'] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + platform: + - linux/amd64 + - linux/arm64 + build: + - name: release + - name: latest + build-args: | + LIBOQS_TAG=main + OQSPROVIDER_TAG=main + 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: curl + platforms: ${{ matrix.platform }} + build-args: | + MAKE_DEFINES=-j4 + ${{ matrix.build.build-args }} + tags: oqs-curl + + - name: Build the Docker image (dev) + uses: docker/build-push-action@v6 + with: + load: true + context: curl + platforms: ${{ matrix.platform }} + build-args: | + MAKE_DEFINES=-j4 + ${{ matrix.build.build-args }} + target: dev + tags: oqs-curl-dev + + - name: Spot-test - One baseline and one hybrid QSC alg + run: | + docker run -e TEST_TIME=5 -e KEM_ALG=kyber768 -e SIG_ALG=dilithium3 oqs-curl perftest.sh diff --git a/.github/workflows/httpd.yml b/.github/workflows/httpd.yml new file mode 100644 index 0000000..12889e7 --- /dev/null +++ b/.github/workflows/httpd.yml @@ -0,0 +1,64 @@ +name: Build & Test - httpd + +on: + push: + branches: [ 'main' ] + paths: ['.github/workflows/httpd.yml', 'httpd/**'] + pull_request: + branches: [ 'main' ] + paths: ['.github/workflows/httpd.yml', 'httpd/**'] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + platform: + - linux/amd64 + - linux/arm64 + build: + - name: release + - name: latest + build-args: | + LIBOQS_TAG=main + OQSPROVIDER_TAG=main + 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 httpd Docker image + uses: docker/build-push-action@v6 + with: + load: true + context: httpd + platforms: ${{ matrix.platform }} + build-args: | + MAKE_DEFINES=-j4 + ${{ matrix.build.build-args }} + tags: oqs-httpd + + - name: Build the curl Docker image + uses: docker/build-push-action@v6 + with: + load: true + context: curl + platforms: ${{ matrix.platform }} + build-args: | + MAKE_DEFINES=-j4 + ${{ matrix.build.build-args }} + tags: oqs-curl + + - name: Spot-test - One baseline and one hybrid QSC alg + run: | + docker network create httpd-test && + docker run --network httpd-test --detach --rm --name oqs-httpd oqs-httpd && + sleep 2 && + docker run --network httpd-test oqs-curl curl -k https://oqs-httpd:4433 --curves kyber768 diff --git a/.github/workflows/openssl3.yml b/.github/workflows/openssl3.yml index 6f12b7a..54a3058 100644 --- a/.github/workflows/openssl3.yml +++ b/.github/workflows/openssl3.yml @@ -41,11 +41,11 @@ jobs: context: openssl3 platforms: ${{ matrix.platform }} build-args: | - MAKE_DEFINES=-j 18 + MAKE_DEFINES=-j4 ${{ matrix.build.build-args }} - tags: oqs-ossl3-img + tags: oqs-ossl3 - name: Spot-test - One baseline and one hybrid QSC alg run: | - docker run --rm --name oqs-ossl3 oqs-ossl3-img sh -c "openssl list -providers; /opt/openssl32/bin/serverstart.sh; sleep 2; echo 'GET /' | openssl s_client -connect localhost --groups kyber768 --CAfile /opt/openssl32/bin/CA.crt" && - docker run --rm --name oqs-ossl3 oqs-ossl3-img sh -c "KEM_ALG=p521_frodo1344aes /opt/openssl32/bin/serverstart.sh; sleep 2; echo 'GET /' | openssl s_client -connect localhost --groups p521_frodo1344aes --CAfile /opt/openssl32/bin/CA.crt" + docker run --rm --name oqs-ossl3 oqs-ossl3 sh -c "openssl list -providers; /opt/openssl32/bin/serverstart.sh; sleep 2; echo 'GET /' | openssl s_client -connect localhost --groups kyber768 --CAfile /opt/openssl32/bin/CA.crt" && + docker run --rm --name oqs-ossl3 oqs-ossl3 sh -c "KEM_ALG=p521_frodo1344aes /opt/openssl32/bin/serverstart.sh; sleep 2; echo 'GET /' | openssl s_client -connect localhost --groups p521_frodo1344aes --CAfile /opt/openssl32/bin/CA.crt"