From 729d82770eb7d38d110ca34751f9842176ca5b52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20L=C3=B6nnhager?= Date: Mon, 27 Nov 2023 12:52:02 +0100 Subject: [PATCH] TEMP --- .github/workflows/desktop-e2e.yml | 69 +++++++++++++++++++++++++++++-- 1 file changed, 66 insertions(+), 3 deletions(-) diff --git a/.github/workflows/desktop-e2e.yml b/.github/workflows/desktop-e2e.yml index cd10128bc8e3..d2d0a92d73a8 100644 --- a/.github/workflows/desktop-e2e.yml +++ b/.github/workflows/desktop-e2e.yml @@ -3,9 +3,69 @@ on: schedule: - cron: '0 0 * * *' workflow_dispatch: + push: + inputs: + macos12: + type: boolean + default: true + macos13: + type: boolean + default: true + macos14: + type: boolean + default: true + debian11: + type: boolean + default: true + debian12: + type: boolean + default: true + ubuntu2004: + type: boolean + default: true + ubuntu2204: + type: boolean + default: true + fedora38: + type: boolean + default: true + fedora37: + type: boolean + default: true + fedora36: + type: boolean + default: true + windows10: + type: boolean + default: true + windows11: + type: boolean + default: true jobs: + prepare-matrices: + name: Prepare Linux matrix + runs-on: ubuntu-latest + steps: + - shell: bash + run: | + linux_matrix=() + [[ true == ${{ github.event.inputs.debian11 }} ]] && linux_matrix+=("debian11") + [[ true == ${{ github.event.inputs.debian12 }} ]] && linux_matrix+=("debian12") + [[ true == ${{ github.event.inputs.ubuntu2004 }} ]] && linux_matrix+=("ubuntu2004") + [[ true == ${{ github.event.inputs.ubuntu2204 }} ]] && linux_matrix+=("ubuntu2204") + [[ true == ${{ github.event.inputs.ubuntu2304 }} ]] && linux_matrix+=("ubuntu2304") + [[ true == ${{ github.event.inputs.fedora38 }} ]] && linux_matrix+=("fedora38") + [[ true == ${{ github.event.inputs.fedora37 }} ]] && linux_matrix+=("fedora37") + [[ true == ${{ github.event.inputs.fedora36 }} ]] && linux_matrix+=("fedora36") + jq -c -n '$ARGS.positional' --args "${linux_matrix[@]}" >> $GITHUB_ENV + outputs: + linux_matrix: ${{ env.linux_matrix }} + prepare-linux: - if: ${{ !startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main' }} + needs: prepare-matrices + if: | + fromJson(needs.prepare-matrices.outputs.linux_matrix) != '[]' && + !startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main' runs-on: ubuntu-latest steps: - name: Checkout repository @@ -54,14 +114,14 @@ jobs: e2e-test-linux: name: Linux end-to-end tests - needs: build-linux + needs: [prepare-matrices, build-linux] if: '!cancelled()' runs-on: [self-hosted, desktop-test, Linux] # app-test-linux timeout-minutes: 240 strategy: fail-fast: false matrix: - os: [debian11, debian12, ubuntu2004, ubuntu2204, ubuntu2304, fedora38, fedora37, fedora36] + os: ${{ fromJson(needs.prepare-matrices.outputs.linux_matrix) }} steps: - uses: actions/download-artifact@v3 if: ${{ needs.build-linux.result == 'success' }} @@ -82,6 +142,7 @@ jobs: path: ./test/.ci-logs/${{ matrix.os }}_report build-windows: + # TODO: only run tasks if windows matrix isn't empty if: ${{ !startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main' }} runs-on: windows-latest steps: @@ -151,6 +212,7 @@ jobs: path: ./test/.ci-logs/${{ matrix.os }}_report build-macos: + # TODO: only run tasks if macos if: ${{ !startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main' }} runs-on: [self-hosted, desktop-test, macOS] # app-test-macos-arm steps: @@ -193,6 +255,7 @@ jobs: strategy: fail-fast: false matrix: + # TODO: filter inputs os: [macos-14, macos-13, macos-12] steps: - uses: actions/download-artifact@v3