|
21 | 21 | runs-on: ${{ matrix.os }} |
22 | 22 | strategy: |
23 | 23 | matrix: |
24 | | - os: [ubuntu-latest, macos-latest, windows-latest] |
| 24 | + os: [ubuntu-latest, macos-latest] # Windows not supported by rules_wasm_component |
25 | 25 |
|
26 | 26 | steps: |
27 | 27 | - name: Checkout code |
@@ -101,90 +101,90 @@ jobs: |
101 | 101 | bazel-bin/tinygo/component_signing_keys* |
102 | 102 | retention-days: 7 |
103 | 103 |
|
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 |
182 | 182 |
|
183 | 183 | # Integration and cross-component testing |
184 | 184 | integration-test: |
185 | 185 | name: Integration Testing |
186 | 186 | runs-on: ubuntu-latest |
187 | | - needs: [tinygo-component, rust-component] |
| 187 | + needs: [tinygo-component] # rust-component disabled |
188 | 188 |
|
189 | 189 | steps: |
190 | 190 | - name: Checkout code |
@@ -339,7 +339,7 @@ jobs: |
339 | 339 | release: |
340 | 340 | name: Create Release |
341 | 341 | 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 |
343 | 343 | if: github.event_name == 'release' && github.event.action == 'published' |
344 | 344 |
|
345 | 345 | steps: |
|
0 commit comments