chore: release v1.0.0 #4405
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| permissions: | |
| contents: read | |
| # Automatically cancels a job if a new commit is pushed to the same PR, branch, or tag. | |
| # Source: <https://stackoverflow.com/a/72408109/5148606> | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| # Allow CI to run for each commit on main | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| env: | |
| WASM_BINDGEN_TEST_TIMEOUT: 120 | |
| jobs: | |
| clippy: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| crate: | |
| - celestia-proto | |
| - celestia-types | |
| - celestia-rpc | |
| - celestia-grpc | |
| - celestia-grpc-macros | |
| - celestia-client | |
| - lumina-node | |
| - lumina-node-uniffi | |
| - lumina-node-wasm | |
| - lumina-utils | |
| - lumina-cli | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| components: clippy | |
| target: wasm32-unknown-unknown | |
| cache-key: ${{ matrix.crate }} | |
| # this disables default behavior of `setup-rust-toolchain` to put `-D warnings` which overwrites `.cargo/config.toml` | |
| rustflags: "" | |
| - name: Run clippy for native | |
| run: cargo clippy --all-targets --all-features -p ${{ matrix.crate }} -- -D warnings --no-deps | |
| - name: Run clippy for wasm32 | |
| run: cargo clippy --all-targets --all-features --target=wasm32-unknown-unknown -p ${{ matrix.crate }} -- -D warnings --no-deps | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| crate: | |
| - celestia-proto | |
| - celestia-types | |
| - celestia-rpc | |
| - celestia-grpc | |
| - celestia-grpc-macros | |
| - celestia-client | |
| - lumina-node | |
| - lumina-node-uniffi | |
| - lumina-node-wasm | |
| - lumina-utils | |
| - lumina-cli | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| cache-key: ${{ matrix.crate }} | |
| - name: Celestia devnet | |
| uses: ./.github/actions/local-devnet | |
| - name: Run tests | |
| run: cargo test --all-features -p ${{ matrix.crate }} | |
| test-bindings: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| bindings: | |
| - name: uniffi-kotlin | |
| run: ./node-uniffi/tests/kotlin/run.sh | |
| - name: uniffi-swift | |
| run: ./node-uniffi/tests/swift/run.sh | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| cache-key: ${{ matrix.crate.name }} | |
| - name: Run ${{ matrix.bindings.name }} tests | |
| run: ${{ matrix.bindings.run }} | |
| test-wasm: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| crate: | |
| - name: celestia-proto | |
| dir: proto | |
| - name: celestia-types | |
| dir: types | |
| wasm-pack-test-flags: --features=wasm-bindgen | |
| - name: celestia-rpc | |
| dir: rpc | |
| wasm-pack-test-flags: --features=wasm-bindgen | |
| - name: celestia-grpc | |
| dir: grpc | |
| - name: celestia-client | |
| dir: client | |
| - name: lumina-node | |
| dir: node | |
| - name: lumina-node-wasm | |
| dir: node-wasm | |
| # We're running node-wasm tests in release mode to get around a failing debug assertion | |
| # https://github.com/libp2p/rust-libp2p/issues/5618 | |
| wasm-pack-test-flags: --release | |
| - name: lumina-utils | |
| dir: utils | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| components: clippy | |
| target: wasm32-unknown-unknown | |
| cache-key: ${{ matrix.crate.name }} | |
| # this disables default behavior of `setup-rust-toolchain` to put `-D warnings` which overwrites `.cargo/config.toml` | |
| rustflags: "" | |
| - name: Install wasm-pack | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: wasm-pack@0.13.1 | |
| - name: Install chromedriver # we don't specify chrome version to match whatever's installed | |
| uses: nanasess/setup-chromedriver@v2 | |
| - name: Celestia devnet | |
| uses: ./.github/actions/local-devnet | |
| - name: Run wasm-pack tests | |
| run: wasm-pack test --headless --chrome ${{ matrix.crate.dir }} ${{ matrix.crate.wasm-pack-test-flags }} | |
| build-wasm: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| target: wasm32-unknown-unknown | |
| # this disables default behavior of `setup-rust-toolchain` to put `-D warnings` which overwrites `.cargo/config.toml` | |
| rustflags: "" | |
| - name: Install wasm-pack | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: wasm-pack@0.13.1 | |
| - name: Build and pack node-wasm | |
| run: wasm-pack build node-wasm && wasm-pack pack node-wasm | |
| - name: Build demo webpage | |
| run: cd cli/js && npm ci && npm run build | |
| test-js: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| target: wasm32-unknown-unknown | |
| # this disables default behavior of `setup-rust-toolchain` to put `-D warnings` which overwrites `.cargo/config.toml` | |
| rustflags: "" | |
| - name: Install wasm-pack | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: wasm-pack@0.13.1 | |
| - name: Celestia devnet | |
| uses: ./.github/actions/local-devnet | |
| - name: Install javascript deps | |
| run: | | |
| npm ci | |
| npx playwright install --with-deps | |
| - name: Run javascript tests | |
| run: npm test | |
| build-ios: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # remove heavy processes from github macos runner | |
| - uses: bitwarden/ios/.github/actions/macos-runner-tuneup@5dc773e7530566702e672b6795bbed0baca51926 | |
| - name: Setup toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| target: 'aarch64-apple-ios aarch64-apple-ios-sim' | |
| - uses: mxcl/xcodebuild@v3 | |
| with: | |
| action: none | |
| xcode: ^16 | |
| - name: build and copy bindings | |
| run: | | |
| ./node-uniffi/build-ios.sh | |
| ./examples/ios/LuminaDemo/copy_bindings.sh | |
| # bitwarden's boot-simulator requires gtimeout | |
| - name: install brew dependencies | |
| run: brew install coreutils | |
| # booting the simulator often hangs, so it needs to be killed and restarted | |
| # https://github.com/actions/runner-images/issues/12777#issuecomment-3431315347 | |
| - name: boot simulator | |
| uses: bitwarden/ios/.github/actions/boot-simulator@5dc773e7530566702e672b6795bbed0baca51926 | |
| id: boot-simulator | |
| with: | |
| simulator-name: iPhone 16 | |
| simulator-version: 26.1 | |
| - name: xcode clean build | |
| working-directory: examples/ios/LuminaDemo | |
| env: | |
| NSUnbufferedIO: "YES" | |
| SIMULATOR_ID: ${{ steps.boot-simulator.outputs.simulator-id }} | |
| run: | | |
| xcrun xcodebuild build-for-testing \ | |
| -scheme LuminaDemo \ | |
| -destination "id=${SIMULATOR_ID}" \ | |
| CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY="" \ | |
| -quiet | |
| - name: xcode sim test | |
| working-directory: examples/ios/LuminaDemo | |
| env: | |
| NSUnbufferedIO: "YES" | |
| SIMULATOR_ID: ${{ steps.boot-simulator.outputs.simulator-id }} | |
| run: | | |
| # `-parallel-testing-enabled NO` avoids creating clones of the simulator | |
| xcrun xcodebuild test-without-building \ | |
| -scheme LuminaDemo \ | |
| -sdk iphonesimulator \ | |
| -destination "id=${SIMULATOR_ID}" \ | |
| -destination-timeout 360 \ | |
| -parallel-testing-enabled NO \ | |
| -skip-testing LuminaDemoTests/GrpcClientTest \ | |
| -quiet | |
| build-android: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Java JDK | |
| uses: actions/setup-java@v4.0.0 | |
| with: | |
| java-version: '21' | |
| distribution: 'adopt' | |
| - name: Setup toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| target: 'aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android' | |
| - name: Install cargo-ndk | |
| uses: taiki-e/cache-cargo-install-action@v2 | |
| with: | |
| tool: cargo-ndk@3.5.4 | |
| - name: build and copy bindings | |
| run: | | |
| ./node-uniffi/build-android.sh | |
| ./examples/android/LuminaDemo/copy_bindings.sh | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| with: | |
| gradle-version: 'current' | |
| - name: Gradle build | |
| working-directory: examples/android/LuminaDemo | |
| run: gradle build | |
| - name: Gradle test | |
| working-directory: examples/android/LuminaDemo | |
| run: gradle test | |
| fmt: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Run fmt | |
| run: cargo fmt -- --check | |
| docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| components: clippy | |
| # TODO: pinned due to https://gitlab.com/ijackson/rust-shellexpand/-/issues/13 | |
| toolchain: nightly-2026-02-01, stable | |
| target: wasm32-unknown-unknown | |
| # this disables default behavior of `setup-rust-toolchain` to put `-D warnings` which overwrites `.cargo/config.toml` | |
| rustflags: "" | |
| - name: Missing docs for native | |
| run: cargo clippy --workspace --all-features -- -D missing-docs | |
| - name: Missing docs for wasm32 | |
| run: cargo clippy --workspace --all-features --target=wasm32-unknown-unknown -- -D missing-docs | |
| - name: Run rustdoc check | |
| env: | |
| RUSTDOCFLAGS: --cfg docsrs -D warnings | |
| run: cargo +nightly-2026-02-01 doc --no-deps | |
| unused-deps: | |
| runs-on: ubuntu-latest | |
| name: unused dependencies | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v4 | |
| - name: Setup toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| # TODO: pinned due to https://gitlab.com/ijackson/rust-shellexpand/-/issues/13 | |
| toolchain: nightly-2026-02-01 | |
| - name: Install cargo-udeps | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cargo-udeps | |
| - name: Check for unused dependencies | |
| run: cargo udeps --all-targets --all-features | |
| minimal-versions: | |
| runs-on: ubuntu-latest | |
| name: minimal versions of dependencies | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| target: wasm32-unknown-unknown | |
| # this disables default behavior of `setup-rust-toolchain` to put `-D warnings` which overwrites `.cargo/config.toml` | |
| rustflags: "" | |
| - name: Install cargo-minimal-versions | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cargo-hack,cargo-minimal-versions | |
| - name: Check minimal versions | |
| run: cargo minimal-versions check --direct --all-features | |
| - name: Check minimal versions on wasm | |
| run: cargo minimal-versions check --direct --all-features --target wasm32-unknown-unknown | |
| msrv: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| crate: | |
| - name: celestia-proto | |
| dir: proto | |
| - name: celestia-types | |
| dir: types | |
| - name: celestia-rpc | |
| dir: rpc | |
| - name: celestia-grpc | |
| dir: grpc | |
| - name: celestia-grpc-macros | |
| dir: grpc/grpc-macros | |
| - name: celestia-client | |
| dir: client | |
| - name: lumina-node | |
| dir: node | |
| - name: lumina-node-uniffi | |
| dir: node-uniffi | |
| - name: lumina-node-wasm | |
| dir: node-wasm | |
| - name: lumina-node | |
| dir: node | |
| - name: lumina-utils | |
| dir: utils | |
| - name: lumina-cli | |
| dir: cli | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| target: wasm32-unknown-unknown | |
| cache-key: ${{ matrix.crate.name }} | |
| # this disables default behavior of `setup-rust-toolchain` to put `-D warnings` which overwrites `.cargo/config.toml` | |
| rustflags: "" | |
| - name: Install cargo-msrv | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cargo-msrv | |
| - name: Run msrv verify for native | |
| run: cargo msrv verify --manifest-path ./${{ matrix.crate.dir }}/Cargo.toml --all-features | |
| - name: Run msrv verify for wasm32 | |
| run: cargo msrv verify --manifest-path ./${{ matrix.crate.dir }}/Cargo.toml --all-features --target wasm32-unknown-unknown | |
| required: | |
| runs-on: ubuntu-latest | |
| name: Required checks | |
| if: ${{ !cancelled() }} | |
| needs: | |
| - clippy | |
| - test | |
| - test-wasm | |
| - test-js | |
| - test-bindings | |
| - build-wasm | |
| - build-android | |
| - build-ios | |
| - fmt | |
| - docs | |
| - unused-deps | |
| - minimal-versions | |
| - msrv | |
| steps: | |
| - name: On failure | |
| if: always() && contains(needs.*.result, 'failure') | |
| run: exit 1 |