Merge pull request #7254 from yyforyongyu/fix-tools

tools: fix docker version
This commit is contained in:
Olaoluwa Osuntokun authored and GitHub committed 2022-12-15 11:55:49 -08:00
commit a347e405e8
4 files changed
+76 -181

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
# A resuable workflow that's used to setup the go enviroment and cache.
name: Setup go enviroment
runs:
using: "composite"
steps:
- name: setup go ${{ env.GO_VERSION }}
uses: actions/setup-go@v3
with:
go-version: '${{ env.GO_VERSION }}'
- name: go cache
uses: actions/cache@v3
with:
# In order:
# * Module download cache
# * Build cache (Linux)
# * Build cache (Mac)
# * Build cache (Windows)
path: |
~/go/pkg/mod
~/.cache/go-build
~/Library/Caches/go-build
~\AppData\Local\go-build
key: ${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ env.GO_VERSION }}-
+44 -180
View File
@@ -32,24 +32,6 @@ env:
GO_VERSION: 1.19.2 GO_VERSION: 1.19.2
jobs: jobs:
########################
# format code
########################
fmt-check:
name: check code format
runs-on: ubuntu-latest
steps:
- name: git checkout
uses: actions/checkout@v3
- name: setup go ${{ env.GO_VERSION }}
uses: actions/setup-go@v3
with:
go-version: '${{ env.GO_VERSION }}'
- name: fmt
run: make fmt-check
######################## ########################
# RPC and mobile compilation check # RPC and mobile compilation check
######################## ########################
@@ -58,23 +40,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: git checkout - name: git checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: go cache - id: setup
uses: actions/cache@v1 name: Setup go env
with: uses: ./.github/actions/setup-go
path: /home/runner/work/go
key: lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-
lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-
lnd-${{ runner.os }}-go-
- name: setup go ${{ env.GO_VERSION }}
uses: actions/setup-go@v2
with:
go-version: '${{ env.GO_VERSION }}'
- name: run check - name: run check
run: make rpc-check run: make rpc-check
@@ -97,25 +67,13 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: git checkout - name: git checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- name: go cache - id: setup
uses: actions/cache@v1 name: Setup go env
with: uses: ./.github/actions/setup-go
path: /home/runner/work/go
key: lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-
lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-
lnd-${{ runner.os }}-go-
- name: setup go ${{ env.GO_VERSION }}
uses: actions/setup-go@v2
with:
go-version: '${{ env.GO_VERSION }}'
- name: fetch and rebase on ${{ github.base_ref }} - name: fetch and rebase on ${{ github.base_ref }}
run: | run: |
@@ -136,26 +94,16 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: git checkout - name: git checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Fetch all history for linter
run: git fetch --prune --unshallow
- name: go cache
uses: actions/cache@v1
with: with:
path: /home/runner/work/go fetch-depth: 0
key: lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-
lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-
lnd-${{ runner.os }}-go-
- name: setup go ${{ env.GO_VERSION }} - id: setup
uses: actions/setup-go@v2 name: Setup go env
with: uses: ./.github/actions/setup-go
go-version: '${{ env.GO_VERSION }}'
- name: check code format
run: make fmt-check
- name: lint - name: lint
run: GOGC=50 make lint run: GOGC=50 make lint
@@ -168,23 +116,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: git checkout - name: git checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: go cache - id: setup
uses: actions/cache@v1 name: Setup go env
with: uses: ./.github/actions/setup-go
path: /home/runner/work/go
key: lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-
lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-
lnd-${{ runner.os }}-go-
- name: setup go ${{ env.GO_VERSION }}
uses: actions/setup-go@v2
with:
go-version: '${{ env.GO_VERSION }}'
- name: build release for all architectures - name: build release for all architectures
run: make release run: make release
@@ -197,23 +133,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: git checkout - name: git checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: go cache - id: setup
uses: actions/cache@v1 name: Setup go env
with: uses: ./.github/actions/setup-go
path: /home/runner/work/go
key: lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-
lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-
lnd-${{ runner.os }}-go-
- name: setup go ${{ env.GO_VERSION }}
uses: actions/setup-go@v2
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
@@ -235,23 +159,11 @@ jobs:
- btcd unit-race - btcd unit-race
steps: steps:
- name: git checkout - name: git checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: go cache - id: setup
uses: actions/cache@v1 name: Setup go env
with: uses: ./.github/actions/setup-go
path: /home/runner/work/go
key: lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-
lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-
lnd-${{ runner.os }}-go-
- name: setup go ${{ env.GO_VERSION }}
uses: actions/setup-go@v2
with:
go-version: '${{ env.GO_VERSION }}'
- name: install bitcoind - name: install bitcoind
run: ./scripts/install_bitcoind.sh run: ./scripts/install_bitcoind.sh
@@ -293,23 +205,11 @@ jobs:
args: backend=neutrino args: backend=neutrino
steps: steps:
- name: git checkout - name: git checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: go cache - id: setup
uses: actions/cache@v1 name: Setup go env
with: uses: ./.github/actions/setup-go
path: /home/runner/work/go
key: lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-
lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-
lnd-${{ runner.os }}-go-
- name: setup go ${{ env.GO_VERSION }}
uses: actions/setup-go@v2
with:
go-version: '${{ env.GO_VERSION }}'
- name: install bitcoind - name: install bitcoind
run: ./scripts/install_bitcoind.sh run: ./scripts/install_bitcoind.sh
@@ -341,23 +241,11 @@ jobs:
GOPATH: ${{ github.workspace }}/go GOPATH: ${{ github.workspace }}/go
steps: steps:
- name: git checkout - name: git checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: go cache - id: setup
uses: actions/cache@v1 name: Setup go env
with: uses: ./.github/actions/setup-go
path: ${{ env.GOPATH }}
key: lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-
lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-
lnd-${{ runner.os }}-go-
- name: setup go ${{ env.GO_VERSION }}
uses: actions/setup-go@v2
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
@@ -403,21 +291,9 @@ jobs:
- name: git checkout - name: git checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: go cache - id: setup
uses: actions/cache@v1 name: Setup go env
with: uses: ./.github/actions/setup-go
path: /home/runner/work/go
key: lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-
lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-
lnd-${{ runner.os }}-go-
- name: setup go ${{ env.GO_VERSION }}
uses: actions/setup-go@v3
with:
go-version: '${{ env.GO_VERSION }}'
- name: install bitcoind - name: install bitcoind
run: ./scripts/install_bitcoind.sh run: ./scripts/install_bitcoind.sh
@@ -451,21 +327,9 @@ jobs:
- name: git checkout - name: git checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: go cache - id: setup
uses: actions/cache@v1 name: Setup go env
with: uses: ./.github/actions/setup-go
path: ${{ env.GOPATH }}
key: lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-
lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-
lnd-${{ runner.os }}-go-
- name: setup go ${{ env.GO_VERSION }}
uses: actions/setup-go@v3
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
@@ -500,7 +364,7 @@ jobs:
steps: steps:
- name: git checkout - name: git checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: ensure dependences at correct version - name: ensure dependences at correct version
run: if ! grep -q "${{ matrix.pinned_dep }}" go.mod; then echo dependency ${{ matrix.pinned_dep }} should not be altered ; exit 1 ; fi run: if ! grep -q "${{ matrix.pinned_dep }}" go.mod; then echo dependency ${{ matrix.pinned_dep }} should not be altered ; exit 1 ; fi
@@ -513,7 +377,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: git checkout - name: git checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: release notes check - name: release notes check
run: scripts/check-release-notes.sh run: scripts/check-release-notes.sh
@@ -294,6 +294,9 @@ certain large transactions](https://github.com/lightningnetwork/lnd/pull/7100).
check](https://github.com/lightningnetwork/lnd/pull/7114) for all non-PR check](https://github.com/lightningnetwork/lnd/pull/7114) for all non-PR
events. events.
* Fixed docker image version used in
[`tools`](https://github.com/lightningnetwork/lnd/pull/7254).
### Integration test ### Integration test
The `lntest` has been The `lntest` has been
+1 -1
View File
@@ -1,4 +1,4 @@
FROM golang:1.19.2-buster FROM golang:1.19
RUN apt-get update && apt-get install -y git RUN apt-get update && apt-get install -y git
ENV GOCACHE=/tmp/build/.cache ENV GOCACHE=/tmp/build/.cache