From dae14ab42c36d8912ba9e5b8f223c31551afb812 Mon Sep 17 00:00:00 2001 From: Spencer Wilson Date: Wed, 31 Jan 2024 14:17:16 -0500 Subject: [PATCH] Trigger downstream action in oqs-provider --- .github/workflows/release-test.yml | 50 +++++++++++++----------------- 1 file changed, 21 insertions(+), 29 deletions(-) diff --git a/.github/workflows/release-test.yml b/.github/workflows/release-test.yml index 55f382ab7a..f159a9e274 100644 --- a/.github/workflows/release-test.yml +++ b/.github/workflows/release-test.yml @@ -1,36 +1,28 @@ name: Release tests -on: pull_request +on: + release: + types: [published] jobs: - oqs-provider-release-test: # TODO: this is highly coupled to oqs-provider structure. Might be better downstream? - if: startsWith(github.head_ref, 'sw-provider-') # TODO: settle on standard prefix - container: - image: openquantumsafe/ci-ubuntu-jammy:latest + # trigger oqs-provider release tests on a tracker branch + oqs-provider-release-test: runs-on: ubuntu-latest steps: - - name: Checkout oqs-provider - uses: actions/checkout@v4 - with: - repository: open-quantum-safe/oqs-provider - - name: Checkout liboqs - uses: actions/checkout@v4 - with: - path: liboqs - - name: Activate all algorithms - env: - LIBOQS_SRC_DIR: liboqs + - name: Trigger oqs-provider release tests run: | - sed -i "s/enable\: false/enable\: true/g" oqs-template/generate.yml && \ - python3 oqs-template/generate.py - - name: Full build of oqs-provider - env: - OPENSSL_BRANCH: master # TODO: verify that this is the correct branch - run: scripts/fullbuild.sh - - name: Run basic tests for oqs-provider - run: scripts/runtests.sh - - name: Test all TLS KEM/signature algorithm combinations - env: - OPENSSL_MODULES: _build/lib - OPENSSL_CONF: scripts/openssl-ca.cnf - run: python3 -m pytest --numprocesses=auto scripts/test_tls_full.py + curl --silent \ + --write-out "\n%{response_code}\n" \ + --request POST \ + --header "Accept: application/vnd.github+json" \ + --header "Authorization: Bearer ${{ secrets.OQSBOT_GITHUB_ACTIONS }}" \ + --header "X-GitHub-Api-Version: 2022-11-28" \ + --data '{ \ + "event_type": "liboqs-release", \ + "client_payload": { \ + "liboqs_ref": "tags/${{ github.event.release.tag_name }}", \ + "provider_ref": "heads/${{ github.event.release.tag_name }}-tracker" \ + } \ + }' \ + https://api.github.com/repos/open-quantum-safe/oqs-provider/dispatches | tee curl_out \ + && grep -q "204" curl_out