Skip to content

Commit

Permalink
Cirrus: Run with both modules enabled and disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyRand committed Feb 28, 2021
1 parent ae92da7 commit 981e87e
Showing 1 changed file with 84 additions and 17 deletions.
101 changes: 84 additions & 17 deletions .cirrus.yml
Expand Up @@ -11,10 +11,30 @@ task:
- apt-get install -y libcap-dev
path_script:
- source testdata/move_to_gopath.bash
fetch_script:
- go get -tags "$GOX_TAGS" -d -v -t github.com/$CIRRUS_REPO_FULL_NAME/...
- go generate github.com/namecoin/x509-compressed/...
- go get -tags "$GOX_TAGS" -d -v -t github.com/$CIRRUS_REPO_FULL_NAME/...
matrix:
- env:
GO111MODULE: "off"
fetch_script:
- go get -tags "$GOX_TAGS" -d -v -t github.com/$CIRRUS_REPO_FULL_NAME/...
- GOOS=windows go get -tags "$GOX_TAGS" -d -v -t github.com/$CIRRUS_REPO_FULL_NAME/...
- go generate github.com/namecoin/x509-compressed/...
- go get -tags "$GOX_TAGS" -d -v -t github.com/$CIRRUS_REPO_FULL_NAME/...
- x509_script:
- cd $(go env GOPATH)/src/github.com/"$CIRRUS_REPO_FULL_NAME"
- cd ../
- git clone https://github.com/namecoin/x509-compressed.git
- cd x509-compressed
- go mod init
- go mod tidy
- go generate ./...
- go mod tidy
- go install -v ./...
fetch_script:
- cd $(go env GOPATH)/src/github.com/"$CIRRUS_REPO_FULL_NAME"
- go mod init
- go mod tidy
- go mod edit -replace github.com/namecoin/x509-compressed=../x509-compressed
- go mod tidy
lint_script:
- cd $(go env GOPATH)/src/github.com/$CIRRUS_REPO_FULL_NAME/
- golangci-lint run --no-config --enable-all --disable gochecknoglobals,gomnd $GOLANGCI_ARGS -v --timeout 5m --out-format json > $CIRRUS_WORKING_DIR/lint-report.json
Expand Down Expand Up @@ -59,11 +79,38 @@ task:
- apt-get install -y libcap-dev
path_script:
- source testdata/move_to_gopath.bash
fetch_script:
- go get -tags "$GOX_TAGS" -d -v -t github.com/$CIRRUS_REPO_FULL_NAME/...
- go generate github.com/namecoin/x509-compressed/...
- go get -tags "$GOX_TAGS" -d -v -t github.com/$CIRRUS_REPO_FULL_NAME/...
test_script: go test -tags "$GOX_TAGS" -v github.com/$CIRRUS_REPO_FULL_NAME/...
matrix:
- env:
GO111MODULE: "off"
fetch_script:
- go get -tags "$GOX_TAGS" -d -v -t github.com/$CIRRUS_REPO_FULL_NAME/...
- GOOS=windows go get -tags "$GOX_TAGS" -d -v -t github.com/$CIRRUS_REPO_FULL_NAME/...
- go generate github.com/namecoin/x509-compressed/...
- go get -tags "$GOX_TAGS" -d -v -t github.com/$CIRRUS_REPO_FULL_NAME/...
- x509_script:
- cd $(go env GOPATH)/src/github.com/"$CIRRUS_REPO_FULL_NAME"
- cd ../
- git clone https://github.com/namecoin/x509-compressed.git
- cd x509-compressed
- go mod init
- go mod tidy
- go generate ./...
- go mod tidy
- go install -v ./...
fetch_script:
- cd $(go env GOPATH)/src/github.com/"$CIRRUS_REPO_FULL_NAME"
- go mod init
- go mod tidy
- go mod edit -replace github.com/namecoin/x509-compressed=../x509-compressed
- go mod tidy
# Get the test suite
- mkdir -p $(go env GOPATH)/src/github.com/hlandau
- cd $(go env GOPATH)/src/github.com/hlandau
- git clone https://github.com/hlandau/nctestsuite.git
test_script:
- cd $(go env GOPATH)/src/github.com/"$CIRRUS_REPO_FULL_NAME"
- go install -tags "$GOX_TAGS" -v ./...
- go test -tags "$GOX_TAGS" -v github.com/$CIRRUS_REPO_FULL_NAME/...
env:
GOX_TAGS: ""
GO_VERSION: latest
Expand All @@ -86,17 +133,37 @@ task:
- go get github.com/mitchellh/gox
path_script:
- source testdata/move_to_gopath.bash
fetch_script:
- go get -tags "$GOX_TAGS" -d -v -t github.com/$CIRRUS_REPO_FULL_NAME/...
- GOOS=windows GOARCH=amd64 go get -tags "$GOX_TAGS" -d -v -t github.com/$CIRRUS_REPO_FULL_NAME/...
- go generate github.com/namecoin/x509-compressed/...
- go get -tags "$GOX_TAGS" -d -v -t github.com/$CIRRUS_REPO_FULL_NAME/...
matrix:
- env:
GO111MODULE: "off"
fetch_script:
- go get -tags "$GOX_TAGS" -d -v -t github.com/$CIRRUS_REPO_FULL_NAME/...
- GOOS=windows go get -tags "$GOX_TAGS" -d -v -t github.com/$CIRRUS_REPO_FULL_NAME/...
- go generate github.com/namecoin/x509-compressed/...
- go get -tags "$GOX_TAGS" -d -v -t github.com/$CIRRUS_REPO_FULL_NAME/...
- x509_script:
- cd $(go env GOPATH)/src/github.com/"$CIRRUS_REPO_FULL_NAME"
- cd ../
- git clone https://github.com/namecoin/x509-compressed.git
- cd x509-compressed
- go mod init
- go mod tidy
- go generate ./...
- go mod tidy
- go install -v ./...
fetch_script:
- cd $(go env GOPATH)/src/github.com/"$CIRRUS_REPO_FULL_NAME"
- go mod init
- go mod tidy
- go mod edit -replace github.com/namecoin/x509-compressed=../x509-compressed
- go mod tidy
build_script:
- rm -rf idist
- CGO_ENABLED=1 gox -tags="$GOX_TAGS" -parallel=8 -osarch 'linux/386 linux/amd64 linux/arm linux/arm64 linux/ppc64le' -output "$GOPATH/releasing/idist/$CIRRUS_REPO_NAME-$CIRRUS_TAG-{{.OS}}_{{.Arch}}/bin/{{.Dir}}" github.com/$CIRRUS_REPO_FULL_NAME/...
- CGO_ENABLED=0 gox -tags="$GOX_TAGS" -parallel=8 -osarch 'darwin/amd64 freebsd/386 freebsd/amd64 freebsd/arm linux/ppc64 openbsd/386 openbsd/amd64 netbsd/386 netbsd/amd64 netbsd/arm dragonfly/amd64 solaris/amd64 windows/386 windows/amd64' -output "$GOPATH/releasing/idist/$CIRRUS_REPO_NAME-$CIRRUS_TAG-{{.OS}}_{{.Arch}}/bin/{{.Dir}}" github.com/$CIRRUS_REPO_FULL_NAME/...
- mv $GOPATH/releasing/idist ./idist
- cd $(go env GOPATH)/src/github.com/"$CIRRUS_REPO_FULL_NAME"
- CGO_ENABLED=1 gox -tags="$GOX_TAGS" -parallel=8 -osarch 'linux/386 linux/amd64 linux/arm linux/arm64 linux/ppc64le' -output "$GOPATH/releasing/idist/$CIRRUS_REPO_NAME-$CIRRUS_TAG-{{.OS}}_{{.Arch}}/bin/{{.Dir}}" ./...
- CGO_ENABLED=0 gox -tags="$GOX_TAGS" -parallel=8 -osarch 'darwin/amd64 freebsd/386 freebsd/amd64 freebsd/arm linux/ppc64 openbsd/386 openbsd/amd64 netbsd/386 netbsd/amd64 netbsd/arm dragonfly/amd64 solaris/amd64 windows/386 windows/amd64' -output "$GOPATH/releasing/idist/$CIRRUS_REPO_NAME-$CIRRUS_TAG-{{.OS}}_{{.Arch}}/bin/{{.Dir}}" ./...
dist_script:
- mv $GOPATH/releasing/idist ./idist
- bash "testdata/dist.bash"
binaries_artifacts:
path: "dist/*"
Expand Down

0 comments on commit 981e87e

Please sign in to comment.