Skip to content

Commit

Permalink
Use setup-go action
Browse files Browse the repository at this point in the history
This was my first attempt to fix CI. Go 1.17 is no longer available on
runners (actions/runner-images#7276 maybe)
and I wondered if that might help with that.

Unfortunately I think not. But we should get some go build caching as a
side effect of using this action.
  • Loading branch information
David Robertson committed Apr 6, 2023
1 parent 93b2410 commit ae3d3fc
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2 # Checkout complement
- name: "Set Go Version"
run: |
echo "$GOROOT_1_17_X64/bin" >> $GITHUB_PATH
echo "~/go/bin" >> $GITHUB_PATH
- uses: actions/setup-go@v4
- name: "Install Complement Dependencies"
# We don't need to install Go because it is included on the Ubuntu 20.04 image:
# See https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md specifically GOROOT_1_17_X64
run: |
sudo apt-get update && sudo apt-get install -y libolm3 libolm-dev
- name: "Run internal Complement tests"
Expand Down Expand Up @@ -55,20 +50,12 @@ jobs:
steps:
- uses: actions/checkout@v2 # Checkout complement

# Env vars are set file a file given by $GITHUB_PATH. We need both Go 1.17 and GOPATH on env.
# See https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#adding-a-system-path
- name: "Set Go Version"
run: |
echo "$GOROOT_1_17_X64/bin" >> $GITHUB_PATH
echo "~/go/bin" >> $GITHUB_PATH
- uses: actions/setup-go@v4
# Similar steps as dockerfiles/ComplementCIBuildkite.Dockerfile but on the host. We need
# to do this so we can _be_ the host when running Complement so we can snaffle all the ports. If
# we run Complement _in_ Docker then we can't -p all high numbered ports which then breaks federation
# servers which listen on random high numbered ports.
- name: "Install Complement Dependencies"
# We don't need to install Go because it is included on the Ubuntu 20.04 image:
# See https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md specifically GOROOT_1_17_X64
run: |
sudo apt-get update && sudo apt-get install -y libolm3 libolm-dev
go get -v github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest
Expand Down

0 comments on commit ae3d3fc

Please sign in to comment.