-
Notifications
You must be signed in to change notification settings - Fork 465
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: refractor ci and test/build (#4831)
* refractor ci and test/build * rename job * apt update before install * fix imports * fix gen * fix goimports * fix lint * fix doc gen * fix inline-gen
- Loading branch information
Showing
166 changed files
with
430 additions
and
9,206 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,59 @@ | ||
name: basic checks | ||
name: basic-check | ||
|
||
on: ["push", "pull_request"] | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
pull_request: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
|
||
check: | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- name: dependencies | ||
run: sudo apt update & sudo apt upgrade & sudo apt install --reinstall mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config curl clang build-essential hwloc libhwloc-dev wget -y | ||
|
||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: 'true' | ||
|
||
- name: setup go | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: '1.16' | ||
go-version: 1.17 | ||
|
||
- name: install deps | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get -o Acquire::Retries=3 install make ncftp mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config curl clang build-essential hwloc libhwloc-dev wget -y && sudo apt upgrade -y | ||
- name: deps | ||
run: make deps | ||
- name: dep | ||
env: | ||
GOPROXY: "https://proxy.golang.org,direct" | ||
GO111MODULE: "on" | ||
run: | | ||
make deps | ||
- name: build | ||
run: make all | ||
- name: Build | ||
env: | ||
GOPROXY: "https://proxy.golang.org,direct" | ||
GO111MODULE: "on" | ||
run: | | ||
make | ||
- name: tests-shared | ||
run: make test-venus-shared | ||
- name: Lint | ||
run: | | ||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.44.2 | ||
golangci-lint run --timeout 10m | ||
- name: compatible all | ||
- name: Compatible all | ||
run: | | ||
make compatible-all | ||
- name: gen all | ||
- name: Gen all | ||
run: | | ||
make gen-all | ||
- name: detect changes | ||
- name: Detect changes | ||
run: | | ||
git status --porcelain | ||
test -z "$(git status --porcelain)" | ||
test -z "$(git status --porcelain)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
pull_request: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
|
||
test: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17 | ||
|
||
- name: install deps | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get -o Acquire::Retries=3 install make ncftp mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config curl clang build-essential hwloc libhwloc-dev wget -y && sudo apt upgrade -y | ||
- name: install statediff globally | ||
run: | | ||
## statediff is optional; we succeed even if compilation fails. | ||
mkdir -p /tmp/statediff | ||
git clone https://github.com/filecoin-project/statediff.git /tmp/statediff | ||
cd /tmp/statediff | ||
go install ./cmd/statediff || exit 0 | ||
- name: dep | ||
env: | ||
GOPROXY: "https://proxy.golang.org,direct" | ||
GO111MODULE: "on" | ||
run: | | ||
make deps | ||
- name: Build | ||
env: | ||
GOPROXY: "https://proxy.golang.org,direct" | ||
GO111MODULE: "on" | ||
run: | | ||
make | ||
- name: Download vk file | ||
run: | | ||
./venus fetch --size=0 | ||
- name: GenTool | ||
run: | | ||
go build -o genesis-file-server ./tools/genesis-file-server | ||
go build -o gengen ./tools/gengen | ||
./gengen --keypath ./fixtures/live --out-car ./fixtures/live/genesis.car --out-json ./fixtures/live/gen.json --config ./fixtures/setup.json | ||
./gengen --keypath ./fixtures/test --out-car ./fixtures/test/genesis.car --out-json ./fixtures/test/gen.json --config ./fixtures/setup.json | ||
- name: Unit Test | ||
run: go test -coverpkg=./... -coverprofile=coverage_unit.txt -covermode=atomic -timeout=30m -parallel=4 -v ./... -integration=false -unit=true | ||
|
||
- name: Integration Test | ||
run: go test -coverpkg=./... -coverprofile=coverage_integration.txt -covermode=atomic -timeout=30m -parallel=4 -v ./... -integration=true -unit=false | ||
|
||
- name: Upload | ||
uses: codecov/codecov-action@v2 | ||
with: | ||
token: | ||
files: ./coverage_unit.txt,./coverage_integration.txt | ||
flags: unittests,integration | ||
name: venus | ||
fail_ci_if_error: true | ||
verbose: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,5 +42,8 @@ debug.test | |
|
||
// HomeBrew | ||
Brewfile.lock.json | ||
|
||
build-dep | ||
coverage.* | ||
receipt.json | ||
genesis-file-server | ||
gengen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.