Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opt doc #55

Merged
merged 1 commit into from
Aug 17, 2021
Merged
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
89 changes: 28 additions & 61 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ version: 2.1
orbs:
go: gotest/[email protected]
aws-cli: circleci/[email protected]
packer: salaxander/[email protected]

executors:
golang:
docker:
- image: circleci/golang:1.15.5
- image: circleci/golang:1.16.4
resource_class: 2xlarge
ubuntu:
docker:
- image: ubuntu:19.10
- image: ubuntu:20.04

commands:
install-deps:
Expand Down Expand Up @@ -85,39 +86,39 @@ jobs:
paths:
- linux

test: &test
test:
description: |
Run tests with gotestsum.
parameters: &test-params
parameters:
executor:
type: executor
default: golang
go-test-flags:
type: string
default: "-timeout 30m"
description: Flags passed to go test.
packages:
target:
type: string
default: "./..."
description: Import paths of packages to be tested.
winpost-test:
proofs-log-test:
type: string
default: "0"
test-suite-name:
suite:
type: string
default: unit
description: Test suite name to report to CircleCI.
gotestsum-format:
type: string
default: pkgname-and-test-fails
default: standard-verbose
description: gotestsum format. https://github.com/gotestyourself/gotestsum#format
coverage:
type: string
default: -coverprofile=coverage.txt -coverpkg=github.com/filecoin-project/venus-miner/...
description: Coverage flag. Set to the empty string to disable.
codecov-upload:
type: boolean
default: false
default: true
description: |
Upload coverage report to https://codecov.io/. Requires the codecov API token to be
set as an environment variable for private projects.
Expand All @@ -136,21 +137,21 @@ jobs:
environment:
SKIP_CONFORMANCE: "1"
command: |
mkdir -p /tmp/test-reports/<< parameters.test-suite-name >>
mkdir -p /tmp/test-reports/<< parameters.suite >>
mkdir -p /tmp/test-artifacts
gotestsum \
--format << parameters.gotestsum-format >> \
--junitfile /tmp/test-reports/<< parameters.test-suite-name >>/junit.xml \
--jsonfile /tmp/test-artifacts/<< parameters.test-suite-name >>.json \
--junitfile /tmp/test-reports/<< parameters.suite >>/junit.xml \
--jsonfile /tmp/test-artifacts/<< parameters.suite >>.json \
-- \
<< parameters.coverage >> \
<< parameters.go-test-flags >> \
<< parameters.packages >>
<< parameters.target >>
no_output_timeout: 30m
- store_test_results:
path: /tmp/test-reports
- store_artifacts:
path: /tmp/test-artifacts/<< parameters.test-suite-name >>.json
path: /tmp/test-artifacts/<< parameters.suite >>.json
- when:
condition: << parameters.codecov-upload >>
steps:
Expand All @@ -161,22 +162,11 @@ jobs:
command: |
bash <(curl -s https://codecov.io/bash)

test-chain:
<<: *test
test-node:
<<: *test
test-cli:
<<: *test
test-short:
<<: *test
test-terminate:
<<: *test


build-macos:
description: build darwin venus-miner binary
macos:
xcode: "10.0.0"
xcode: "11.4.0"
working_directory: ~/go/src/github.com/filecoin-project/venus-miner
steps:
- prepare:
Expand All @@ -185,8 +175,8 @@ jobs:
- run:
name: Install go
command: |
curl -O https://dl.google.com/go/go1.15.5.darwin-amd64.pkg && \
sudo installer -pkg go1.15.5.darwin-amd64.pkg -target /
curl -O https://dl.google.com/go/go1.16.4.darwin-amd64.pkg && \
sudo installer -pkg go1.16.4.darwin-amd64.pkg -target /
- run:
name: Install pkg-config
command: HOMEBREW_NO_AUTO_UPDATE=1 brew install pkg-config
Expand Down Expand Up @@ -437,49 +427,26 @@ workflows:
- gofmt
- cbor-gen-check
- test:
codecov-upload: true
test-suite-name: full
- test-chain:
codecov-upload: true
test-suite-name: chain
packages: "./chain/..."
- test-node:
codecov-upload: true
test-suite-name: node
packages: "./node/..."
- test-cli:
codecov-upload: true
test-suite-name: cli
packages: "./cli/... ./cmd/... ./api/..."
- test-terminate:
codecov-upload: true
go-test-flags: "-run=TestTerminate"
winpost-test: "1"
test-suite-name: terminate
- test-short:
go-test-flags: "--timeout 10m --short"
test-suite-name: short
filters:
tags:
only:
- /^v\d+\.\d+\.\d+$/
name: test-unit-node
suite: utest-unit-node
target: "./node/..."
- test:
name: test-unit-cli
suite: utest-unit-cli
target: "./cli/... ./cmd/... ./api/..."
- build-all:
requires:
- test-short
filters:
tags:
only:
- /^v\d+\.\d+\.\d+$/
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
- build-macos:
requires:
- test-short
filters:
branches:
ignore:
- /.*/
tags:
only:
- /^v\d+\.\d+\.\d+$/
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
- publish:
requires:
- build-all
Expand All @@ -490,7 +457,7 @@ workflows:
- /.*/
tags:
only:
- /^v\d+\.\d+\.\d+$/
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
- build-and-push-image:
dockerfile: Dockerfile.venusminer
path: .
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<h1 align="center">Project Venus-Miner</h1>
<h1 align="center">Project venus-miner</h1>

<p align="center">
<a href="https://circleci.com/gh/filecoin-project/venus-miner"><img src="https://circleci.com/gh/filecoin-project/venus.svg?style=svg"></a>
<a href=""><img src="https://img.shields.io/badge/golang-%3E%3D1.15.5-blue.svg" /></a>
<a href=""><img src="https://img.shields.io/badge/golang-%3E%3D1.16-blue.svg" /></a>
<br>
</p>

Lotus is an implementation of the Filecoin Distributed Storage Network. For more details about Filecoin, check out the [Filecoin Spec](https://spec.filecoin.io).
Venus is an implementation of the Filecoin Distributed Storage Network. For more details about Filecoin, check out the [Filecoin Spec](https://spec.filecoin.io).

## Building & Documentation

Expand Down
4 changes: 2 additions & 2 deletions api/v0api/full.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ type FullNode interface {

// MethodGroup: Sync
// The Sync method group contains methods for interacting with and
// observing the lotus sync service.
// observing the sync service.

// SyncState returns the current status of the lotus sync system.
// SyncState returns the current status of the sync system.
SyncState(context.Context) (*api.SyncState, error) //perm:read

// SyncSubmitBlock can be used to submit a newly created block to the.
Expand Down
2 changes: 1 addition & 1 deletion build/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
package build

import (
_ "github.com/whyrusleeping/bencher"
_ "github.com/GeertJohan/go.rice/rice"
)
5 changes: 1 addition & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
module github.com/filecoin-project/venus-miner

go 1.15
go 1.16

require (
contrib.go.opencensus.io/exporter/jaeger v0.2.1
contrib.go.opencensus.io/exporter/prometheus v0.3.0
github.com/BurntSushi/toml v0.3.1
github.com/GeertJohan/go.rice v1.0.2
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect
github.com/dgraph-io/badger/v2 v2.2007.2
github.com/dgraph-io/ristretto v0.0.4-0.20210122082011-bb5d392ed82d // indirect
github.com/docker/go-units v0.4.0
Expand All @@ -31,7 +30,6 @@ require (
github.com/filecoin-project/specs-actors/v5 v5.0.1
github.com/filecoin-project/venus-wallet v1.1.0
github.com/gbrlsnchs/jwt/v3 v3.0.0
github.com/go-ole/go-ole v1.2.4 // indirect
github.com/go-resty/resty/v2 v2.4.0
github.com/golang/protobuf v1.5.1 // indirect
github.com/golang/snappy v0.0.2-0.20190904063534-ff6b7dc882cf // indirect
Expand Down Expand Up @@ -69,7 +67,6 @@ require (
github.com/stretchr/testify v1.7.0
github.com/syndtr/goleveldb v1.0.0
github.com/urfave/cli/v2 v2.3.0
github.com/whyrusleeping/bencher v0.0.0-20190829221104-bb6607aa8bba
github.com/whyrusleeping/cbor-gen v0.0.0-20210219115102-f37d292932f2
github.com/xorcare/golden v0.6.1-0.20191112154924-b87f686d7542
go.opencensus.io v0.23.0
Expand Down
Loading