Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
33e9212
fix: replace placeholder checksums with real SHA256 hashes
avrabe Jul 26, 2025
4db9054
feat: add production-grade infrastructure and monitoring
avrabe Jul 26, 2025
8d92b53
feat: add multi-language WebAssembly component toolchains
avrabe Jul 26, 2025
8b30e82
feat: implement language-specific WebAssembly component rules
avrabe Jul 26, 2025
732141d
feat: add comprehensive multi-language component examples
avrabe Jul 26, 2025
dad1571
feat: implement comprehensive testing and CI/CD pipeline
avrabe Jul 26, 2025
afeb137
docs: add production readiness documentation and security guide
avrabe Jul 26, 2025
ecbf67f
fix: improve Rust component integration and update documentation
avrabe Jul 26, 2025
5a213e9
chore: update MODULE.bazel.lock after dependency changes
avrabe Jul 26, 2025
908dd0e
fix: resolve tool extraction path issues in CI environments
avrabe Jul 27, 2025
be644f1
fix: improve checksum validation regex in CI security pipeline
avrabe Jul 27, 2025
c6c2ae6
fix: implement cross-platform compatible tool downloads
avrabe Jul 27, 2025
0b814b5
chore: update MODULE.bazel.lock after toolchain changes
avrabe Jul 27, 2025
673c316
fix: resolve systematic CI build failures across all target types
avrabe Jul 27, 2025
b73f00d
feat: implement TinyGo WebAssembly component toolchain
avrabe Jul 28, 2025
3df7d4b
feat: add WASI Preview 1 adapter for component transformation
avrabe Jul 28, 2025
403f6d2
feat: integrate TinyGo toolchain in MODULE.bazel configuration
avrabe Jul 28, 2025
5af3b71
feat: enhance WIT documentation generation system
avrabe Jul 28, 2025
13607a3
feat: update Go component examples for TinyGo pipeline
avrabe Jul 28, 2025
bada11d
ci: enhance production readiness workflow for TinyGo components
avrabe Jul 28, 2025
ff8baf9
chore: add .claude to .gitignore and remove from tracking
avrabe Jul 28, 2025
1c1aae5
fix: correct .claude directory pattern in .gitignore
avrabe Jul 29, 2025
a4eb06a
refactor: eliminate all shell scripts for cross-platform compatibility
avrabe Jul 29, 2025
cd2141e
refactor: modernize toolchain operations to use Bazel-native functions
avrabe Jul 29, 2025
c3db7e5
feat: add Wizer WebAssembly pre-initialization support
avrabe Jul 29, 2025
f4335ce
refactor: modernize source repository management with git_repository …
avrabe Jul 29, 2025
bd555f3
feat: integrate modernized repositories and Wizer toolchain in MODULE…
avrabe Jul 29, 2025
88eefec
docs: update documentation for shell-free cross-platform architecture
avrabe Jul 29, 2025
204e59c
fix: resolve CI failures with Bazel-native Go toolchain integration
avrabe Jul 29, 2025
2994a3d
feat: migrate to upstream rules_rust with native WASI Preview 2 support
avrabe Jul 31, 2025
12dc59d
chore: add comprehensive pre-commit configuration
avrabe Jul 31, 2025
b856e8f
refactor: remove obsolete rules_rust patch file
avrabe Jul 31, 2025
9906bd6
feat: add Wizer WebAssembly pre-initialization support
avrabe Jul 31, 2025
dc1c077
style: apply code formatting and linting fixes
avrabe Jul 31, 2025
061b791
fix: add missing expensive_init_component target in wizer example
avrabe Jul 31, 2025
a243bbe
fix: revert wit_deps_check to use run_shell for output redirection
avrabe Aug 1, 2025
1ea2644
fix: correct WIT file reference in wac_remote_compose example
avrabe Aug 1, 2025
b191454
fix: resolve C++ component toolchain integration
avrabe Aug 1, 2025
8b87fa0
fix: resolve TinyGo toolchain platform resolution issue
avrabe Aug 1, 2025
f50c3cb
feat: implement centralized SHA management system with automated updates
avrabe Aug 2, 2025
6868cbe
fix: resolve CI failures and build system issues
avrabe Aug 2, 2025
79d0138
fix: resolve major C++ compilation issues in examples
avrabe Aug 2, 2025
6eca9ed
fix: resolve wasm-tools component syntax compatibility issues
avrabe Aug 2, 2025
ff76919
feat: migrate to centralized JSON-based checksum registry
avrabe Aug 5, 2025
9a3f129
feat: add automated weekly checksum update workflow
avrabe Aug 5, 2025
839bc65
feat: implement native checksum updater tool
avrabe Aug 5, 2025
638fd53
feat: implement self-bootstrapping WebAssembly component
avrabe Aug 5, 2025
74c83a8
refactor: enhance C++ component architecture and fix SIMD integration
avrabe Aug 5, 2025
f44fd50
feat: add comprehensive wasmtime runtime integration example
avrabe Aug 5, 2025
eb5836a
build: update MODULE.bazel with enhanced dependency management
avrabe Aug 5, 2025
4eb6c49
chore: clean up development artifacts and improve repository hygiene
avrabe Aug 14, 2025
67c915a
feat: implement complete WebAssembly component signing with wasmsign2
avrabe Aug 14, 2025
3816e6a
feat: implement comprehensive OCI publishing system for WebAssembly c…
avrabe Aug 15, 2025
f922521
fix: update WASI SDK 25 linux_amd64 checksum
avrabe Aug 15, 2025
66444f6
fix: update WASI SDK 25 linux checksums in both JSON and hardcoded re…
avrabe Aug 15, 2025
9c83349
feat: implement complete WAC+OCI integration with microservices archi…
avrabe Aug 15, 2025
48e1a61
fix: update WASI SDK 25 macOS x86_64 checksum
avrabe Aug 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 8 additions & 1 deletion .bazelci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,20 @@ This directory contains Buildkite CI configuration for `rules_wasm_component`, f
## Test Matrix

### Platforms

- **Ubuntu 22.04** - Primary Linux platform
- **Ubuntu 18.04** - Legacy Linux support
- **macOS ARM64** - Apple Silicon support
- **Windows** - Cross-platform compatibility
- **RBE** - Remote Build Execution for scalability

### Bazel Versions

- **7.4.1** - Minimum supported LTS version
- **rolling** - Latest Bazel version (soft fail)

### Build Configurations

- **Standard** - Default build and test
- **Bzlmod** - Modern dependency management
- **Optimized** - Performance validation
Expand All @@ -30,19 +33,22 @@ This directory contains Buildkite CI configuration for `rules_wasm_component`, f
## Specialized Test Jobs

### WebAssembly Component Specific

- **WAC Composition** - Component composition validation
- **Multi-profile** - Debug/release build variants
- **Toolchain** - WASM toolchain validation
- **Dependencies** - External dependency resolution

### Quality Assurance

- **Integration Tests** - End-to-end workflow validation
- **Unit Tests** - Rule implementation testing
- **Examples** - Real-world usage scenarios

## Integration with GitHub Actions

The project uses a hybrid CI approach:

- **GitHub Actions** - Community accessibility, formatting, documentation
- **Buildkite** - Industry standard for Bazel rules, comprehensive platform matrix

Expand All @@ -51,9 +57,10 @@ This follows the pattern established by `rules_rust` and other major Bazel rules
## BCR Compatibility

The CI configuration is designed to meet BCR submission requirements:

- Multi-platform testing
- Multiple Bazel version support
- Comprehensive test coverage
- Industry-standard patterns

This ensures the rules are ready for publication to the Bazel Central Registry.
This ensures the rules are ready for publication to the Bazel Central Registry.
36 changes: 24 additions & 12 deletions .bazelci/github-actions-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ This document explains how to integrate the Buildkite CI configuration with your
The existing GitHub Actions workflow (`.github/workflows/ci.yml`) and the new Buildkite CI configuration (`.bazelci/presubmit.yml`) work together to provide comprehensive testing:

**GitHub Actions** - Fast feedback and basic validation:

- Quick lint and format checks
- Basic build and test validation on Linux and macOS
- Essential WebAssembly component validation
- Integration tests for core functionality

**Buildkite CI** - Comprehensive testing matrix:

- Multi-platform testing (including Windows)
- Multiple Bazel versions (minimum, current, rolling)
- Various configuration combinations (bzlmod vs WORKSPACE)
Expand All @@ -33,16 +35,16 @@ buildkite_trigger:
name: Trigger Buildkite CI
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'

steps:
- name: Trigger Buildkite Build
uses: buildkite/[email protected]
with:
buildkite_api_access_token: ${{ secrets.BUILDKITE_API_ACCESS_TOKEN }}
pipeline: "your-org/rules-wasm-component"
commit: ${{ github.event.pull_request.head.sha }}
branch: ${{ github.event.pull_request.head.ref }}
message: "PR #${{ github.event.pull_request.number }}: ${{ github.event.pull_request.title }}"
- name: Trigger Buildkite Build
uses: buildkite/[email protected]
with:
buildkite_api_access_token: ${{ secrets.BUILDKITE_API_ACCESS_TOKEN }}
pipeline: "your-org/rules-wasm-component"
commit: ${{ github.event.pull_request.head.sha }}
branch: ${{ github.event.pull_request.head.ref }}
message: "PR #${{ github.event.pull_request.number }}: ${{ github.event.pull_request.title }}"
```

### 2. Configure Branch Protection Rules
Expand All @@ -52,7 +54,7 @@ In your GitHub repository settings, add Buildkite checks as required status chec
- Navigate to Settings β†’ Branches β†’ Branch protection rules
- Add required status checks for critical Buildkite jobs:
- `ubuntu2204`
- `macos_arm64`
- `macos_arm64`
- `examples_ubuntu2204`
- `integration_tests`
- `bcr_test`
Expand Down Expand Up @@ -136,6 +138,7 @@ Configure the following environment variables in Buildkite:
## Testing Matrix Coordination

### GitHub Actions (Fast Lane)

```yaml
# Focus on essential, fast tests
test_matrix:
Expand All @@ -147,6 +150,7 @@ test_matrix:
```

### Buildkite CI (Comprehensive Lane)

```yaml
# Full matrix testing
test_matrix:
Expand Down Expand Up @@ -228,6 +232,7 @@ wasm-tools validate bazel-bin/examples/basic/hello_component.wasm
### 2. Buildkite Logs

Access detailed logs in Buildkite UI:

- Build timeline view
- Artifact downloads
- Raw log outputs
Expand All @@ -236,36 +241,42 @@ Access detailed logs in Buildkite UI:
### 3. GitHub Actions Comparison

Compare with GitHub Actions results:

- Same commit, different environment results
- Platform-specific differences
- Timing and resource usage variations

## Migration Strategy

### Phase 1: Parallel Testing

- Keep existing GitHub Actions
- Add Buildkite CI as additional testing
- Monitor for inconsistencies

### Phase 2: Gradual Migration

- Move comprehensive tests to Buildkite
- Keep fast feedback in GitHub Actions
- Update branch protection rules

### Phase 3: Optimization

- Fine-tune test distribution
- Optimize cache usage
- Minimize redundant testing

## Cost Optimization

### 1. Selective Testing

```yaml
# Only run full matrix on main branch
if: build.branch == "main" || build.pull_request.draft == false
```

### 2. Resource Management

```yaml
# Use appropriate agent sizes
agents:
Expand All @@ -274,9 +285,10 @@ agents:
```

### 3. Parallel Execution Limits

```yaml
# Prevent resource exhaustion
parallelism: 3 # Limit concurrent jobs
parallelism: 3 # Limit concurrent jobs
```

This integration provides comprehensive testing coverage while maintaining fast feedback loops for developers.
This integration provides comprehensive testing coverage while maintaining fast feedback loops for developers.
62 changes: 31 additions & 31 deletions .bazelci/local-testing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,28 +44,28 @@ command_exists() {
# Setup WebAssembly toolchain (similar to CI)
setup_wasm_toolchain() {
echo -e "${YELLOW}=== Setting up WebAssembly toolchain ===${NC}"

# Install Rust if not present
if ! command_exists rustc; then
echo "Installing Rust..."
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source ~/.cargo/env
fi

# Add WASM targets
run_command "Adding wasm32-wasip1 target" rustup target add wasm32-wasip1
run_command "Adding wasm32-wasip2 target" rustup target add wasm32-wasip2
run_command "Adding wasm32-unknown-unknown target" rustup target add wasm32-unknown-unknown

# Install WebAssembly tools
if ! command_exists wasm-tools; then
run_command "Installing wasm-tools" cargo install wasm-tools
fi

if ! command_exists wac; then
run_command "Installing wac-cli" cargo install wac-cli
fi

if ! command_exists wit-bindgen; then
run_command "Installing wit-bindgen-cli" cargo install wit-bindgen-cli
fi
Expand All @@ -74,7 +74,7 @@ setup_wasm_toolchain() {
# Setup Bazel configuration (similar to CI)
setup_bazel_config() {
echo -e "${YELLOW}=== Setting up Bazel configuration ===${NC}"

# Create user.bazelrc with CI-like settings
cat > user.bazelrc << EOF
# CI-like configuration for local testing
Expand All @@ -90,45 +90,45 @@ test --test_summary=detailed
build --local_resources=memory=HOST_RAM*.6
build --local_resources=cpu=HOST_CPUS*.8
EOF

echo "Created user.bazelrc with CI-like settings"
}

# Test basic functionality
test_basic() {
echo -e "${YELLOW}=== Testing basic functionality ===${NC}"

run_command "Bazel version check" bazel version

run_command "Build all targets" bazel build //...

run_command "Run all tests" bazel test //...

# Test specific examples
run_command "Build basic example" bazel build //examples/basic:hello_component

run_command "Build multi-profile examples" bazel build //examples/multi_profile:camera_sensor //examples/multi_profile:object_detection
}

# Test with Clippy (if requested)
test_with_clippy() {
if [[ "${WITH_CLIPPY:-}" == "true" ]]; then
echo -e "${YELLOW}=== Testing with Clippy ===${NC}"

# Add clippy config to user.bazelrc
echo "build --config=clippy" >> user.bazelrc

run_command "Build with Clippy" bazel build //...
fi
}

# Validate generated WebAssembly components
validate_wasm_components() {
echo -e "${YELLOW}=== Validating WebAssembly components ===${NC}"

# Build components first
run_command "Build hello component" bazel build //examples/basic:hello_component

# Validate with wasm-tools
if command_exists wasm-tools; then
HELLO_COMPONENT="bazel-bin/examples/basic/hello_component.wasm"
Expand All @@ -140,11 +140,11 @@ validate_wasm_components() {
else
echo -e "${YELLOW}wasm-tools not available, skipping validation${NC}"
fi

# Test multi-profile components if they exist
run_command "Build multi-profile debug component" bazel build //examples/multi_profile:camera_sensor_debug || true
run_command "Build multi-profile release component" bazel build //examples/multi_profile:camera_sensor_release || true

# Validate multi-profile components
for component in "camera_sensor_debug.component.wasm" "camera_sensor_release.component.wasm"; do
COMPONENT_PATH="bazel-bin/examples/multi_profile/$component"
Expand All @@ -157,36 +157,36 @@ validate_wasm_components() {
# Test integration scenarios
test_integration() {
echo -e "${YELLOW}=== Testing integration scenarios ===${NC}"

# Integration tests
run_command "Run integration tests" bazel test //test/integration/... || true

# Unit tests
run_command "Run unit tests" bazel test //test/unit/... || true

# Toolchain tests
run_command "Run toolchain tests" bazel test //test/toolchain/... || true
}

# Test different configurations
test_configurations() {
echo -e "${YELLOW}=== Testing different configurations ===${NC}"

# Test optimized build
echo "build --compilation_mode=opt" >> user.bazelrc
run_command "Build with optimization" bazel build //examples/basic:hello_component

# Remove opt flag
sed -i.bak '/--compilation_mode=opt/d' user.bazelrc
}

# Cleanup function
cleanup() {
echo -e "${YELLOW}=== Cleaning up ===${NC}"

# Remove generated files
rm -f user.bazelrc user.bazelrc.bak

# Clean Bazel outputs (optional)
if [[ "${CLEAN_AFTER:-}" == "true" ]]; then
run_command "Clean Bazel outputs" bazel clean
Expand All @@ -197,27 +197,27 @@ cleanup() {
main() {
echo -e "${GREEN}Starting local CI testing...${NC}"
echo ""

# Check if we're in the right directory
if [[ ! -f "MODULE.bazel" ]] || [[ ! -f ".bazelci/presubmit.yml" ]]; then
echo -e "${RED}Error: Please run this script from the rules_wasm_component root directory${NC}"
exit 1
fi

# Set up environment
setup_wasm_toolchain
setup_bazel_config

# Run tests
test_basic
test_with_clippy
validate_wasm_components
test_integration
test_configurations

# Cleanup
cleanup

echo -e "${GREEN}=== Local CI testing completed successfully! ===${NC}"
}

Expand Down Expand Up @@ -245,4 +245,4 @@ case "${1:-all}" in
"all"|*)
main
;;
esac
esac
2 changes: 1 addition & 1 deletion .bazelci/postsubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@ tasks:
- "--config=remote"
- "--remote_executor=grpcs://remotebuildexecution.googleapis.com"
- "--remote_instance_name=projects/bazel-public/instances/default_instance"
- "--test_output=errors"
- "--test_output=errors"
Loading
Loading