Skip to content

Commit f3d11bd

Browse files
committed
fix: resolve CI platform compatibility and job configuration issues
- Remove Windows from CI matrix (not supported by rules_wasm_component wasm-tools) - Disable rust-component job temporarily (rust package not yet implemented) - Add proper documentation for integration_tests macro name parameter - Update job dependencies to remove disabled rust-component references - Focus CI on working TinyGo implementation for immediate validation
1 parent 53fcd77 commit f3d11bd

File tree

2 files changed

+86
-82
lines changed

2 files changed

+86
-82
lines changed

.github/workflows/ci.yml

Lines changed: 81 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
runs-on: ${{ matrix.os }}
2222
strategy:
2323
matrix:
24-
os: [ubuntu-latest, macos-latest, windows-latest]
24+
os: [ubuntu-latest, macos-latest] # Windows not supported by rules_wasm_component
2525

2626
steps:
2727
- name: Checkout code
@@ -101,90 +101,90 @@ jobs:
101101
bazel-bin/tinygo/component_signing_keys*
102102
retention-days: 7
103103

104-
# Build and test Rust implementation
105-
rust-component:
106-
name: Rust Component Build & Test
107-
runs-on: ${{ matrix.os }}
108-
strategy:
109-
matrix:
110-
os: [ubuntu-latest, macos-latest, windows-latest]
111-
112-
steps:
113-
- name: Checkout code
114-
uses: actions/checkout@v4
115-
116-
- name: Setup Bazel
117-
uses: bazel-contrib/[email protected]
118-
with:
119-
bazelisk-cache: true
120-
disk-cache: ${{ github.workflow }}
121-
repository-cache: true
122-
123-
- name: Setup Rust
124-
uses: dtolnay/rust-toolchain@stable
125-
with:
126-
toolchain: ${{ env.RUST_VERSION }}
127-
targets: wasm32-wasi
128-
129-
- name: Cache Bazel
130-
uses: actions/cache@v4
131-
with:
132-
path: |
133-
~/.cache/bazel
134-
~/.cache/bazelisk
135-
key: bazel-rust-${{ runner.os }}-${{ hashFiles('MODULE.bazel', 'rust/**', '**/*.bzl') }}
136-
restore-keys: |
137-
bazel-rust-${{ runner.os }}-
138-
139-
- name: Cache Cargo
140-
uses: actions/cache@v4
141-
with:
142-
path: |
143-
~/.cargo/registry/index/
144-
~/.cargo/registry/cache/
145-
~/.cargo/git/db/
146-
key: cargo-${{ runner.os }}-${{ hashFiles('rust/**/Cargo.lock', 'rust/**/Cargo.toml') }}
147-
restore-keys: |
148-
cargo-${{ runner.os }}-
149-
150-
- name: Build Rust Component
151-
run: |
152-
bazel build //rust:file_ops_rust
153-
154-
- name: Test Rust Component
155-
run: |
156-
bazel test //rust:all --test_output=errors
157-
158-
- name: Build WebAssembly Component
159-
run: |
160-
bazel build //rust:file_ops_component_wasm
161-
162-
- name: Validate WebAssembly Component
163-
run: |
164-
# Install wasm-tools if not available
165-
if ! command -v wasm-tools &> /dev/null; then
166-
curl -L https://github.com/bytecodealliance/wasm-tools/releases/latest/download/wasm-tools-${{ runner.os == 'Linux' && 'x86_64-linux' || runner.os == 'macOS' && 'x86_64-macos' || 'x86_64-windows' }}.tar.gz | tar xz
167-
sudo mv wasm-tools*/wasm-tools /usr/local/bin/ || mv wasm-tools*/wasm-tools.exe /usr/local/bin/
168-
fi
169-
170-
# Validate the generated WebAssembly component
171-
wasm-tools validate bazel-bin/rust/file_ops_component_wasm.wasm
172-
wasm-tools component wit bazel-bin/rust/file_ops_component_wasm.wasm
173-
174-
- name: Upload Rust Artifacts
175-
uses: actions/upload-artifact@v4
176-
with:
177-
name: rust-component-${{ matrix.os }}
178-
path: |
179-
bazel-bin/rust/file_ops_rust*
180-
bazel-bin/rust/file_ops_component_wasm.wasm
181-
retention-days: 7
104+
# Build and test Rust implementation (disabled - package not yet created)
105+
# rust-component:
106+
# name: Rust Component Build & Test
107+
# runs-on: ${{ matrix.os }}
108+
# strategy:
109+
# matrix:
110+
# os: [ubuntu-latest, macos-latest]
111+
#
112+
# steps:
113+
# - name: Checkout code
114+
# uses: actions/checkout@v4
115+
#
116+
# - name: Setup Bazel
117+
# uses: bazel-contrib/[email protected]
118+
# with:
119+
# bazelisk-cache: true
120+
# disk-cache: ${{ github.workflow }}
121+
# repository-cache: true
122+
#
123+
# - name: Setup Rust
124+
# uses: dtolnay/rust-toolchain@stable
125+
# with:
126+
# toolchain: ${{ env.RUST_VERSION }}
127+
# targets: wasm32-wasi
128+
#
129+
# - name: Cache Bazel
130+
# uses: actions/cache@v4
131+
# with:
132+
# path: |
133+
# ~/.cache/bazel
134+
# ~/.cache/bazelisk
135+
# key: bazel-rust-${{ runner.os }}-${{ hashFiles('MODULE.bazel', 'rust/**', '**/*.bzl') }}
136+
# restore-keys: |
137+
# bazel-rust-${{ runner.os }}-
138+
#
139+
# - name: Cache Cargo
140+
# uses: actions/cache@v4
141+
# with:
142+
# path: |
143+
# ~/.cargo/registry/index/
144+
# ~/.cargo/registry/cache/
145+
# ~/.cargo/git/db/
146+
# key: cargo-${{ runner.os }}-${{ hashFiles('rust/**/Cargo.lock', 'rust/**/Cargo.toml') }}
147+
# restore-keys: |
148+
# cargo-${{ runner.os }}-
149+
#
150+
# - name: Build Rust Component
151+
# run: |
152+
# bazel build //rust:file_ops_rust
153+
#
154+
# - name: Test Rust Component
155+
# run: |
156+
# bazel test //rust:all --test_output=errors
157+
#
158+
# - name: Build WebAssembly Component
159+
# run: |
160+
# bazel build //rust:file_ops_component_wasm
161+
#
162+
# - name: Validate WebAssembly Component
163+
# run: |
164+
# # Install wasm-tools if not available
165+
# if ! command -v wasm-tools &> /dev/null; then
166+
# curl -L https://github.com/bytecodealliance/wasm-tools/releases/latest/download/wasm-tools-${{ runner.os == 'Linux' && 'x86_64-linux' || runner.os == 'macOS' && 'x86_64-macos' || 'x86_64-windows' }}.tar.gz | tar xz
167+
# sudo mv wasm-tools*/wasm-tools /usr/local/bin/ || mv wasm-tools*/wasm-tools.exe /usr/local/bin/
168+
# fi
169+
#
170+
# # Validate the generated WebAssembly component
171+
# wasm-tools validate bazel-bin/rust/file_ops_component_wasm.wasm
172+
# wasm-tools component wit bazel-bin/rust/file_ops_component_wasm.wasm
173+
#
174+
# - name: Upload Rust Artifacts
175+
# uses: actions/upload-artifact@v4
176+
# with:
177+
# name: rust-component-${{ matrix.os }}
178+
# path: |
179+
# bazel-bin/rust/file_ops_rust*
180+
# bazel-bin/rust/file_ops_component_wasm.wasm
181+
# retention-days: 7
182182

183183
# Integration and cross-component testing
184184
integration-test:
185185
name: Integration Testing
186186
runs-on: ubuntu-latest
187-
needs: [tinygo-component, rust-component]
187+
needs: [tinygo-component] # rust-component disabled
188188

189189
steps:
190190
- name: Checkout code
@@ -339,7 +339,7 @@ jobs:
339339
release:
340340
name: Create Release
341341
runs-on: ubuntu-latest
342-
needs: [tinygo-component, rust-component, integration-test, quality-gate]
342+
needs: [tinygo-component, integration-test, quality-gate] # rust-component disabled
343343
if: github.event_name == 'release' && github.event.action == 'published'
344344

345345
steps:

testdata/integration_tests.bzl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ load("@bazel_skylib//rules:build_test.bzl", "build_test")
44
load("@rules_go//go:def.bzl", "go_test")
55

66
def file_ops_integration_tests(name = "integration_tests"):
7-
"""Define integration tests for file operations components"""
7+
"""Define integration tests for file operations components
8+
9+
Args:
10+
name: Base name for the test suite (default: "integration_tests")
11+
"""
812

913
# Test that TinyGo implementation builds successfully
1014
build_test(

0 commit comments

Comments
 (0)