Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 1 addition & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,13 @@ jobs:
os:
- ubuntu-22.04
- ubuntu-20.04
- windows-2022
- macos-11
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- uses: WillAbides/setup-go-faster@imp
- uses: WillAbides/setup-go-faster@main
with:
go-version: 1.21
- run: script/lint
Expand All @@ -34,31 +32,3 @@ jobs:
echo "::error ::wrong output expected 'hi' but got '$got'"
exit 1
fi
# test-tip:
# name: test-tip
# strategy:
# fail-fast: false
# matrix:
# os:
# - ubuntu-22.04
# - ubuntu-20.04
# - windows-2022
# - macos-11
# runs-on: ${{ matrix.os }}
# defaults:
# run:
# shell: bash
# steps:
# - uses: actions/checkout@v3
# - uses: WillAbides/setup-go-faster@v1
# with:
# go-version: tip
# - run: go version
# - name: sayhi
# run: |
# set -ex
# got="$(script/sayhi)"
# if [ "$got" != "hi" ]; then
# echo "::error ::wrong output expected 'hi' but got '$got'"
# exit 1
# fi
81 changes: 32 additions & 49 deletions .github/workflows/multitest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,56 +2,39 @@ name: multi-test
on:
push:
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
multi-test:
name: multi-test
strategy:
fail-fast: false
matrix:
action:
- setup-go-faster
- setup-go
os:
- ubuntu-22.04
- windows-2022
go-version-spec:
- '1.21.x'
- '1.20.x'
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
toolchain-test:
runs-on: windows-latest
steps:
- if: matrix.action == 'setup-go-faster'
id: setup_go_faster
uses: WillAbides/setup-go-faster@v1
with:
go-version: ${{ matrix.go-version-spec }}
- if: matrix.action == 'setup-go-faster'
name: outputs
- uses: actions/checkout@v3
- name: run
run: |
echo '*********** go version ***********'
go version
echo '*********** outputs ***********'
echo '${{ toJson( steps.setup_go_faster.outputs ) }}' | jq .
echo '*********** env ************'
env
echo '*********** go env ***********'
go env
- if: matrix.action == 'setup-go'
id: setup_go
uses: actions/setup-go@v4
GOROOT="$(env | grep "GOROOT_1_" | sort | tail -1 | cut -d= -f2)"
export GOROOT
"$GOROOT"/bin/go version
GOTOOLCHAIN=go1.21rc4 "$GOROOT"/bin/go version
action-test:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: WillAbides/setup-go-faster@main
with:
go-version: ${{ matrix.go-version-spec }}
cache: false
- if: matrix.action == 'setup-go'
name: outputs
run: |
echo '*********** go version ***********'
go version
echo '*********** outputs ***********'
echo '${{ toJson( steps.setup_go.outputs ) }}' | jq .
echo '*********** env ************'
env
echo '*********** go env ***********'
go env
go-version: 1.21rc4
- run: go version


# - run: ls -haltr "$RUNNER_TOOL_CACHE/go"
# - run: which -a go
# - run: /usr/bin/go version
# - run: ls -al /usr/bin/go
# - run: go version
# - uses: actions/checkout@v3
# - uses: WillAbides/setup-go-faster@v1.12.0
# with:
# go-version-file: go.mod
# - run: go version
# - run:
# go version
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
module github.com/willabides/test-setup-go-faster

go 1.15
go 1.20

toolchain go1.21rc3
12 changes: 12 additions & 0 deletions script/deleteme
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh

set -e

CDPATH="" cd -- "$(dirname -- "$0")/.."


export GOROOT_1_20_X64=/opt/hostedtoolcache/go/1.20.8/x64
export GOROOT_1_21_X64=/opt/hostedtoolcache/go/1.21.1/x64
export GOROOT_1_19_X64=/opt/hostedtoolcache/go/1.19.13/x64

env | grep "GOROOT_1_" | sort | tail -1 | cut -d= -f2