Skip to content
This repository has been archived by the owner on Apr 7, 2019. It is now read-only.

Commit

Permalink
Ungx-ed commit 245c40b8fd0166a8bbdac5bffc5c029489a44e42
Browse files Browse the repository at this point in the history
  • Loading branch information
karalabe authored and Travis CI User committed Mar 9, 2019
1 parent cd900e3 commit 1b76f00
Show file tree
Hide file tree
Showing 2,698 changed files with 71,211 additions and 767,349 deletions.
107 changes: 47 additions & 60 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,62 @@
version: 2
version: 2.0

aliases:
make_out_dirs: &make_out_dirs
run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS/{unit,sharness}
restore_gomod: &restore_gomod
restore_cache:
keys:
- v3-dep-{{ .Branch }}-{{ checksum "~/ipfs/go-ipfs/go.sum" }}-{{ .Environment.CIRCLE_JOB }}
- v3-dep-{{ .Branch }}-{{ checksum "~/ipfs/go-ipfs/go.sum" }}-
- v3-dep-{{ .Branch }}-
- v3-dep-master-
store_gomod: &store_gomod
save_cache:
key: v3-dep-{{ .Branch }}-{{ checksum "~/ipfs/go-ipfs/go.sum" }}-{{ .Environment.CIRCLE_JOB }}
paths:
- ~/go/pkg/mod
- ~/.cache/go-build/


defaults: &defaults
working_directory: ~/ipfs/go-ipfs
shell: /bin/bash --login
environment:
GO111MODULE: "on"
TEST_NO_DOCKER: 1
TEST_NO_FUSE: 1
GOPATH: $HOME/.go_workspace
GOPATH: /home/circleci/go
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
CIRCLE: 1
SERVICE: circle-ci
TEST_NO_DOCKER: 1
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
TEST_VERBOSE: 1
TRAVIS: 1
IMPORT_PATH: github.com/ipfs/go-ipfs

docker:
- image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37
command: /sbin/init
- image: circleci/golang:1.11

jobs:
gotest:
<<: *defaults
steps:
- checkout
- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
- run: 'sudo docker info >/dev/null 2>&1 || sudo service docker start; '
- run: sudo rm -rf /usr/local/go
- run: if [ ! -e go1.11.linux-amd64.tar.gz ]; then curl -o go1.11.linux-amd64.tar.gz https://storage.googleapis.com/golang/go1.11.linux-amd64.tar.gz; fi
- run: sudo tar -C /usr/local -xzf go1.11.linux-amd64.tar.gz
- *make_out_dirs
- *restore_gomod

- restore_cache:
keys:
- v1-dep-{{ .Branch }}-
- v1-dep-master-
- run: make cmd/ipfs-try-build
- run: |
make -j 1 test/unit/gotest.junit.xml \
&& [[ ! $(jq -s -c 'map(select(.Action == "fail")) | .[]' test/unit/gotest.json) ]]
- run:
when: always
command: bash <(curl -s https://codecov.io/bash) -cF unittests -X search -f coverage/unit_tests.coverprofile

- run: sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0 net.ipv6.conf.default.disable_ipv6=0 net.ipv6.conf.all.disable_ipv6=0
- run: rm -rf "$HOME/.go_workspace/src/$IMPORT_PATH"
- run: mkdir -p "$HOME/.go_workspace/src/$IMPORT_PATH"
- run: cp -aT . "$HOME/.go_workspace/src/$IMPORT_PATH"
- run: cd "$HOME/.go_workspace/src/$IMPORT_PATH" && make deps

- save_cache:
key: v1-dep-{{ .Branch }}-{{ epoch }}
paths:
- ~/.go_workspace
- ~/go1.11.linux-amd64.tar.gz
- ~/.go_workspace/src/gx/ipfs
- ./node_modules
- run:
when: always
command: mv "test/unit/gotest.junit.xml" /tmp/circleci-test-results/unit

- *store_gomod

- run: cd "$HOME/.go_workspace/src/$IMPORT_PATH" && curl -s https://codecov.io/bash > codecov
- run: cd "$HOME/.go_workspace/src/$IMPORT_PATH" && make -j 1 test/unit/gotest.junit.xml
- run: cd "$HOME/.go_workspace/src/$IMPORT_PATH" && bash codecov -cF unittests -X search -f coverage/unit_tests.coverprofile
- run: mv "$HOME/.go_workspace/src/${IMPORT_PATH}/test/unit/gotest.junit.xml" /tmp/circleci-test-results
- store_test_results:
path: /tmp/circleci-test-results
# Save artifacts
Expand All @@ -64,39 +67,23 @@ jobs:
sharness:
<<: *defaults
steps:
- run: sudo apt install socat
- checkout
- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
- run: 'sudo docker info >/dev/null 2>&1 || sudo service docker start; '
- run: sudo rm -rf /usr/local/go
- run: if [ ! -e go1.11.linux-amd64.tar.gz ]; then curl -o go1.11.linux-amd64.tar.gz https://storage.googleapis.com/golang/go1.11.linux-amd64.tar.gz; fi
- run: sudo tar -C /usr/local -xzf go1.11.linux-amd64.tar.gz
- *make_out_dirs
- *restore_gomod

- restore_cache:
keys:
- v1-dep-{{ .Branch }}-
- v1-dep-master-
- run: make -j 10 coverage/sharness_tests.coverprofile test/sharness/test-results/sharness.xml TEST_GENERATE_JUNIT=1 CONTINUE_ON_S_FAILURE=1

- run: sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0 net.ipv6.conf.default.disable_ipv6=0 net.ipv6.conf.all.disable_ipv6=0
- run: rm -rf "$HOME/.go_workspace/src/$IMPORT_PATH"
- run: mkdir -p "$HOME/.go_workspace/src/$IMPORT_PATH"
- run: cp -aT . "$HOME/.go_workspace/src/$IMPORT_PATH"
- run: cd "$HOME/.go_workspace/src/$IMPORT_PATH" && make deps
- run:
when: always
command: bash <(curl -s https://codecov.io/bash) -cF sharness -X search -f coverage/sharness_tests.coverprofile

- save_cache:
key: v1-dep-{{ .Branch }}-{{ epoch }}
paths:
- ~/.go_workspace
- ~/go1.11.linux-amd64.tar.gz
- ~/.go_workspace/src/gx/ipfs
- ./node_modules
- run: mv "test/sharness/test-results/sharness.xml" /tmp/circleci-test-results/sharness
# make sure we fail if there are test failures
- run: find test/sharness/test-results -name 't*-*.sh.*.counts' | test/sharness/lib/sharness/aggregate-results.sh | grep 'failed\s*0'

- run: cd "$HOME/.go_workspace/src/$IMPORT_PATH" && curl -s https://codecov.io/bash > codecov
- run: cd "$HOME/.go_workspace/src/$IMPORT_PATH" && make -j 10 coverage/sharness_tests.coverprofile test/sharness/test-results/sharness.xml TEST_GENERATE_JUNIT=1 CONTINUE_ON_S_FAILURE=1
- run: cd "$HOME/.go_workspace/src/$IMPORT_PATH" && bash codecov -cF sharness -X search -f coverage/sharness_tests.coverprofile
- run: mv "$HOME/.go_workspace/src/${IMPORT_PATH}/test/sharness/test-results/sharness.xml" /tmp/circleci-test-results
- *store_gomod

# make sure we fail if there are test failures
- run: cd "$HOME/.go_workspace/src/$IMPORT_PATH" && ls test/sharness/test-results/t*-*.sh.*.counts | test/sharness/lib/sharness/aggregate-results.sh | grep 'failed\s*0'
- store_test_results:
path: /tmp/circleci-test-results
# Save artifacts
Expand Down
1 change: 0 additions & 1 deletion .gx/lastpubver

This file was deleted.

30 changes: 0 additions & 30 deletions .travis.yml

This file was deleted.

6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# go-ipfs changelog

## 0.4.19 2018-02-14 (unreleased)
## 0.4.19 2018-03-01

We're happy to announce go 0.4.19. This release contains a bunch of important
fixes and a slew of new and improved features. Get pumped and upgrade ASAP to benefit from all the new goodies! 🎁
Expand Down Expand Up @@ -220,6 +220,10 @@ _delete_ any un-synced data on start instead of simply refusing to start. This
should be safe on all filesystems where the `sync` operation is safe and removes
the need for manual intervention when restarting an IPFS node after a crash.

Assuming you initialized your badger repo with `ipfs init --profile=badgerds`,
you can enable truncate on an existing repo by running: `ipfs config --json
"Datastore.Spec.child.truncate" true`.

### Refactors and Endeavors

#### 🕹 Commands Library
Expand Down
5 changes: 1 addition & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,12 @@ EXPOSE 8080
# Swarm Websockets; must be exposed publicly when the node is listening using the websocket transport (/ipX/.../tcp/8081/ws).
EXPOSE 8081

# Create the fs-repo directory
# Create the fs-repo directory and switch to a non-privileged user.
ENV IPFS_PATH /data/ipfs
RUN mkdir -p $IPFS_PATH \
&& adduser -D -h $IPFS_PATH -u 1000 -G users ipfs \
&& chown ipfs:users $IPFS_PATH

# Switch to a non-privileged user
USER ipfs

# Expose the fs-repo as a volume.
# start_ipfs initializes an fs-repo if none is mounted.
# Important this happens after the USER directive so permission are correct.
Expand Down
6 changes: 1 addition & 5 deletions Dockerfile.fast
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,14 @@ EXPOSE 5001
EXPOSE 8080
EXPOSE 8081

# Create the fs-repo directory
# Create the fs-repo directory and switch to a non-privileged user.
ENV IPFS_PATH /data/ipfs
RUN mkdir -p $IPFS_PATH \
&& useradd -s /usr/sbin/nologin -d $IPFS_PATH -u 1000 -G users ipfs \
&& chown ipfs:users $IPFS_PATH

# Switch to a non-privileged user
USER ipfs

# Expose the fs-repo as a volume.
# start_ipfs initializes an fs-repo if none is mounted.
# Important this happens after the USER directive so permission are correct.
VOLUME $IPFS_PATH

# The default logging level
Expand Down
20 changes: 7 additions & 13 deletions Rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ include mk/git.mk # has to be before tarball.mk
include mk/tarball.mk
include mk/util.mk
include mk/golang.mk
include mk/gx.mk

# -------------------- #
# extra properties #
Expand Down Expand Up @@ -86,7 +85,7 @@ test: $(TEST)
test_short: $(TEST_SHORT)
.PHONY: test_short

deps: gx-deps
deps:
.PHONY: deps

nofuse: GOTAGS += nofuse
Expand All @@ -96,17 +95,12 @@ nofuse: build
install: cmd/ipfs-install
.PHONY: install

install_unsupported:
@echo "note: this command has yet to be tested to build in the system you are using"
@echo "installing gx"
go get -v -u github.com/whyrusleeping/gx
go get -v -u github.com/whyrusleeping/gx-go
@echo check gx and gx-go
gx -v && gx-go -v
@echo downloading dependencies
gx install --global
@echo "installing go-ipfs"
go install -v -tags nofuse ./cmd/ipfs
install_unsupported: install
@echo "/=======================================================================\\"
@echo '| |'
@echo '| `make install_unsupported` is deprecated, use `make install` instead. |'
@echo '| |'
@echo "\\=======================================================================/"
.PHONY: install_unsupported

uninstall:
Expand Down
2 changes: 1 addition & 1 deletion assets/assets.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"github.com/ipsn/go-ipfs/core"
"github.com/ipsn/go-ipfs/core/coreapi"

files "github.com/ipsn/go-ipfs/gxlibs/github.com/ipfs/go-ipfs-files"
cid "github.com/ipsn/go-ipfs/gxlibs/github.com/ipfs/go-cid"
files "github.com/ipsn/go-ipfs/gxlibs/github.com/ipfs/go-ipfs-files"
iface "github.com/ipsn/go-ipfs/gxlibs/github.com/ipfs/interface-go-ipfs-core"
options "github.com/ipsn/go-ipfs/gxlibs/github.com/ipfs/interface-go-ipfs-core/options"

Expand Down
11 changes: 0 additions & 11 deletions bin/Rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ include mk/header.mk

dist_root_$(d)="/ipfs/QmPrXH9jRVwvd7r5MC5e6nV4uauQGzLk1i2647Ye9Vbbwe"

$(d)/gx: $(d)/gx-v0.14.0
$(d)/gx-go: $(d)/gx-go-v1.9.0

TGTS_$(d) := $(d)/gx $(d)/gx-go
DISTCLEAN += $(wildcard $(d)/gx-v*) $(wildcard $(d)/gx-go-v*) $(d)/tmp

Expand All @@ -18,13 +15,5 @@ else
ln -s $(notdir $^) $@
endif

bin/gx-v%:
@echo "installing gx $(@:bin/gx-%=%)"
bin/dist_get $(dist_root_bin) gx $@ $(@:bin/gx-%=%)

bin/gx-go-v%:
@echo "installing gx-go $(@:bin/gx-go-%=%)"
@bin/dist_get $(dist_root_bin) gx-go $@ $(@:bin/gx-go-%=%)

CLEAN += $(TGTS_$(d))
include mk/footer.mk
30 changes: 0 additions & 30 deletions bin/check_go_path

This file was deleted.

46 changes: 0 additions & 46 deletions bin/check_gx_program

This file was deleted.

Loading

0 comments on commit 1b76f00

Please sign in to comment.