Skip to content

Commit

Permalink
Merge branch 'master' into process-improvement-v0.18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
galargh authored Mar 21, 2023
2 parents 30fdc9c + e0b08ed commit 1d79766
Show file tree
Hide file tree
Showing 114 changed files with 2,807 additions and 1,940 deletions.
2 changes: 1 addition & 1 deletion .circleci/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ jobs:
- run:
name: Cloning
command: |
git clone https://github.com/ipfs/go-ipfs-http-client.git
git clone https://github.com/ipfs/go-ipfs-http-client.git -b bump-for-rcmgr-last-push
git -C go-ipfs-http-client log -1
- restore_cache:
keys:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
prepare:
if: github.repository == 'ipfs/kubo' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
timeout-minutes: 5
env:
TEST_NO_DOCKER: 1
TEST_NO_FUSE: 1
Expand All @@ -40,12 +41,7 @@ jobs:
ipfs-interop:
needs: [prepare]
runs-on: ubuntu-latest
strategy:
matrix:
suites:
- 'exchange-files'
- 'files pin circuit ipns cid-version-agnostic ipns-pubsub pubsub'
fail-fast: false
timeout-minutes: 20
defaults:
run:
shell: bash
Expand Down Expand Up @@ -74,7 +70,7 @@ jobs:
npm install kubo-rpc-client@^3.0.1
npm install ipfs-interop@^10.0.1
working-directory: interop
- run: npx ipfs-interop -- -t node $(sed -e 's#[^ ]*#-f test/&.js#g' <<< '${{ matrix.suites }}')
- run: npx ipfs-interop -- -t node
env:
LIBP2P_TCP_REUSEPORT: false
LIBP2P_ALLOW_WEAK_RSA_KEYS: 1
Expand All @@ -83,6 +79,7 @@ jobs:
go-ipfs-api:
needs: [prepare]
runs-on: ubuntu-latest
timeout-minutes: 5
env:
TEST_NO_DOCKER: 1
TEST_NO_FUSE: 1
Expand Down Expand Up @@ -122,6 +119,7 @@ jobs:
go-ipfs-http-client:
needs: [prepare]
runs-on: ubuntu-latest
timeout-minutes: 5
env:
TEST_NO_DOCKER: 1
TEST_NO_FUSE: 1
Expand All @@ -145,6 +143,7 @@ jobs:
with:
repository: ipfs/go-ipfs-http-client
path: go-ipfs-http-client
ref: bump-for-rcmgr-last-push
- uses: protocol/cache-go-action@v1
with:
name: ${{ github.job }}
Expand All @@ -154,6 +153,7 @@ jobs:
ipfs-webui:
needs: [prepare]
runs-on: ubuntu-latest
timeout-minutes: 20
env:
NO_SANDBOX: true
LIBP2P_TCP_REUSEPORT: false
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,16 @@ on:
schedule:
- cron: '30 12 * * 2'

permissions:
contents: read # to fetch code (actions/checkout)
security-events: write # (github/codeql-action/autobuild)

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

strategy:
fail-fast: false
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
docker-build:
if: github.repository == 'ipfs/kubo' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
timeout-minutes: 10
env:
IMAGE_NAME: ipfs/kubo
WIP_IMAGE_TAG: wip
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@ on:
tags:
- 'v*'

permissions:
contents: read # to fetch code (actions/checkout)

jobs:
push_to_registry:
if: github.repository == 'ipfs/kubo' || github.event_name == 'workflow_dispatch'
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
timeout-minutes: 90
env:
IMAGE_NAME: ipfs/kubo
LEGACY_IMAGE_NAME: ipfs/go-ipfs
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/gobuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
gobuild:
needs: [runner]
runs-on: ${{ fromJSON(needs.runner.outputs.config).labels }}
timeout-minutes: 20
env:
TEST_NO_DOCKER: 1
TEST_VERBOSE: 1
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/golang-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ on:
branches:
- 'master'

permissions:
contents: read # to fetch code (actions/checkout)

jobs:
unit:
if: github.repository == 'ipfs/kubo' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
timeout-minutes: 10
name: All
steps:
- uses: actions/checkout@v2
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/golint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
golint:
if: github.repository == 'ipfs/kubo' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
timeout-minutes: 10
env:
TEST_NO_DOCKER: 1
TEST_NO_FUSE: 1
Expand Down
55 changes: 46 additions & 9 deletions .github/workflows/gotest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
gotest:
if: github.repository == 'ipfs/kubo' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
timeout-minutes: 20
env:
TEST_NO_DOCKER: 1
TEST_NO_FUSE: 1
Expand All @@ -22,22 +23,28 @@ jobs:
run:
shell: bash
steps:
- uses: actions/setup-go@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19.1
- uses: actions/checkout@v3
- uses: protocol/cache-go-action@v1
- name: Check out Kubo
uses: actions/checkout@v3
- name: Restore Go cache
uses: protocol/cache-go-action@v1
with:
name: ${{ github.job }}
- run: |
- name: 👉️ If this step failed, go to «Summary» (top left) → inspect the «Failures/Errors» table
run: |
make -j 1 test/unit/gotest.junit.xml &&
[[ ! $(jq -s -c 'map(select(.Action == "fail")) | .[]' test/unit/gotest.json) ]]
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
if: always()
- name: Upload coverage to Codecov
uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
if: failure() || success()
with:
name: unittests
files: coverage/unit_tests.coverprofile
- run: |
- name: Test kubo-as-a-library example
run: |
# we want to first test with the kubo version in the go.mod file
go test -v ./...
Expand All @@ -58,8 +65,38 @@ jobs:
mv go.mod.bak go.mod
mv go.sum.bak go.sum
working-directory: docs/examples/kubo-as-a-library
- uses: actions/upload-artifact@v3
- name: Create a proper JUnit XML report
uses: pl-strflt/gotest-json-to-junit-xml@v1
with:
input: test/unit/gotest.json
output: test/unit/gotest.junit.xml
if: failure() || success()
- name: Archive the JUnit XML report
uses: actions/upload-artifact@v3
with:
name: unit
path: test/unit/gotest.junit.xml
if: always()
if: failure() || success()
- name: Create a HTML report
uses: pl-strflt/junit-xml-to-html@v1
with:
mode: no-frames
input: test/unit/gotest.junit.xml
output: test/unit/gotest.html
if: failure() || success()
- name: Archive the HTML report
uses: actions/upload-artifact@v3
with:
name: html
path: test/unit/gotest.html
if: failure() || success()
- name: Create a Markdown report
uses: pl-strflt/junit-xml-to-html@v1
with:
mode: summary
input: test/unit/gotest.junit.xml
output: test/unit/gotest.md
if: failure() || success()
- name: Set the summary
run: cat test/unit/gotest.md >> $GITHUB_STEP_SUMMARY
if: failure() || success()
1 change: 1 addition & 0 deletions .github/workflows/runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
jobs:
choose:
runs-on: ubuntu-latest
timeout-minutes: 1
outputs:
config: ${{ steps.config.outputs.result }}
steps:
Expand Down
19 changes: 16 additions & 3 deletions .github/workflows/sharness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
sharness:
needs: [runner]
runs-on: ${{ fromJSON(needs.runner.outputs.config).labels }}
timeout-minutes: 20
defaults:
run:
shell: bash
Expand Down Expand Up @@ -55,9 +56,7 @@ jobs:
make -O -j "$PARALLEL" \
test_sharness \
coverage/sharness_tests.coverprofile \
test/sharness/test-results/sharness.xml \
test/sharness/test-results/sharness.html \
test/sharness/test-results/sharness-html
test/sharness/test-results/sharness.xml
working-directory: kubo
env:
TEST_NO_DOCKER: 0
Expand Down Expand Up @@ -87,6 +86,13 @@ jobs:
echo "# Summary" >> $GITHUB_STEP_SUMMARY
echo >> $GITHUB_STEP_SUMMARY
cat kubo/test/sharness/test-results/summary.txt >> $GITHUB_STEP_SUMMARY
- name: Generate one-page HTML report
uses: pl-strflt/junit-xml-to-html@v1
if: failure() || success()
with:
mode: no-frames
input: kubo/test/sharness/test-results/sharness.xml
output: kubo/test/sharness/test-results/sharness.html
- name: Upload one-page HTML report to S3
id: one-page
uses: pl-strflt/tf-aws-gh-runner/.github/actions/upload-artifact@main
Expand All @@ -100,6 +106,13 @@ jobs:
with:
name: sharness.html
path: kubo/test/sharness/test-results/sharness.html
- name: Generate full HTML report
uses: pl-strflt/junit-xml-to-html@v1
if: failure() || success()
with:
mode: frames
input: kubo/test/sharness/test-results/sharness.xml
output: kubo/test/sharness/test-results/sharness-html
- name: Upload full HTML report to S3
id: full
uses: pl-strflt/tf-aws-gh-runner/.github/actions/upload-artifact@main
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/sync-release-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ concurrency:
group: release-assets-dist-sync
cancel-in-progress: true

permissions:
contents: write # to upload release asset

jobs:
sync-github-and-dist-ipfs-tech:
if: github.repository == 'ipfs/kubo' || github.event_name == 'workflow_dispatch'
runs-on: "ubuntu-latest"
timeout-minutes: 5
steps:
- uses: ipfs/download-ipfs-distribution-action@v1
- uses: ipfs/start-ipfs-daemon-action@v1
Expand Down
38 changes: 0 additions & 38 deletions .github/workflows/testground-on-push.yml

This file was deleted.

1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Kubo Changelogs

- [v0.20](docs/changelogs/v0.20.md)
- [v0.19](docs/changelogs/v0.19.md)
- [v0.18](docs/changelogs/v0.18.md)
- [v0.17](docs/changelogs/v0.17.md)
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Kubo was the first IPFS implementation and is the most widely used one today. Im
Featureset
- Runs an IPFS-Node as a network service
- [Command Line Interface](https://docs.ipfs.tech/reference/kubo/cli/) to IPFS-Nodes
- Local [Web2-to-Web3 HTTP Gateway functionality](https://github.com/ipfs/specs/tree/main/http-gateways#readme)
- Local [Web2-to-Web3 HTTP Gateway functionality](https://github.com/ipfs/specs/tree/main/http-gateways#readme)
- HTTP RPC API (`/api/v0`) to access and control the daemon
- IPFS's internal Webgui can be used to manage the Kubo nodes

Expand Down Expand Up @@ -381,7 +381,6 @@ Some places to get you started on the codebase:
- libp2p
- libp2p: https://github.com/libp2p/go-libp2p
- DHT: https://github.com/libp2p/go-libp2p-kad-dht
- PubSub: https://github.com/libp2p/go-libp2p-pubsub
- [IPFS : The `Add` command demystified](https://github.com/ipfs/kubo/tree/master/docs/add-code-flow.md)

### Map of Implemented Subsystems
Expand Down
2 changes: 1 addition & 1 deletion Rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ help:
@echo ' all - print this help message'
@echo ' build - Build binary at ./cmd/ipfs/ipfs'
@echo ' nofuse - Build binary with no fuse support'
@echo ' install - Build binary and install into $$GOPATH/bin'
@echo ' install - Build binary and install into $$GOBIN'
# @echo ' dist_install - TODO: c.f. ./cmd/ipfs/dist/README.md'
@echo ''
@echo 'CLEANING TARGETS:'
Expand Down
Loading

0 comments on commit 1d79766

Please sign in to comment.