From: Dmitry Misharov Date: Wed, 5 Feb 2025 09:11:55 +0000 (+0100) Subject: add workflow dispatch inputs into coveralls workflow X-Git-Tag: openssl-3.5.0-alpha1~653 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78d252889b7d126b9baf5075db6990658c87f85b;p=thirdparty%2Fopenssl.git add workflow dispatch inputs into coveralls workflow Reviewed-by: Neil Horman Reviewed-by: Tomas Mraz Reviewed-by: Bernd Edlinger Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/26645) --- diff --git a/.github/workflows/coveralls.yml b/.github/workflows/coveralls.yml index 7dbba96764a..cf09459e41a 100644 --- a/.github/workflows/coveralls.yml +++ b/.github/workflows/coveralls.yml @@ -1,4 +1,4 @@ -# Copyright 2021-2024 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2021-2025 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the Apache License 2.0 (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy @@ -7,44 +7,74 @@ name: Coverage -# Run once a day on: schedule: - - cron: '15 02 * * *' + - cron: '15 02 * * *' workflow_dispatch: + inputs: + branch: + description: Branch to measure coverage + required: true + default: master + extra_config: + description: Extra options for configuration script + default: "" permissions: contents: read jobs: + define-matrix: + runs-on: ubuntu-latest + outputs: + branches: ${{ steps.branches.outputs.branches }} + steps: + - name: Define branches + id: branches + run: | + if [ "${{ github.event_name}}" = "workflow_dispatch" ]; then + MATRIX=$(cat << EOF + [{ + "branch": "${{ github.event.inputs.branch }}", + "extra_config": "${{ github.event.inputs.extra_config }}" + }] + EOF + ) + else + MATRIX=$(cat << EOF + [{ + "branch": "openssl-3.4", + "extra_config": "no-afalgeng enable-fips enable-tfo" + }, { + "branch": "openssl-3.3", + "extra_config": "no-afalgeng enable-fips enable-tfo" + }, { + "branch": "openssl-3.2", + "extra_config": "no-afalgeng enable-fips enable-tfo" + }, { + "branch": "openssl-3.1", + "extra_config": "no-afalgeng enable-fips" + }, { + "branch": "openssl-3.0", + "extra_config": "no-afalgeng enable-fips" + }, { + "branch": "master", + "extra_config": "no-afalgeng enable-fips enable-tfo" + }] + EOF + ) + fi + echo "branches<> "$GITHUB_OUTPUT" + coverage: + needs: define-matrix permissions: checks: write # for coverallsapp/github-action to create new checks contents: read # for actions/checkout to fetch code strategy: fail-fast: false matrix: - branches: [ - { - branch: openssl-3.4, - extra_config: no-afalgeng enable-fips enable-tfo - }, { - branch: openssl-3.3, - extra_config: no-afalgeng enable-fips enable-tfo - }, { - branch: openssl-3.2, - extra_config: no-afalgeng enable-fips enable-tfo - }, { - branch: openssl-3.1, - extra_config: no-afalgeng enable-fips - }, { - branch: openssl-3.0, - extra_config: no-afalgeng enable-fips - }, { - branch: master, - extra_config: no-afalgeng enable-fips enable-tfo - } - ] + branches: ${{ fromJSON(needs.define-matrix.outputs.branches) }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4