Skip to content

Commit

Permalink
Merge pull request #9023 from ipfs/release-v0.13.0
Browse files Browse the repository at this point in the history
Release v0.13.0
  • Loading branch information
guseggert authored Jun 9, 2022
2 parents 0e8b121 + 3b88b44 commit c9d51bb
Show file tree
Hide file tree
Showing 298 changed files with 14,368 additions and 2,984 deletions.
53 changes: 37 additions & 16 deletions .circleci/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@ default_environment: &default_environment
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
GIT_PAGER: cat
IPFS_CHECK_RCMGR_DEFAULTS: 1

executors:
golang:
docker:
- image: cimg/go:1.16.15
- image: cimg/go:1.18.3
working_directory: ~/ipfs/go-ipfs
environment:
<<: *default_environment
Expand All @@ -61,14 +62,15 @@ executors:
E2E_IPFSD_TYPE: go
dockerizer:
docker:
- image: cimg/go:1.16.15
- image: cimg/go:1.18.3
environment:
IMAGE_NAME: ipfs/go-ipfs
WIP_IMAGE_TAG: wip

jobs:
gobuild:
executor: golang
resource_class: 2xlarge+
steps:
- checkout
- *make_out_dirs
Expand Down Expand Up @@ -106,7 +108,10 @@ jobs:
command: bash <(curl -s https://codecov.io/bash) -cF unittests -X search -f coverage/unit_tests.coverprofile
- run:
command: |
# we want to test the examples against the current version of go-ipfs
# we want to first test with the go-ipfs in the go.mod file
go test -v ./...
# we also want to test the examples against the current version of go-ipfs
# however, that version might be in a fork so we need to replace the dependency
# backup the go.mod and go.sum files to restore them after we run the tests
Expand All @@ -116,11 +121,18 @@ jobs:
# make sure the examples run against the current version of go-ipfs
go mod edit -replace github.com/ipfs/go-ipfs=./../../..
go mod tidy
# use the internal config package when we test the current version of go-ipfs
sed -i.bak 's;"github.com/ipfs/go-ipfs-config";"github.com/ipfs/go-ipfs/config";' ./main.go
go test -v ./...
# restore the go.mod and go.sum files to their original state
mv go.mod.bak go.mod
mv go.sum.bak go.sum
# restore the main.go to its original state
mv main.go.bak main.go
working_directory: ~/ipfs/go-ipfs/docs/examples/go-ipfs-as-a-library

- run:
Expand All @@ -143,15 +155,15 @@ jobs:
working_directory: ~/ipfs/go-ipfs
environment:
<<: *default_environment
TEST_NO_DOCKER: 1
TEST_NO_DOCKER: 0
TEST_NO_FUSE: 1
TEST_VERBOSE: 1
steps:
- run: sudo apt update
- run: |
mkdir ~/localgo && cd ~/localgo
wget https://golang.org/dl/go1.16.15.linux-amd64.tar.gz
tar xfz go1.16.15.linux-amd64.tar.gz
wget https://golang.org/dl/go1.18.3.linux-amd64.tar.gz
tar xfz go1.18.3.linux-amd64.tar.gz
echo "export PATH=$(pwd)/go/bin:\$PATH" >> ~/.bashrc
- run: go version
- run: sudo apt install socat net-tools
Expand All @@ -166,7 +178,7 @@ jobs:
git checkout FETCH_HEAD
- run:
cd rb-pinning-service-api &&
docker-compose pull &&
(for i in {1..3}; do docker-compose pull && break || sleep 5; done) &&
docker-compose up -d

- *make_out_dirs
Expand Down Expand Up @@ -217,33 +229,43 @@ jobs:
- *store_gomod
interop:
docker:
- image: cimg/go:1.16-node
- image: cimg/go:1.18.3-node
parallelism: 4
resource_class: large
steps:
- *make_out_dirs
- attach_workspace:
at: /tmp/circleci-workspace
- restore_cache:
keys:
- v1-interop-{{ .Branch }}-{{ .Revision }}
- v1-interop-{{ .Branch }}-
- v1-interop-
- run:
name: Installing dependencies
command: |
npm init -y
npm install ipfs@^0.61.0
npm install ipfs-interop@^8.0.0
npm install ipfs-interop@^8.0.10
npm install [email protected]
working_directory: ~/ipfs/go-ipfs/interop
- run:
name: Running tests
command: |
mkdir -p /tmp/test-results/interop/
export MOCHA_FILE="$(mktemp /tmp/test-results/interop/unit.XXXXXX.xml)"
npx ipfs-interop -- -t node -f $(sed -n -e "s|^require('\(.*\)')$|test/\1|p" node_modules/ipfs-interop/test/node.js | circleci tests split) -- --reporter mocha-circleci-reporter
npx ipfs-interop -- -t node -f $(sed -n -e "s|^import '\(.*\)'$|test/\1|p" node_modules/ipfs-interop/test/node.js | circleci tests split --split-by=timings) -- --reporter mocha-circleci-reporter
working_directory: ~/ipfs/go-ipfs/interop
environment:
LIBP2P_TCP_REUSEPORT: false
LIBP2P_ALLOW_WEAK_RSA_KEYS: 1
IPFS_GO_EXEC: /tmp/circleci-workspace/bin/ipfs
- store_test_results:
path: /tmp/test-results
- save_cache:
key: v1-interop-{{ .Branch }}-{{ .Revision }}
paths:
- ~/ipfs/go-ipfs/interop/node_modules
go-ipfs-api:
executor: golang
steps:
Expand Down Expand Up @@ -271,7 +293,7 @@ jobs:
- v1-go-api-{{ checksum "~/ipfs/go-ipfs/go-ipfs-api/go.sum" }}
- v1-go-api-
- run:
command: go test -v ./...
command: go test -count=1 -v ./...
working_directory: ~/ipfs/go-ipfs/go-ipfs-api
- save_cache:
key: v1-go-api-{{ checksum "~/ipfs/go-ipfs/go-ipfs-api/go.sum" }}
Expand All @@ -292,18 +314,15 @@ jobs:
command: |
git clone https://github.com/ipfs/go-ipfs-http-client.git
git -C go-ipfs-http-client log -1
cd go-ipfs-http-client
git checkout v0.2.0
cd ..
- restore_cache:
keys:
- v1-http-client-{{ checksum "~/ipfs/go-ipfs/go-ipfs-http-client/go.sum" }}
- v1-http-client-
- run:
name: go test -v ./...
name: go test -count=1 -v ./...
command: |
export PATH=/tmp/circleci-workspace/bin:$PATH
go test -v ./...
go test -count=1 -v ./...
working_directory: ~/ipfs/go-ipfs/go-ipfs-http-client
- save_cache:
key: v1-http-client-{{ checksum "~/ipfs/go-ipfs/go-ipfs-http-client/go.sum" }}
Expand All @@ -329,6 +348,7 @@ jobs:
name: Installing dependencies
command: |
npm install
npx playwright install
working_directory: ~/ipfs/go-ipfs/ipfs-webui
- run:
name: Running upstream tests (finish early if they fail)
Expand All @@ -344,6 +364,7 @@ jobs:
- save_cache:
key: v1-ipfs-webui-{{ checksum "~/ipfs/go-ipfs/ipfs-webui/package-lock.json" }}
paths:
- ~/.cache/ms-playwright
- ~/ipfs/go-ipfs/ipfs-webui/node_modules
# We only run build as a test here. DockerHub images are built and published
# by Github Action now: https://github.com/ipfs/go-ipfs/pull/8467
Expand Down
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Dockerfile.fast
!.git/refs/
!.git/packed-refs
test/sharness/lib/sharness/
test/sharness/trash*
rb-pinning-service-api/

# The Docker client might not be running on Linux
# so delete any compiled binaries
Expand Down
7 changes: 7 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Code owners are automatically requested for review when someone opens a pull
# request that modifies code that they own. Code owners are not automatically
# requested to review draft pull requests.

# HTTP Gateway
core/corehttp/ @lidel
test/sharness/*gateway*.sh @lidel
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ contact_links:
url: https://ipfs.io/help
about: All information about how and where to get help on IPFS.
- name: Go-ipfs configuration reference
url: https://github.com/ipfs/go-ipfs/blob/master/docs/config.md
url: https://github.com/ipfs/go-ipfs/blob/master/docs/config.md#readme
about: Documentation on the different configuration settings
- name: Go-ipfs experimental features docs
url: https://github.com/ipfs/go-ipfs/blob/master/docs/experimental-features.md
url: https://github.com/ipfs/go-ipfs/blob/master/docs/experimental-features.md#readme
about: Documentation on Private Networks, Filestore and other experimental features.
- name: HTTP API Reference
url: https://docs.ipfs.io/reference/http/api/#api-v0-add
about: Documentation of all go-ipfs HTTP API endpoints.
- name: RPC API Reference
url: https://docs.ipfs.io/reference/http/api/
about: Documentation of all go-ipfs RPC API endpoints.
- name: IPFS Official Forum
url: https://discuss.ipfs.io
about: Please post general questions, support requests, and discussions here.
2 changes: 2 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: "CodeQL"

on:
workflow_dispatch:
push:
branches: [ master ]
pull_request:
Expand All @@ -12,6 +13,7 @@ on:

jobs:
analyze:
if: github.repository == 'ipfs/go-ipfs' || github.event_name == 'workflow_dispatch'
name: Analyze
runs-on: ubuntu-latest

Expand Down
28 changes: 22 additions & 6 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,40 @@ on:

jobs:
push_to_registry:
if: github.repository == 'ipfs/go-ipfs' || github.event_name == 'workflow_dispatch'
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
env:
IMAGE_NAME: ipfs/go-ipfs
WIP_IMAGE_TAG: wip
steps:
- name: Check out the repo
uses: actions/checkout@v2

- name: Build wip Docker image
run: docker build -t $IMAGE_NAME:$WIP_IMAGE_TAG .
- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Get tags
id: tags
run: |
TAGS="$(./bin/get-docker-tags.sh $(date -u +%F))"
TAGS="${TAGS//$'\n'/'%0A'}"
echo "::set-output name=value::$(echo $TAGS)"
shell: bash

- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Publish Docker Image to Docker Hub
run: ./bin/push-docker-tags.sh $(date -u +%F)

- name: Build Docker image and publish to Docker Hub
uses: docker/build-push-action@v2
with:
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8
context: .
push: true
file: ./Dockerfile
tags: "${{ steps.tags.outputs.value }}"
37 changes: 37 additions & 0 deletions .github/workflows/golang-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
on: [push, pull_request]
name: Go Checks

jobs:
unit:
runs-on: ubuntu-latest
name: All
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/setup-go@v2
with:
go-version: "1.18.x"
- name: Check that go.mod is tidy
uses: protocol/[email protected]
with:
run: |
go mod tidy
if [[ -n $(git ls-files --other --exclude-standard --directory -- go.sum) ]]; then
echo "go.sum was added by go mod tidy"
exit 1
fi
git diff --exit-code -- go.sum go.mod
- name: gofmt
if: always() # run this step even if the previous one failed
run: |
out=$(gofmt -s -l .)
if [[ -n "$out" ]]; then
echo $out | awk '{print "::error file=" $0 ",line=0,col=0::File is not gofmt-ed."}'
exit 1
fi
- name: go vet
if: always() # run this step even if the previous one failed
uses: protocol/[email protected]
with:
run: go vet ./...
35 changes: 4 additions & 31 deletions .github/workflows/sync-release-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,40 +11,13 @@ concurrency:

jobs:
sync-github-and-dist-ipfs-io:
if: github.repository == 'ipfs/go-ipfs' || github.event_name == 'workflow_dispatch'
runs-on: "ubuntu-latest"
steps:
- name: Setup go
uses: actions/setup-go@v2
- uses: ipfs/download-ipfs-distribution-action@v1
- uses: ipfs/start-ipfs-daemon-action@v1
with:
go-version: '1.16'
- uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build go-ipfs binary
run: go install github.com/ipfs/go-ipfs/cmd/ipfs@latest
- name: Initialize go-ipfs and start daemon
run: |
sudo sysctl -w net.core.rmem_max=2500000
ipfs init --profile flatfs,server
ipfs daemon --enable-gc=false &
while (! ipfs id --api "/ip4/127.0.0.1/tcp/5001"); do sleep 1; done
- name: Wait for go-ipfs to be ready
shell: pwsh
run: |
for ($i = 0; $i -lt 10; $i++) {
$addrs = ipfs id | jq .Addresses;
if ($addrs -eq "null") {
sleep 1
} else {
echo "Successfully started the daemon"
exit 0
}
}
args: --init --init-profile=flatfs,server --enable-gc=false
- uses: actions/setup-node@v2
with:
node-version: 14
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/testground-on-push.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
---
name: Testground PR Checker

on: [push]
on:
workflow_dispatch:
push:


jobs:
testground:
if: github.repository == 'ipfs/go-ipfs' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
name: ${{ matrix.composition_file }}
strategy:
Expand All @@ -25,7 +29,8 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: testground run
uses: coryschwartz/[email protected]
uses: testground/testground-github-action@v1
timeout-minutes: 5
with:
backend_addr: ${{ matrix.backend_addr }}
backend_proto: ${{ matrix.backend_proto }}
Expand Down
Loading

0 comments on commit c9d51bb

Please sign in to comment.