Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/build-platforms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Build platforms configuration for Kubo
# Matches https://github.com/ipfs/distributions/blob/master/dists/kubo/build_matrix
# plus linux-riscv64 for emerging architecture support
#
# The Go compiler handles FUSE support automatically via build tags.
# Platforms are simply listed - no need to specify FUSE capability.

platforms:
- darwin-amd64
- darwin-arm64
- freebsd-amd64
- linux-amd64
- linux-arm64
- linux-riscv64
- openbsd-amd64
- windows-amd64
- windows-arm64
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version: 1.25.x
go-version-file: 'go.mod'

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
26 changes: 12 additions & 14 deletions .github/workflows/gateway-conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,16 @@ jobs:
output: fixtures

# 2. Build the kubo-gateway
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version: 1.25.x
- uses: protocol/cache-go-action@v1
with:
name: ${{ github.job }}
- name: Checkout kubo-gateway
uses: actions/checkout@v5
with:
path: kubo-gateway
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version-file: 'kubo-gateway/go.mod'
cache: true
cache-dependency-path: kubo-gateway/go.sum
- name: Build kubo-gateway
run: make build
working-directory: kubo-gateway
Expand Down Expand Up @@ -133,17 +132,16 @@ jobs:
output: fixtures

# 2. Build the kubo-gateway
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version: 1.25.x
- uses: protocol/cache-go-action@v1
with:
name: ${{ github.job }}
- name: Checkout kubo-gateway
uses: actions/checkout@v5
with:
path: kubo-gateway
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version-file: 'kubo-gateway/go.mod'
cache: true
cache-dependency-path: kubo-gateway/go.sum
- name: Build kubo-gateway
run: make build
working-directory: kubo-gateway
Expand Down
36 changes: 27 additions & 9 deletions .github/workflows/gobuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,38 @@ jobs:
env:
TEST_DOCKER: 0
TEST_VERBOSE: 1
TRAVIS: 1
GIT_PAGER: cat
IPFS_CHECK_RCMGR_DEFAULTS: 1
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
with:
go-version: 1.25.x
- uses: actions/checkout@v5
- run: make cmd/ipfs-try-build
env:
TEST_FUSE: 1
- run: make cmd/ipfs-try-build
env:
TEST_FUSE: 0
go-version-file: 'go.mod'
cache: true
cache-dependency-path: go.sum

- name: Build all platforms
run: |
# Read platforms from build-platforms.yml and build each one
echo "Building kubo for all platforms..."

# Read and build each platform
grep '^ - ' .github/build-platforms.yml | sed 's/^ - //' | while read -r platform; do
if [ -z "$platform" ]; then
continue
fi

echo "::group::Building $platform"
GOOS=$(echo "$platform" | cut -d- -f1)
GOARCH=$(echo "$platform" | cut -d- -f2)

echo "Building $platform"
echo " GOOS=$GOOS GOARCH=$GOARCH go build -o /dev/null ./cmd/ipfs"
GOOS=$GOOS GOARCH=$GOARCH go build -o /dev/null ./cmd/ipfs
echo "::endgroup::"
done

echo "All platforms built successfully"
2 changes: 1 addition & 1 deletion .github/workflows/golang-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
submodules: recursive
- uses: actions/setup-go@v6
with:
go-version: "1.25.x"
go-version-file: 'go.mod'
- name: Check that go.mod is tidy
uses: protocol/[email protected]
with:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/golint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,14 @@ jobs:
TEST_DOCKER: 0
TEST_FUSE: 0
TEST_VERBOSE: 1
TRAVIS: 1
GIT_PAGER: cat
IPFS_CHECK_RCMGR_DEFAULTS: 1
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
with:
go-version: 1.25.x
- uses: actions/checkout@v5
go-version-file: 'go.mod'
- run: make -O test_go_lint
7 changes: 3 additions & 4 deletions .github/workflows/gotest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,18 @@ jobs:
TEST_DOCKER: 0
TEST_FUSE: 0
TEST_VERBOSE: 1
TRAVIS: 1
GIT_PAGER: cat
IPFS_CHECK_RCMGR_DEFAULTS: 1
defaults:
run:
shell: bash
steps:
- name: Check out Kubo
uses: actions/checkout@v5
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: 1.25.x
- name: Check out Kubo
uses: actions/checkout@v5
go-version-file: 'go.mod'
- name: Install missing tools
run: sudo apt update && sudo apt install -y zsh
- name: 👉️ If this step failed, go to «Summary» (top left) → inspect the «Failures/Errors» table
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/interop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ on:
branches:
- 'master'

env:
GO_VERSION: 1.25.x

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'push' && github.sha || github.ref }}
cancel-in-progress: true
Expand All @@ -29,17 +26,16 @@ jobs:
TEST_DOCKER: 0
TEST_FUSE: 0
TEST_VERBOSE: 1
TRAVIS: 1
GIT_PAGER: cat
IPFS_CHECK_RCMGR_DEFAULTS: 1
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
with:
go-version: ${{ env.GO_VERSION }}
- uses: actions/checkout@v5
go-version-file: 'go.mod'
- run: make build
- uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -82,7 +78,6 @@ jobs:
LIBP2P_TCP_REUSEPORT: false
LIBP2P_ALLOW_WEAK_RSA_KEYS: 1
E2E_IPFSD_TYPE: go
TRAVIS: 1
GIT_PAGER: cat
IPFS_CHECK_RCMGR_DEFAULTS: 1
defaults:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/sharness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ jobs:
run:
shell: bash
steps:
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version: 1.25.x
- name: Checkout Kubo
uses: actions/checkout@v5
with:
path: kubo
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version-file: 'kubo/go.mod'
- name: Install missing tools
run: sudo apt update && sudo apt install -y socat net-tools fish libxml2-utils
- uses: actions/cache@v4
Expand Down
7 changes: 4 additions & 3 deletions Rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ uninstall:
.PHONY: uninstall

supported:
@echo "Currently supported platforms:"
@for p in ${SUPPORTED_PLATFORMS}; do echo $$p; done
@echo "Currently supported platforms (from .github/build-platforms.yml):"
@grep '^ - ' .github/build-platforms.yml | sed 's/^ - //' || (echo "Error: .github/build-platforms.yml not found"; exit 1)
.PHONY: supported

help:
Expand Down Expand Up @@ -138,7 +138,8 @@ help:
@echo ' test_short - Run short go tests and short sharness tests'
@echo ' test_go_short - Run short go tests'
@echo ' test_go_test - Run all go tests'
@echo ' test_go_expensive - Run all go tests and compile on all platforms'
@echo ' test_go_build - Build kubo for all platforms from .github/build-platforms.yml'
@echo ' test_go_expensive - Run all go tests and build all platforms'
@echo ' test_go_race - Run go tests with the race detector enabled'
@echo ' test_go_lint - Run the `golangci-lint` vetting tool'
@echo ' test_sharness - Run sharness tests'
Expand Down
49 changes: 0 additions & 49 deletions appveyor.yml

This file was deleted.

24 changes: 24 additions & 0 deletions bin/test-go-build-platforms
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
set -e

echo "Building kubo for all platforms in .github/build-platforms.yml..."

if [ ! -f .github/build-platforms.yml ]; then
echo "Error: .github/build-platforms.yml not found"
exit 1
fi

grep '^ - ' .github/build-platforms.yml | sed 's/^ - //' | while read -r platform; do
if [ -z "$platform" ]; then
continue
fi

GOOS=$(echo "$platform" | cut -d- -f1)
GOARCH=$(echo "$platform" | cut -d- -f2)

echo "Building $platform..."
echo " GOOS=$GOOS GOARCH=$GOARCH go build -o /dev/null ./cmd/ipfs"
GOOS=$GOOS GOARCH=$GOARCH go build -o /dev/null ./cmd/ipfs
done

echo "All platforms built successfully"
14 changes: 1 addition & 13 deletions cmd/ipfs/Rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ include mk/header.mk
IPFS_BIN_$(d) := $(call go-curr-pkg-tgt)

TGT_BIN += $(IPFS_BIN_$(d))
TEST_GO_BUILD += $(d)-try-build
CLEAN += $(IPFS_BIN_$(d))

PATH := $(realpath $(d)):$(PATH)
Expand All @@ -15,23 +14,12 @@ PATH := $(realpath $(d)):$(PATH)

$(d)_flags =-ldflags="-X "github.com/ipfs/kubo".CurrentCommit=$(git-hash)"

$(d)-try-build $(IPFS_BIN_$(d)): GOFLAGS += $(cmd/ipfs_flags)
$(IPFS_BIN_$(d)): GOFLAGS += $(cmd/ipfs_flags)

# uses second expansion to collect all $(DEPS_GO)
$(IPFS_BIN_$(d)): $(d) $$(DEPS_GO) ALWAYS #| $(DEPS_OO_$(d))
$(go-build-relative)

TRY_BUILD_$(d)=$(addprefix $(d)-try-build-,$(SUPPORTED_PLATFORMS))
$(d)-try-build: $(TRY_BUILD_$(d))
.PHONY: $(d)-try-build

$(TRY_BUILD_$(d)): PLATFORM = $(subst -, ,$(patsubst $<-try-build-%,%,$@))
$(TRY_BUILD_$(d)): GOOS = $(word 1,$(PLATFORM))
$(TRY_BUILD_$(d)): GOARCH = $(word 2,$(PLATFORM))
$(TRY_BUILD_$(d)): $(d) $$(DEPS_GO) ALWAYS
GOOS=$(GOOS) GOARCH=$(GOARCH) $(go-try-build)
.PHONY: $(TRY_BUILD_$(d))

$(d)-install: GOFLAGS += $(cmd/ipfs_flags)
$(d)-install: $(d) $$(DEPS_GO) ALWAYS
$(GOCC) install $(go-flags-with-tags) ./cmd/ipfs
Expand Down
1 change: 0 additions & 1 deletion cmd/ipfs/kubo/daemon_linux.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build linux
// +build linux

package kubo

Expand Down
1 change: 0 additions & 1 deletion cmd/ipfs/kubo/daemon_other.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !linux
// +build !linux

package kubo

Expand Down
1 change: 0 additions & 1 deletion cmd/ipfs/runmain_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build testrunmain
// +build testrunmain

package main_test

Expand Down
1 change: 0 additions & 1 deletion cmd/ipfs/util/signal.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !wasm
// +build !wasm

package util

Expand Down
1 change: 0 additions & 1 deletion cmd/ipfs/util/ui.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !windows
// +build !windows

package util

Expand Down
1 change: 0 additions & 1 deletion cmd/ipfs/util/ulimit_freebsd.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build freebsd
// +build freebsd

package util

Expand Down
Loading
Loading