GitHub: make setup-go action more versatile
With this commit we allow the Go version that is set up to be configurable and not dependent on a specific environment variable. This will allow us to eventually extract the action into a tooling repository.
This commit is contained in:
2 files changed
+40
-26
No files matched your search
@@ -1,14 +1,18 @@
|
|||||||
# A resuable workflow that's used to setup the go enviroment and cache.
|
name: "Setup Golang environment"
|
||||||
name: Setup go enviroment
|
description: "A reusable workflow that's used to set up the Go environment and cache."
|
||||||
|
inputs:
|
||||||
|
go-version:
|
||||||
|
description: "The version of Golang to set up"
|
||||||
|
required: true
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: setup go ${{ env.GO_VERSION }}
|
- name: setup go ${{ inputs.go-version }}
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: '${{ env.GO_VERSION }}'
|
go-version: '${{ inputs.go-version }}'
|
||||||
|
|
||||||
- name: go cache
|
- name: go cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
@@ -23,9 +27,9 @@ runs:
|
|||||||
~/.cache/go-build
|
~/.cache/go-build
|
||||||
~/Library/Caches/go-build
|
~/Library/Caches/go-build
|
||||||
~\AppData\Local\go-build
|
~\AppData\Local\go-build
|
||||||
key: ${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ hashFiles('**/go.sum') }}
|
key: ${{ runner.os }}-go-${{ inputs.go-version }}-${{ hashFiles('**/go.sum') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-go-${{ env.GO_VERSION }}-
|
${{ runner.os }}-go-${{ inputs.go-version }}-
|
||||||
|
|
||||||
- name: set GOPATH
|
- name: set GOPATH
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
+30
-20
@@ -39,9 +39,10 @@ jobs:
|
|||||||
- name: git checkout
|
- name: git checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- id: setup
|
- name: setup go ${{ env.GO_VERSION }}
|
||||||
name: Setup go env
|
|
||||||
uses: ./.github/actions/setup-go
|
uses: ./.github/actions/setup-go
|
||||||
|
with:
|
||||||
|
go-version: '${{ env.GO_VERSION }}'
|
||||||
|
|
||||||
- name: run check
|
- name: run check
|
||||||
run: make rpc-check
|
run: make rpc-check
|
||||||
@@ -68,9 +69,10 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- id: setup
|
- name: setup go ${{ env.GO_VERSION }}
|
||||||
name: Setup go env
|
|
||||||
uses: ./.github/actions/setup-go
|
uses: ./.github/actions/setup-go
|
||||||
|
with:
|
||||||
|
go-version: '${{ env.GO_VERSION }}'
|
||||||
|
|
||||||
- name: fetch and rebase on ${{ github.base_ref }}
|
- name: fetch and rebase on ${{ github.base_ref }}
|
||||||
run: |
|
run: |
|
||||||
@@ -95,9 +97,10 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- id: setup
|
- name: setup go ${{ env.GO_VERSION }}
|
||||||
name: Setup go env
|
|
||||||
uses: ./.github/actions/setup-go
|
uses: ./.github/actions/setup-go
|
||||||
|
with:
|
||||||
|
go-version: '${{ env.GO_VERSION }}'
|
||||||
|
|
||||||
- name: check code format
|
- name: check code format
|
||||||
run: make fmt-check
|
run: make fmt-check
|
||||||
@@ -115,9 +118,10 @@ jobs:
|
|||||||
- name: git checkout
|
- name: git checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- id: setup
|
- name: setup go ${{ env.GO_VERSION }}
|
||||||
name: Setup go env
|
|
||||||
uses: ./.github/actions/setup-go
|
uses: ./.github/actions/setup-go
|
||||||
|
with:
|
||||||
|
go-version: '${{ env.GO_VERSION }}'
|
||||||
|
|
||||||
- name: build release for all architectures
|
- name: build release for all architectures
|
||||||
run: make release
|
run: make release
|
||||||
@@ -132,9 +136,10 @@ jobs:
|
|||||||
- name: git checkout
|
- name: git checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- id: setup
|
- name: setup go ${{ env.GO_VERSION }}
|
||||||
name: Setup go env
|
|
||||||
uses: ./.github/actions/setup-go
|
uses: ./.github/actions/setup-go
|
||||||
|
with:
|
||||||
|
go-version: '${{ env.GO_VERSION }}'
|
||||||
|
|
||||||
- name: check all command line flags exist in sample-lnd.conf file
|
- name: check all command line flags exist in sample-lnd.conf file
|
||||||
run: make sample-conf-check
|
run: make sample-conf-check
|
||||||
@@ -158,9 +163,10 @@ jobs:
|
|||||||
- name: git checkout
|
- name: git checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- id: setup
|
- name: setup go ${{ env.GO_VERSION }}
|
||||||
name: Setup go env
|
|
||||||
uses: ./.github/actions/setup-go
|
uses: ./.github/actions/setup-go
|
||||||
|
with:
|
||||||
|
go-version: '${{ env.GO_VERSION }}'
|
||||||
|
|
||||||
- name: install bitcoind
|
- name: install bitcoind
|
||||||
run: ./scripts/install_bitcoind.sh
|
run: ./scripts/install_bitcoind.sh
|
||||||
@@ -204,9 +210,10 @@ jobs:
|
|||||||
- name: git checkout
|
- name: git checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- id: setup
|
- name: setup go ${{ env.GO_VERSION }}
|
||||||
name: Setup go env
|
|
||||||
uses: ./.github/actions/setup-go
|
uses: ./.github/actions/setup-go
|
||||||
|
with:
|
||||||
|
go-version: '${{ env.GO_VERSION }}'
|
||||||
|
|
||||||
- name: install bitcoind
|
- name: install bitcoind
|
||||||
run: ./scripts/install_bitcoind.sh
|
run: ./scripts/install_bitcoind.sh
|
||||||
@@ -237,9 +244,10 @@ jobs:
|
|||||||
- name: git checkout
|
- name: git checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- id: setup
|
- name: setup go ${{ env.GO_VERSION }}
|
||||||
name: Setup go env
|
|
||||||
uses: ./.github/actions/setup-go
|
uses: ./.github/actions/setup-go
|
||||||
|
with:
|
||||||
|
go-version: '${{ env.GO_VERSION }}'
|
||||||
|
|
||||||
- name: run itest
|
- name: run itest
|
||||||
run: make itest-parallel windows=1 tranches=2 parallel=2
|
run: make itest-parallel windows=1 tranches=2 parallel=2
|
||||||
@@ -285,9 +293,10 @@ jobs:
|
|||||||
- name: git checkout
|
- name: git checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- id: setup
|
- name: setup go ${{ env.GO_VERSION }}
|
||||||
name: Setup go env
|
|
||||||
uses: ./.github/actions/setup-go
|
uses: ./.github/actions/setup-go
|
||||||
|
with:
|
||||||
|
go-version: '${{ env.GO_VERSION }}'
|
||||||
|
|
||||||
- name: install bitcoind
|
- name: install bitcoind
|
||||||
run: ./scripts/install_bitcoind.sh
|
run: ./scripts/install_bitcoind.sh
|
||||||
@@ -318,9 +327,10 @@ jobs:
|
|||||||
- name: git checkout
|
- name: git checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- id: setup
|
- name: setup go ${{ env.GO_VERSION }}
|
||||||
name: Setup go env
|
|
||||||
uses: ./.github/actions/setup-go
|
uses: ./.github/actions/setup-go
|
||||||
|
with:
|
||||||
|
go-version: '${{ env.GO_VERSION }}'
|
||||||
|
|
||||||
- name: run new itest
|
- name: run new itest
|
||||||
run: make itest-parallel temptest=true windows=1 tranches=2 parallel=2
|
run: make itest-parallel temptest=true windows=1 tranches=2 parallel=2
|
||||||
|
|||||||
Reference in new issue
Block a user