File tree Expand file tree Collapse file tree 5 files changed +190
-7
lines changed Expand file tree Collapse file tree 5 files changed +190
-7
lines changed Original file line number Diff line number Diff line change 99 runs-on : ubuntu-latest
1010 strategy :
1111 matrix :
12- go : [1.16.8, 1.17.1 ]
12+ go : [1.18.2 ]
1313 steps :
1414 - name : Set up Go
1515 uses : actions/setup-go@v2
1616 with :
1717 go-version : ${{ matrix.go }}
18+
1819 - name : Check out source
1920 uses : actions/checkout@v2
20- - name : Install Linters
21- run : " curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.26.0"
21+
2222 - name : Build
23- env :
24- GO111MODULE : " on"
2523 run : go build ./...
24+
2625 - name : Test
27- env :
28- GO111MODULE : " on"
2926 run : |
3027 sh ./goclean.sh
3128
Original file line number Diff line number Diff line change 1+ name : Full Sync From 0
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ note :
7+ description : ' Note'
8+ required : false
9+ default : ' '
10+
11+ jobs :
12+ build :
13+ name : Go CI
14+ runs-on : self-hosted
15+ strategy :
16+ matrix :
17+ go : [1.18.2]
18+ steps :
19+ - run : |
20+ echo "Note ${{ github.event.inputs.note }}!"
21+ - name : Setup Go
22+ uses : actions/setup-go@v2
23+ with :
24+ go-version : ${{ matrix.go }}
25+ - name : Checkout source
26+ uses : actions/checkout@v2
27+ - name : Build lbcd
28+ run : go build .
29+ - name : Create datadir
30+ run : echo "TEMP_DATA_DIR=$(mktemp -d)" >> $GITHUB_ENV
31+ - name : Run lbcd
32+ run : ./lbcd --datadir=${{env.TEMP_DATA_DIR}}/data --logdir=${{env.TEMP_DATA_DIR}}/logs --nolisten --norpc
33+ - name : Remove datadir
34+ if : always()
35+ run : rm -rf ${{env.TEMP_DATA_DIR}}
Original file line number Diff line number Diff line change 1+ name : Full Sync From 814k
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ note :
7+ description : ' Note'
8+ required : false
9+ default : ' '
10+
11+ jobs :
12+ build :
13+ name : Go CI
14+ runs-on : self-hosted
15+ strategy :
16+ matrix :
17+ go : [1.18.2]
18+ steps :
19+ - run : |
20+ echo "Note ${{ github.event.inputs.note }}!"
21+ - name : Setup Go
22+ uses : actions/setup-go@v2
23+ with :
24+ go-version : ${{ matrix.go }}
25+ - name : Checkout source
26+ uses : actions/checkout@v2
27+ - name : Build lbcd
28+ run : go build .
29+ - name : Create datadir
30+ run : echo "TEMP_DATA_DIR=$(mktemp -d)" >> $GITHUB_ENV
31+ - name : Copy initial data
32+ run : cp -r /home/lbry/lbcd_814k/* ${{env.TEMP_DATA_DIR}}
33+ - name : Run lbcd
34+ run : ./lbcd --datadir=${{env.TEMP_DATA_DIR}}/data --logdir=${{env.TEMP_DATA_DIR}}/logs --nolisten --norpc
35+ - name : Remove datadir
36+ if : always()
37+ run : rm -rf ${{env.TEMP_DATA_DIR}}
Original file line number Diff line number Diff line change 1+ name : golangci-lint
2+
3+ env :
4+ # go needs absolute directories, using the $HOME variable doesn't work here.
5+ GOCACHE : /home/runner/work/go/pkg/build
6+ GOPATH : /home/runner/work/go
7+ GO_VERSION : ' ^1.18.2'
8+
9+ on :
10+ push :
11+ tags :
12+ - v*
13+ branches :
14+ - " *"
15+ pull_request :
16+ branches :
17+ - " *"
18+
19+ jobs :
20+ golangci :
21+ name : lint
22+ runs-on : ubuntu-latest
23+ steps :
24+ - name : setup go ${{ env.GO_VERSION }}
25+ uses : actions/setup-go@v2
26+ with :
27+ go-version : ' ${{ env.GO_VERSION }}'
28+
29+ - name : checkout source
30+ uses : actions/checkout@v2
31+
32+ - name : compile code
33+ run : go install -v ./...
34+
35+ - name : golangci-lint
36+ uses : golangci/golangci-lint-action@v2
37+ with :
38+ # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
39+ version : latest
40+
41+ # Optional: working directory, useful for monorepos
42+ # working-directory: somedir
43+
44+ # Optional: golangci-lint command line arguments.
45+ # args: --issues-exit-code=0
46+
47+ # Optional: show only new issues if it's a pull request. The default value is `false`.
48+ # only-new-issues: true
49+
50+ # Optional: if set to true then the action will use pre-installed Go.
51+ skip-go-installation : true
52+
53+ # Optional: if set to true then the action don't cache or restore ~/go/pkg.
54+ # skip-pkg-cache: true
55+
56+ # Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
57+ # skip-build-cache: true
Original file line number Diff line number Diff line change 1+ name : goreleaser
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ note :
7+ description : ' Note'
8+ required : false
9+ default : ' '
10+ pull_request :
11+ push :
12+ tags :
13+ - ' *'
14+
15+ permissions :
16+ contents : write
17+
18+ jobs :
19+ goreleaser :
20+ runs-on : ubuntu-latest
21+ steps :
22+ -
23+ name : Checkout
24+ uses : actions/checkout@v2
25+ with :
26+ fetch-depth : 0
27+ -
28+ name : Set up Go
29+ uses : actions/setup-go@v2
30+ with :
31+ go-version : 1.18.2
32+
33+ # Login against a Docker registry except on PR
34+ # https://github.com/docker/login-action
35+ - name : Log into registry docker.io
36+ if : github.event_name != 'pull_request'
37+ uses : docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
38+ with :
39+ username : ${{ secrets.DOCKER_HUB_USERNAME }}
40+ password : ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
41+ -
42+ name : Run GoReleaser
43+ uses : goreleaser/goreleaser-action@v2
44+ with :
45+ distribution : goreleaser
46+ version : latest
47+ args : release --rm-dist
48+ env :
49+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
50+ -
51+ name : Upload artifacts
52+ uses : actions/upload-artifact@v2
53+ with :
54+ name : lbcd-${{ github.sha }}
55+ path : |
56+ dist/checksums.txt
57+ dist/*.tar.gz
You can’t perform that action at this time.
0 commit comments