From b975566a09490e0212496019b89e8c46de43d1ae Mon Sep 17 00:00:00 2001 From: David Robertson Date: Thu, 6 Apr 2023 14:41:09 +0100 Subject: [PATCH] Use setup-go instead of relying on 1.17 to exist See https://github.com/actions/runner-images/issues/7276 --- .ci/scripts/setup_complement_prerequisites.sh | 10 ---------- .github/workflows/latest_deps.yml | 2 ++ .github/workflows/tests.yml | 2 ++ .github/workflows/twisted_trunk.yml | 2 ++ 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.ci/scripts/setup_complement_prerequisites.sh b/.ci/scripts/setup_complement_prerequisites.sh index 3778478da644..47a3ff8e6966 100755 --- a/.ci/scripts/setup_complement_prerequisites.sh +++ b/.ci/scripts/setup_complement_prerequisites.sh @@ -9,16 +9,6 @@ set -eu alias block='{ set +x; } 2>/dev/null; func() { echo "::group::$*"; set -x; }; func' alias endblock='{ set +x; } 2>/dev/null; func() { echo "::endgroup::"; set -x; }; func' -block Set Go Version - # The path is set via a file given by $GITHUB_PATH. We need both Go 1.17 and GOPATH on the path to run Complement. - # See https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#adding-a-system-path - - # Add Go 1.17 to the PATH: see https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md#environment-variables-2 - echo "$GOROOT_1_17_X64/bin" >> $GITHUB_PATH - # Add the Go path to the PATH: We need this so we can call gotestfmt - echo "~/go/bin" >> $GITHUB_PATH -endblock - block Install Complement Dependencies sudo apt-get -qq update && sudo apt-get install -qqy libolm3 libolm-dev go install -v github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest diff --git a/.github/workflows/latest_deps.yml b/.github/workflows/latest_deps.yml index d5a68ffa1f12..c3705b059b20 100644 --- a/.github/workflows/latest_deps.yml +++ b/.github/workflows/latest_deps.yml @@ -184,6 +184,8 @@ jobs: with: path: synapse + - uses: actions/setup-go@v4 + - name: Prepare Complement's Prerequisites run: synapse/.ci/scripts/setup_complement_prerequisites.sh diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a2cec324a549..f895163e517a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -555,6 +555,8 @@ jobs: toolchain: 1.58.1 - uses: Swatinem/rust-cache@v2 + - uses: actions/setup-go@v4 + - name: Prepare Complement's Prerequisites run: synapse/.ci/scripts/setup_complement_prerequisites.sh diff --git a/.github/workflows/twisted_trunk.yml b/.github/workflows/twisted_trunk.yml index 461c85067ca4..ad35c6b57089 100644 --- a/.github/workflows/twisted_trunk.yml +++ b/.github/workflows/twisted_trunk.yml @@ -147,6 +147,8 @@ jobs: with: path: synapse + - uses: actions/setup-go@v4 + - name: Prepare Complement's Prerequisites run: synapse/.ci/scripts/setup_complement_prerequisites.sh