Skip to content

Remove accidentally-added MD files (#1258) #3099

Remove accidentally-added MD files (#1258)

Remove accidentally-added MD files (#1258) #3099

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- '**'
jobs:
ci-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Go
uses: ./.github/actions/install-go
- name: Install actionlint
run: go install github.com/rhysd/actionlint/cmd/actionlint@latest
- name: Run actionlint
run: actionlint -shellcheck= -pyflakes=
- name: Check shouldtest profiles are referenced in CI
run: go test ./shouldtest/... -run TestRepoCIRegistry -count=1
build-mainnet:
runs-on: ubuntu-latest
needs: [ci-lint]
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: ./.github/actions/install-go
- name: Install Dependencies
uses: ./.github/actions/install-deps
- name: Install FFI
env:
GITHUB_TOKEN: ${{ github.token }}
FFI_USE_OPENCL: 1
run: |
make deps
shell: bash
- name: Build Go
env:
FFI_USE_OPENCL: 1
run: make build
shell: bash
build-calibnet:
runs-on: ubuntu-latest
needs: [ci-lint]
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: ./.github/actions/install-go
- name: Install Dependencies
uses: ./.github/actions/install-deps
- name: Install FFI
env:
GITHUB_TOKEN: ${{ github.token }}
FFI_USE_OPENCL: 1
run: |
make deps
shell: bash
- name: Build Go
env:
FFI_USE_OPENCL: 1
run: make calibnet
shell: bash
build-debug:
runs-on: ubuntu-latest
needs: [ci-lint]
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: ./.github/actions/install-go
- name: Install Dependencies
uses: ./.github/actions/install-deps
- name: Install FFI
env:
GITHUB_TOKEN: ${{ github.token }}
FFI_USE_OPENCL: 1
run: |
make deps
shell: bash
- name: Build Go
env:
FFI_USE_OPENCL: 1
run: make debug
shell: bash
build-2k:
runs-on: ubuntu-latest
needs: [ci-lint]
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: ./.github/actions/install-go
- name: Install Dependencies
uses: ./.github/actions/install-deps
- name: Install FFI
env:
GITHUB_TOKEN: ${{ github.token }}
FFI_USE_OPENCL: 1
run: |
make deps
shell: bash
- name: Build Go
env:
FFI_USE_OPENCL: 1
run: make 2k
shell: bash
build-forest:
runs-on: ubuntu-latest
needs: [ci-lint]
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: ./.github/actions/install-go
- name: Install Dependencies
uses: ./.github/actions/install-deps
- name: Install FFI
env:
GITHUB_TOKEN: ${{ github.token }}
FFI_USE_OPENCL: 1
run: |
make deps
shell: bash
- name: Build Forest
env:
FFI_USE_OPENCL: 1
run: make forest-test
shell: bash
test:
runs-on: ["self-hosted", "linux", "x64", "2xlarge+amd+curio"]
needs: [ci-lint]
strategy:
fail-fast: false # Continue running even if one test fails
matrix:
test-suite:
- name: test-all
target: "`go list ./... | grep -v curio/itests | grep -v -E 'github.com/filecoin-project/curio/lib/proof($|/)'`"
- name: test-itest-alertnow
target: "./itests/alertnow_test.go"
- name: test-itest-batching
target: "./itests/batching_test.go"
- name: test-itest-curio
target: "./itests/curio_test.go"
- name: test-itest-deal-e2e
target: "./itests/deal_e2e_test.go"
- name: test-itest-dynamic-config
target: "./itests/dyncfg_test.go"
- name: test-itest-harmonyDB
target: "./itests/harmonydb_test.go"
- name: test-itest-park-piece
target: "./itests/park_piece_test.go"
- name: test-itest-pdp-prove
target: "./itests/pdp_prove_test.go"
- name: test-itest-pieces-unseal
target: "./itests/pieces_unseal_test.go"
- name: test-itest-retrievals-test
target: "./itests/retrievals_test.go"
- name: test-itest-sql-idempotent-test
target: "./itests/sql_idempotent_test.go"
- name: test-itest-timestamp-tz
target: "./itests/timestamp_tz_test.go"
- name: test-itest-transaction-db-usage
target: "./itests/transaction_db_usage_test.go"
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: ./.github/actions/install-go
- name: Install Dependencies
uses: ./.github/actions/install-deps
with:
skip: 'true'
- name: Install FFI
env:
GITHUB_TOKEN: ${{ github.token }}
FFI_USE_OPENCL: 1
run: |
make deps
shell: bash
- name: Run tests with coverage
env:
FFI_USE_OPENCL: 1
run: |
mkdir -p coverage
go test -v --tags="debug,fvm,nosupraseal" -timeout 30m -coverprofile=coverage/${{ matrix.test-suite.name }}.out -covermode=atomic ${{ matrix.test-suite.target }}
- name: Upload coverage artifact
uses: actions/upload-artifact@v4
if: always()
with:
name: coverage-${{ matrix.test-suite.name }}
path: coverage/${{ matrix.test-suite.name }}.out
retention-days: 1
test-lib-proof:
runs-on: ["self-hosted", "linux", "x64", "4xlarge+amd+curio"]
needs: [ci-lint]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Go
uses: ./.github/actions/install-go
- name: Install Dependencies
uses: ./.github/actions/install-deps
with:
skip: 'true'
- name: Install FFI
env:
GITHUB_TOKEN: ${{ github.token }}
FFI_USE_OPENCL: 1
run: |
make deps
shell: bash
- name: Decide whether to run lib/proof tests
id: shouldtest
env:
GITHUB_EVENT_NAME: ${{ github.event_name }}
GITHUB_REF: ${{ github.ref }}
GITHUB_BASE_SHA: ${{ github.event.pull_request.base.sha }}
GITHUB_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: go run github.com/curiostorage/shouldtest/cmd/shouldtest --ci --verbose ./lib/proof
- name: Run lib/proof tests with coverage
if: steps.shouldtest.outputs.run == 'true'
env:
FFI_USE_OPENCL: 1
run: |
mkdir -p coverage
go test -v --tags="debug,fvm,nosupraseal" -timeout 30m -coverprofile=coverage/test-lib-proof.out -covermode=atomic ./lib/proof/...
- name: Upload coverage artifact
uses: actions/upload-artifact@v4
if: always()
with:
name: coverage-test-lib-proof
path: coverage/test-lib-proof.out
retention-days: 1
lint:
runs-on: ubuntu-latest
needs: [ci-lint]
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: ./.github/actions/install-go
- name: Install Dependencies
uses: ./.github/actions/install-deps
- name: Install FFI
env:
GITHUB_TOKEN: ${{ github.token }}
FFI_USE_OPENCL: 1
run: |
make deps
shell: bash
- name: Install golangci-lint
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.11.4
shell: bash
- name: Lint
env:
FFI_USE_OPENCL: 1
run: |
golangci-lint run -v --timeout 15m --concurrency 4
shell: bash
gofmt:
runs-on: ubuntu-latest
needs: [ci-lint]
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: ./.github/actions/install-go
- name: Check gofmt
run: |
go fmt ./...
shell: bash
- name: Git diff check
run: git --no-pager diff
shell: bash
- name: Git diff quiet
run: git --no-pager diff --quiet
shell: bash
build-supraseal-ubuntu24:
runs-on: ubuntu-latest
needs: [ci-lint]
env:
GCC_VERSION: "13"
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Free up disk space
run: |
# Remove unnecessary packages to free up space for CUDA installation
sudo apt-get clean
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Install system dependencies
run: |
sudo rm -rf /var/lib/apt/lists/*
sudo apt-get update -y
sudo apt-get install -y \
build-essential \
gcc-13 g++-13 \
nasm \
pkg-config \
autoconf automake libtool \
libssl-dev \
libnuma-dev \
uuid-dev \
libaio-dev \
libfuse3-dev \
libarchive-dev \
libkeyutils-dev \
libncurses-dev \
python3 python3-pip python3-dev \
curl wget git \
xxd
- name: Set up Python virtual environment
run: |
# Python tools will be installed in venv by build.sh
# Just ensure python3-venv is available
python3 -m venv --help > /dev/null || sudo apt-get install -y python3-venv
- name: Set up GCC 13 as default
run: |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 100
sudo update-alternatives --set gcc /usr/bin/gcc-13
sudo update-alternatives --set g++ /usr/bin/g++-13
gcc --version
g++ --version
- name: Install CUDA Toolkit from NVIDIA Repository
run: |
# Install CUDA using official NVIDIA repository for Ubuntu 24.04
# Source: https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=24.04&target_type=deb_local
# Skip if CUDA is already installed (shouldn't happen without cache, but just in case)
if [ -f "/usr/local/cuda/bin/nvcc" ]; then
echo "CUDA already installed"
/usr/local/cuda/bin/nvcc --version
exit 0
fi
# Download and install the CUDA keyring package
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
rm cuda-keyring_1.1-1_all.deb
# Update package list and install CUDA toolkit
sudo apt-get update
sudo apt-get -y install cuda-toolkit
# Verify installation and find CUDA location
if [ -d "/usr/local/cuda" ]; then
echo "CUDA installed at /usr/local/cuda"
ls -la /usr/local/cuda*/bin/nvcc || true
# Show CUDA version for debugging
/usr/local/cuda/bin/nvcc --version || true
else
echo "ERROR: CUDA installation not found"
exit 1
fi
- name: Set up CUDA environment
run: |
# Verify CUDA installation exists
if [ ! -d "/usr/local/cuda" ]; then
echo "ERROR: /usr/local/cuda not found"
echo "Searching for CUDA installations:"
ls -la /usr/local/cuda* 2>/dev/null || echo "No CUDA directories found"
exit 1
fi
# Export PATH locally to verify nvcc works
export PATH="/usr/local/cuda/bin:$PATH"
export CUDA_HOME=/usr/local/cuda
# Add CUDA stubs to library paths for build-time linking
# The stubs allow linking against libcuda.so.1 without requiring the actual NVIDIA driver
CUDA_STUBS_DIR="/usr/local/cuda/lib64/stubs"
if [ -d "$CUDA_STUBS_DIR" ]; then
echo "Found CUDA stubs at $CUDA_STUBS_DIR"
export LD_LIBRARY_PATH="$CUDA_STUBS_DIR:/usr/local/cuda/lib64:${LD_LIBRARY_PATH}"
export LIBRARY_PATH="$CUDA_STUBS_DIR:/usr/local/cuda/lib64:${LIBRARY_PATH}"
else
echo "WARNING: CUDA stubs directory not found at $CUDA_STUBS_DIR"
export LD_LIBRARY_PATH="/usr/local/cuda/lib64:${LD_LIBRARY_PATH}"
fi
# Verify nvcc is available and show version
echo "Verifying CUDA installation:"
nvcc --version
# Check CUDA version meets minimum requirements (12+)
CUDA_VERSION=$(nvcc --version | grep "release" | sed -n 's/.*release \([0-9]*\)\.\([0-9]*\).*/\1/p')
echo "Detected CUDA version: $CUDA_VERSION"
if [ "$CUDA_VERSION" -lt 12 ]; then
echo "ERROR: CUDA $CUDA_VERSION is too old. Need CUDA 12 or newer."
exit 1
fi
# Set environment for subsequent steps
echo "/usr/local/cuda/bin" >> $GITHUB_PATH
echo "CUDA_HOME=/usr/local/cuda" >> $GITHUB_ENV
if [ -d "$CUDA_STUBS_DIR" ]; then
echo "LD_LIBRARY_PATH=$CUDA_STUBS_DIR:/usr/local/cuda/lib64:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "LIBRARY_PATH=$CUDA_STUBS_DIR:/usr/local/cuda/lib64:$LIBRARY_PATH" >> $GITHUB_ENV
else
echo "LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH" >> $GITHUB_ENV
fi
- name: Install libconfig++
run: |
sudo apt-get install -y libconfig++-dev || {
# If not available in repos, build from source
wget https://hyperrealm.github.io/libconfig/dist/libconfig-1.7.3.tar.gz
tar -xzf libconfig-1.7.3.tar.gz
cd libconfig-1.7.3
./configure
make -j$(nproc)
sudo make install
sudo ldconfig
cd ..
rm -rf libconfig-1.7.3*
}
- name: Install GMP library
run: |
sudo apt-get install -y libgmp-dev
- name: Cache Python venv
id: cache-venv
uses: actions/cache@v4
with:
path: extern/supraseal/.venv
key: supraseal-venv-ubuntu24-v2-${{ hashFiles('extern/supraseal/build.sh') }}
restore-keys: |
supraseal-venv-ubuntu24-v2-
- name: Cache SPDK build
id: cache-spdk
uses: actions/cache@v4
with:
path: extern/supraseal/deps/spdk-v24.05
key: spdk-v24.05-gcc13-ubuntu24-v1-${{ hashFiles('extern/supraseal/build.sh') }}
restore-keys: |
spdk-v24.05-gcc13-ubuntu24-v1-
- name: Build Supraseal
working-directory: extern/supraseal
run: |
# Ensure we're using GCC 13 and CUDA
export CC=gcc-13
export CXX=g++-13
export CUDA=/usr/local/cuda
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
# Verify CUDA is accessible
which nvcc
nvcc --version
# Run the build script (creates and uses Python venv internally)
./build.sh
- name: Verify library
working-directory: extern/supraseal
run: |
echo "=== Verifying library exists ==="
test -f obj/libsupraseal.a && echo "✓ libsupraseal.a created" || exit 1
echo ""
echo "=== Library size ==="
du -h obj/libsupraseal.a
echo ""
echo "✅ Library built successfully!"
- name: Upload library artifact
uses: actions/upload-artifact@v4
with:
name: supraseal-library-ubuntu24-gcc13-cuda
path: extern/supraseal/obj/libsupraseal.a
retention-days: 30
- name: Build summary
run: |
echo "### 🎉 Supraseal Build Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Configuration:**" >> $GITHUB_STEP_SUMMARY
echo "- OS: Ubuntu 24.04" >> $GITHUB_STEP_SUMMARY
echo "- GCC: $(gcc --version | head -1)" >> $GITHUB_STEP_SUMMARY
echo "- CUDA: $(nvcc --version | grep release)" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Built Library:**" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
ls -lh extern/supraseal/obj/libsupraseal.a >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "✅ Library compiled successfully with GCC 12 and CUDA!" >> $GITHUB_STEP_SUMMARY
gen-check:
runs-on: ubuntu-latest
needs: [ci-lint]
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: ./.github/actions/install-go
- name: Install Dependencies
uses: ./.github/actions/install-deps
- name: Install goimports
run: go install golang.org/x/tools/cmd/goimports
shell: bash
- name: Install cbor-gen-for
run: go install github.com/hannahhoward/cbor-gen-for
shell: bash
- name: Install swag cli
run: go install github.com/swaggo/swag/cmd/swag@v1.16.4
shell: bash
- name: Install gotext
run: go install golang.org/x/text/cmd/gotext
shell: bash
- name: Install FFI
env:
GITHUB_TOKEN: ${{ github.token }}
FFI_USE_OPENCL: 1
run: |
make deps
shell: bash
- name: Generate Code
env:
LANG: en-US
FFI_USE_OPENCL: 1
run: make gen
shell: bash
- name: Git diff check
run: git --no-pager diff
shell: bash
- name: Git diff quiet
run: git --no-pager diff --quiet
shell: bash
mod-tidy-check:
runs-on: ubuntu-latest
needs: [ci-lint]
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: ./.github/actions/install-go
- name: Install Dependencies
uses: ./.github/actions/install-deps
- name: Run mod tidy check
run: go mod tidy -v
shell: bash
coverage-report:
runs-on: ubuntu-latest
needs: [test, test-lib-proof]
if: always() && needs.test.result != 'cancelled' && needs['test-lib-proof'].result != 'cancelled'
permissions:
contents: read
checks: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: ./.github/actions/install-go
- name: Download all coverage artifacts
uses: actions/download-artifact@v4
with:
pattern: coverage-*
path: coverage-artifacts
merge-multiple: false
- name: Merge coverage reports
run: |
chmod +x .github/utils/coverage-report.sh
.github/utils/coverage-report.sh
- name: Generate coverage report
uses: ./.github/actions/coverage-report
id: coverage
with:
artifacts-dir: coverage-artifacts
output-dir: coverage
github-token: ${{ secrets.GITHUB_TOKEN }}
create-check: 'true'
create-comment: 'false'
minimum-coverage: '0'
- name: Upload merged coverage artifact
uses: actions/upload-artifact@v4
with:
name: coverage-merged
path: |
coverage/merged.out
coverage/coverage.txt
coverage/packages.txt
coverage/coverage.html
coverage/coverage.json
retention-days: 30
- name: Add coverage to job summary
run: |
echo "## 📊 Code Coverage Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Total Coverage:** ${{ steps.coverage.outputs.total-coverage }}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "![Coverage Badge](https://img.shields.io/badge/coverage-${{ steps.coverage.outputs.total-coverage }}-${{ steps.coverage.outputs.badge-color }})" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### 📊 [View Coverage Report](https://artifact.ci/${{ github.repository }}/actions/runs/${{ github.run_id }}/coverage-merged/coverage.html)" >> $GITHUB_STEP_SUMMARY
required-checks-passed:
needs: [ci-lint, build-mainnet, build-calibnet, build-debug, build-2k, build-forest, test, test-lib-proof, lint, gofmt, build-supraseal-ubuntu24, gen-check, mod-tidy-check, coverage-report]
runs-on: ubuntu-latest
steps:
- run: echo "All required checks passed"