Skip to content

Commit

Permalink
chore: remove submodule (#1492)
Browse files Browse the repository at this point in the history
  • Loading branch information
shiqizng authored Mar 3, 2023
1 parent bf12a7e commit a63f591
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 265 deletions.
6 changes: 0 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,6 @@ commands:
pip3 install -r misc/requirements.txt
pip3 install e2e_tests/
- run:
name: sync submodules (go-algorand)
command: |
git submodule sync
git submodule update --init
- run: echo 'export PATH=$PATH:/usr/local/go/bin:$HOME/.local/bin' >> $BASH_ENV

install_linter:
Expand Down
39 changes: 9 additions & 30 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,14 @@ COVERPKG := $(shell go list ./... | grep -v '/cmd/' | egrep -v '(testing|test|m
export GO_IMAGE = golang:$(shell go version | cut -d ' ' -f 3 | tail -c +3 )

# This is the default target, build everything:
all: conduit cmd/algorand-indexer/algorand-indexer go-algorand idb/postgres/internal/schema/setup_postgres_sql.go idb/mocks/IndexerDb.go
all: conduit cmd/algorand-indexer/algorand-indexer idb/postgres/internal/schema/setup_postgres_sql.go idb/mocks/IndexerDb.go

conduit: go-algorand
conduit:
go generate ./... && cd cmd/conduit && go build -ldflags="${GOLDFLAGS}"

cmd/algorand-indexer/algorand-indexer: idb/postgres/internal/schema/setup_postgres_sql.go go-algorand
cmd/algorand-indexer/algorand-indexer: idb/postgres/internal/schema/setup_postgres_sql.go
cd cmd/algorand-indexer && go build -ldflags="${GOLDFLAGS}"

go-algorand:
git submodule update --init && cd third_party/go-algorand && \
make crypto/libs/`scripts/ostype.sh`/`scripts/archtype.sh`/lib/libsodium.a

idb/postgres/internal/schema/setup_postgres_sql.go: idb/postgres/internal/schema/setup_postgres.sql
cd idb/postgres/internal/schema && go generate

Expand All @@ -45,24 +41,24 @@ idb/mocks/IndexerDb.go: idb/idb.go
cd idb && mockery --name=IndexerDb

# check that all packages (except tests) compile
check: go-algorand
check:
go build ./...

package: go-algorand
package:
rm -rf $(PKG_DIR)
mkdir -p $(PKG_DIR)
misc/release.py --host-only --outdir $(PKG_DIR)

# used in travis test builds; doesn't verify that tag and .version match
fakepackage: go-algorand
fakepackage:
rm -rf $(PKG_DIR)
mkdir -p $(PKG_DIR)
misc/release.py --host-only --outdir $(PKG_DIR) --fake-release

test: idb/mocks/IndexerDb.go cmd/algorand-indexer/algorand-indexer
go test -coverpkg=$(COVERPKG) ./... -coverprofile=coverage.txt -covermode=atomic ${TEST_FLAG}

lint: go-algorand
lint:
golangci-lint run -c .golangci.yml
go vet ./...

Expand Down Expand Up @@ -96,24 +92,7 @@ test-package:
test-generate:
test/test_generate.py

nightly-setup:
cd third_party/go-algorand && git fetch && git reset --hard origin/master

nightly-teardown:
git submodule update

indexer-v-algod-swagger:
indexer-v-algod:
pytest -sv misc/parity

indexer-v-algod: nightly-setup indexer-v-algod-swagger nightly-teardown

# fetch and update submodule. it's default to latest rel/nightly branch.
# to use a different branch, update the branch in .gitmodules for CI build,
# and for local testing, you may checkout a specific branch in the submodule.
# after submodule is updated, CI_E2E_FILENAME in .circleci/config.yml should
# also be updated to use a newer artifact. path copied from s3 bucket,
# s3://algorand-testdata/indexer/e2e4/
update-submodule:
git submodule update --remote

.PHONY: all test e2e integration fmt lint deploy sign test-package package fakepackage cmd/algorand-indexer/algorand-indexer idb/mocks/IndexerDb.go go-algorand indexer-v-algod conduit
.PHONY: all test e2e integration fmt lint deploy sign test-package package fakepackage cmd/algorand-indexer/algorand-indexer idb/mocks/IndexerDb.go indexer-v-algod conduit
22 changes: 0 additions & 22 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@ module github.com/algorand/indexer

go 1.17

replace github.com/algorand/go-algorand => ./third_party/go-algorand

require (
github.com/algorand/avm-abi v0.2.0
github.com/algorand/go-algorand v0.0.0-20220211161928-53b157beb10f
github.com/algorand/go-algorand-sdk/v2 v2.0.0-20230228201805-5b8c99b1412c
github.com/algorand/go-codec/codec v1.1.8
github.com/algorand/go-deadlock v0.2.2
github.com/algorand/oapi-codegen v1.12.0-algorand.0
github.com/davecgh/go-spew v1.1.1
github.com/getkin/kin-openapi v0.107.0
Expand All @@ -32,20 +28,11 @@ require (
)

require (
github.com/DataDog/zstd v1.5.2 // indirect
github.com/Microsoft/go-winio v0.4.14 // indirect
github.com/algorand/falcon v0.0.0-20220727072124-02a2a64c4414 // indirect
github.com/algorand/go-sumhash v1.0.0 // indirect
github.com/algorand/msgp v1.1.53 // indirect
github.com/algorand/websocket v1.4.5 // indirect
github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
github.com/aws/aws-sdk-go v1.33.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/consensys/gnark-crypto v0.7.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect
github.com/davidlazar/go-crypto v0.0.0-20170701192655-dcfb0a7ac018 // indirect
github.com/dchest/siphash v1.2.1 // indirect
github.com/docker/distribution v2.7.1+incompatible // indirect
github.com/docker/docker v1.13.1 // indirect
github.com/docker/go-connections v0.4.0 // indirect
Expand All @@ -55,10 +42,8 @@ require (
github.com/go-openapi/swag v0.19.5 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/go-querystring v1.0.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gorilla/mux v1.8.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/invopop/yaml v0.1.0 // indirect
Expand All @@ -69,7 +54,6 @@ require (
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect
github.com/jackc/pgtype v1.8.1 // indirect
github.com/jackc/puddle v1.1.3 // indirect
github.com/jmespath/go-jmespath v0.3.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/kr/pretty v0.3.0 // indirect
github.com/labstack/gommon v0.4.0 // indirect
Expand All @@ -78,16 +62,11 @@ require (
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mattn/go-sqlite3 v1.10.0 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/miekg/dns v1.1.41 // indirect
github.com/mitchellh/mapstructure v1.4.3 // indirect
github.com/mmcloughlin/addchain v0.4.0 // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/olivere/elastic v6.2.14+incompatible // indirect
github.com/opencontainers/go-digest v1.0.0-rc1 // indirect
github.com/pelletier/go-toml v1.9.4 // indirect
github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.26.0 // indirect
Expand All @@ -113,6 +92,5 @@ require (
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/ini.v1 v1.66.2 // indirect
gopkg.in/sohlich/elogrus.v3 v3.0.0-20180410122755-1fa29e2f2009 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)
Loading

0 comments on commit a63f591

Please sign in to comment.