rpk: add --brokers option to rpk cluster partitions list #10
This file contains 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
# Copyright 2023 Redpanda Data, Inc. | |
# | |
# Use of this software is governed by the Business Source License | |
# included in the file licenses/BSL.md | |
# | |
# As of the Change Date specified in that file, in accordance with | |
# the Business Source License, use of this software will be governed | |
# by the Apache License, Version 2.0 | |
name: transform-sdk-build | |
on: | |
push: | |
tags: | |
- '*' | |
branches: | |
- '*' | |
paths: | |
- 'src/transform-sdk/**' | |
- '.github/workflows/transform-sdk-build.yml' | |
pull_request: | |
branches: | |
- dev | |
- 'v*' | |
paths: | |
- 'src/transform-sdk/**' | |
- '.github/workflows/transform-sdk-build.yml' | |
jobs: | |
build-integration-tests: | |
name: Build integration tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.22 | |
- name: Build integration tests | |
working-directory: src/transform-sdk/tests | |
run: go test -c -o ./wasm-integration-test | |
- name: Upload integration test binary | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wasm-integration-test | |
path: src/transform-sdk/tests/wasm-integration-test | |
retention-days: 1 | |
test-golang: | |
name: Test Golang Transform SDK | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.22 | |
- name: Run tests | |
working-directory: src/transform-sdk/go/transform | |
run: go test -v ./... | |
- name: Run golangci-lint | |
uses: golangci/golangci-lint-action@v4 | |
with: | |
version: latest | |
args: --timeout 5m | |
working-directory: src/transform-sdk/go/transform | |
integration-test-golang: | |
name: Integration Test Golang Transform SDK | |
needs: [test-golang, build-integration-tests] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.22 | |
- name: Set up Tinygo | |
working-directory: src/transform-sdk/go/transform | |
env: | |
TINYGO_VERSION: v0.31.0-rpk2 | |
run: | | |
curl -S -s -L "https://github.com/redpanda-data/tinygo/releases/download/${TINYGO_VERSION}/tinygo-linux-amd64.tar.gz" | tar -xvz | |
echo "$PWD/tinygo/bin" >> $GITHUB_PATH | |
- name: Build integration tests | |
working-directory: src/transform-sdk/go/transform/internal/testdata | |
run: | | |
tinygo build -scheduler=none -target=wasi -o identity.wasm ./identity | |
tinygo build -scheduler=none -target=wasi -o identity_logging.wasm ./identity_logging | |
tinygo build -scheduler=none -target=wasi -o tee.wasm ./tee | |
tinygo build -scheduler=none -target=wasi -o sr.wasm ./schema-registry | |
- name: Download integration test suite | |
uses: actions/download-artifact@v4 | |
with: | |
name: wasm-integration-test | |
path: src/transform-sdk/go/transform/internal/testdata | |
- name: Run integration tests | |
working-directory: src/transform-sdk/go/transform/internal/testdata | |
env: | |
IDENTITY: identity.wasm | |
LOGGING: identity_logging.wasm | |
TEE: tee.wasm | |
SCHEMA_REGISTRY: sr.wasm | |
run: | | |
chmod +x wasm-integration-test | |
./wasm-integration-test -test.v | |
test-rust: | |
name: Test Rust Transform SDK | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Rust | |
run: | | |
rustup update stable --no-self-update | |
rustup default stable | |
- name: Run tests | |
working-directory: src/transform-sdk/rust | |
run: cargo test --workspace | |
- name: Check format | |
working-directory: src/transform-sdk/rust | |
run: cargo fmt --check --all | |
- name: Run clippy | |
working-directory: src/transform-sdk/rust | |
run: cargo clippy --all | |
integration-test-rust: | |
name: Integration Test Rust Transform SDK | |
needs: [test-rust, build-integration-tests] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Rust | |
run: | | |
rustup update stable --no-self-update | |
rustup target add wasm32-wasi | |
- name: Build integration tests | |
working-directory: src/transform-sdk/rust | |
run: | | |
cargo build --target=wasm32-wasi --release \ | |
--example=identity \ | |
--example=identity_logging \ | |
--example=tee | |
- name: Download integration test suite | |
uses: actions/download-artifact@v4 | |
with: | |
name: wasm-integration-test | |
path: src/transform-sdk/rust | |
- name: Run integration tests | |
working-directory: src/transform-sdk/rust | |
env: | |
IDENTITY: target/wasm32-wasi/release/examples/identity.wasm | |
LOGGING: target/wasm32-wasi/release/examples/identity_logging.wasm | |
TEE: target/wasm32-wasi/release/examples/tee.wasm | |
SCHEMA_REGISTRY: "@UNIMPLEMENTED@" | |
run: | | |
chmod +x wasm-integration-test | |
./wasm-integration-test -test.v | |
test-cpp: | |
name: Test C++ Transform SDK | |
runs-on: ubuntu-latest | |
container: | |
image: fedora:40 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Clang | |
run: dnf install -y clang clang-tools-extra libcxx libcxxabi libcxx-devel libcxxabi-devel cmake | |
- name: Run tests | |
working-directory: src/transform-sdk/cpp | |
env: | |
CC: clang | |
CXX: clang++ | |
run: | | |
cmake -B build | |
cmake --build build | |
ctest --output-on-failure --test-dir build | |
- name: Run clang-tidy | |
working-directory: src/transform-sdk/cpp | |
run: clang-tidy --quiet -p build/compile_commands.json src/transform_sdk.cc | |
integration-test-cpp: | |
name: Integration Test C++ Transform SDK | |
needs: [test-cpp, build-integration-tests] | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/webassembly/wasi-sdk:wasi-sdk-21 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Build integration tests | |
working-directory: src/transform-sdk/cpp/examples | |
run: cmake -B build && cmake --build build | |
- name: Download integration test suite | |
uses: actions/download-artifact@v4 | |
with: | |
name: wasm-integration-test | |
path: src/transform-sdk/cpp/examples | |
- name: Run integration tests | |
working-directory: src/transform-sdk/cpp/examples | |
env: | |
IDENTITY: build/identity_transform | |
LOGGING: build/identity_logging_transform | |
TEE: "@UNIMPLEMENTED@" | |
SCHEMA_REGISTRY: "@UNIMPLEMENTED@" | |
run: | | |
chmod +x wasm-integration-test | |
./wasm-integration-test -test.v |