From 87ccd62976eb0ab842a716061693298e595c4612 Mon Sep 17 00:00:00 2001 From: Jeremy Felder Date: Wed, 6 Mar 2024 12:31:24 +0200 Subject: [PATCH] Fix go setup in CI (#420) ## Describe the changes This PR adds the use of setup-go in the CI to ensure that `go` is installed properly and caches dependencies and build outputs by default --- .github/workflows/golang.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/golang.yml b/.github/workflows/golang.yml index 1ac84390..acff2b3e 100644 --- a/.github/workflows/golang.yml +++ b/.github/workflows/golang.yml @@ -25,6 +25,10 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + - name: Setup go + uses: actions/setup-go@v5 + with: + go-version: '1.20.0' - name: Check gofmt if: needs.check-changed-files.outputs.golang == 'true' run: if [[ $(go list ./... | xargs go fmt) ]]; then echo "Please run go fmt"; exit 1; fi @@ -39,6 +43,10 @@ jobs: steps: - name: Checkout Repo uses: actions/checkout@v4 + - name: Setup go + uses: actions/setup-go@v5 + with: + go-version: '1.20.0' - name: Build working-directory: ./wrappers/golang if: needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp_cuda == 'true' @@ -58,6 +66,10 @@ jobs: steps: - name: Checkout Repo uses: actions/checkout@v4 + - name: Setup go + uses: actions/setup-go@v5 + with: + go-version: '1.20.0' - name: Download ICICLE lib artifacts uses: actions/download-artifact@v4 if: needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp_cuda == 'true' @@ -85,6 +97,10 @@ jobs: # steps: # - name: Checkout Repo # uses: actions/checkout@v4 + # - name: Setup go + # uses: actions/setup-go@v5 + # with: + # go-version: '1.20.0' # - name: Download and Install Cuda # if: needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp_cuda == 'true' # id: cuda-toolkit