From d7b130082efe6c913ed276ad3e12f710050d9a1e Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sun, 17 Dec 2023 23:55:04 +0100 Subject: [PATCH] fixup! DEBUG with VS Code instead --- .github/workflows/main.yml | 71 -------------------------------------- 1 file changed, 71 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ce9eb8ece353ed..fc537da0dbe451 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,58 +31,6 @@ jobs: concurrency: group: windows-test-${{ matrix.n.nr }}-${{ github.ref }} steps: - - name: start VS Code tunnel - shell: bash - env: - GH_TOKEN: ${{ github.token }} - run: | - # First get the current user's GPG key - gh api users/${{ github.actor }}/gpg_keys --jq '.[0].raw_key' | - gpg --import >/tmp/gpg.import 2>&1 && - GPGKEY="$(sed -n 's/^gpg: key \([^:]*\).*/\1/p' /tmp/gpg.import)" && - test -n "$GPGKEY" && - echo "Using GPG key $GPGKEY" || { - echo "::error::could not get user's GPG key" >&2 - exit 1 - } - - curl -Lo /tmp/vscode-cli.zip 'https://code.visualstudio.com/sha/download?build=stable&os=cli-win32-x64' && - unzip -p /tmp/vscode-cli.zip code.exe >/tmp/vscode-cli.exe && - - name="$(echo "$GITHUB_JOB-$GITHUB_RUN_ID" | - sed -e 's/[^A-Za-z0-9_]/-/g' -e 's/--*/-/g' -e 's/^-*//' -e 's/^\(.\{1,20\}\).*/\1/')" - echo "::notice::Starting a tunnel with name '$name'" >&2 - /tmp/vscode-cli.exe tunnel --accept-server-license-terms --name "$name" >/tmp/vscode-tunnel.out & - - display_message () { - printf '%s\n' \ - "Please decrypt the output of 'code tunnel' by calling these commands" \ - '' \ - 'cat </tmp/vscode.gpg &&' \ - "$(gpg --batch --trust-model always --recipient "$GPGKEY" \ - --pinentry-mode=loopback --encrypt --armor /dev/null 2>&1 - then - echo "::notice::Tunnel is ready to go" - display_message - exit 0 - # Technically, the device code is not a secret. But it will grant - # access _to the tunnel_, i.e. to the machine running the current - # GitHub workflow job, including all the code and the secrets... - elif grep -q "To grant access to the server" /tmp/vscode-tunnel.out >/dev/null 2>&1 - then - echo "::notice::Tunnel needs to be granted access" - display_message - fi - done - name: reuse `windows-artifacts` shell: bash run: | @@ -144,22 +92,3 @@ jobs: with: name: failed-tests-windows path: ${{env.FAILED_TEST_ARTIFACTS}} - - name: wait for VSCode tunnel to be done - # wait for the user to terminate the tunnel, even if the job failed, but not if it was canceled - if: success() || failure() - shell: bash - run: | - while test -f /tmp/vscode-cli.exe - do - case "$(/tmp/vscode-cli.exe tunnel status)" in - *"no tunnel process is currently running"*) exit 0;; - esac - echo '::notice::Waiting for tunnel to be terminated' - echo '(please run `/tmp/vscode-cli.exe tunnel kill` in the integrated terminal)' - sleep 15 - done - - name: unregister VSCode tunnel - # unregister the tunnel, even if the job was canceled - if: always() - shell: bash - run: /tmp/vscode-cli.exe tunnel unregister