|
1 |
| -# Put this in the file: .github/workflows/verify.yml |
2 |
| - |
3 | 1 | name: Verify
|
4 | 2 | on: [push]
|
5 | 3 |
|
@@ -212,73 +210,3 @@ jobs:
|
212 | 210 | name: assets
|
213 | 211 | path: public
|
214 | 212 | retention-days: 1
|
215 |
| - |
216 |
| - wasm: |
217 |
| - name: WebAssembly |
218 |
| - needs: [test, lint, assets] |
219 |
| - runs-on: ubuntu-latest |
220 |
| - strategy: |
221 |
| - matrix: |
222 |
| - target: [web, node] |
223 |
| - steps: |
224 |
| - - uses: actions/checkout@v4 |
225 |
| - - name: Install build tools from apt |
226 |
| - run: sudo apt-get install ruby bison make autoconf git curl build-essential libyaml-dev zlib1g-dev -y |
227 |
| - - name: Install wasmtime |
228 |
| - uses: bytecodealliance/actions/wasmtime/setup@v1 |
229 |
| - - name: Install brotli from apt |
230 |
| - run: sudo apt-get install brotli -y |
231 |
| - - name: Workaround for Debian ruby distribution |
232 |
| - run: | |
233 |
| - # avoid using system rubygems while installing docs |
234 |
| - # related issue: https://github.com/rubygems/rubygems/issues/3831 |
235 |
| - sudo rm -rf /usr/lib/ruby/vendor_ruby/rubygems/defaults |
236 |
| - - uses: ruby/setup-ruby@v1 |
237 |
| - with: |
238 |
| - bundler-cache: true |
239 |
| - - name: Cache wasm |
240 |
| - id: cache-wasm |
241 |
| - uses: actions/cache@v4 |
242 |
| - env: |
243 |
| - cache-name: cache-wasm-${{ matrix.target }} |
244 |
| - with: |
245 |
| - path: | |
246 |
| - build |
247 |
| - rubies |
248 |
| - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('Gemfile.lock') }} |
249 |
| - restore-keys: | |
250 |
| - ${{ runner.os }}-build-${{ env.cache-name }}- |
251 |
| - ${{ runner.os }}-build- |
252 |
| - ${{ runner.os }}- |
253 |
| - - uses: actions/download-artifact@v4 |
254 |
| - with: |
255 |
| - name: assets |
256 |
| - path: public |
257 |
| - - run: ls -lahR public |
258 |
| - - run: echo ${{ secrets.RAILS_MASTER_WASM_KEY }} > config/credentials/wasm.key |
259 |
| - - run: mkdir -p .wasm |
260 |
| - - name: Build rails wasm for web |
261 |
| - run: TARGET=${{ matrix.target }} bin/wasm/build |
262 |
| - - name: Pack rails wasm for web |
263 |
| - run: TARGET=${{ matrix.target }} bin/wasm/pack |
264 |
| - - name: Test rails wasm for node successful with wasmtime |
265 |
| - run: | |
266 |
| - if [[ "${{ matrix.target }}" == "node" ]]; then |
267 |
| - bin/wasm/test-node |
268 |
| - else |
269 |
| - echo "Skipping test for wasm web" |
270 |
| - fi |
271 |
| - - name: Compress the wasm files |
272 |
| - run: bin/wasm/compress |
273 |
| - - run: ls -lahR public |
274 |
| - - name: Upload wasm to cloud storage |
275 |
| - run: | |
276 |
| - if [[ "${{github.ref}}" == "refs/heads/main" ]]; then |
277 |
| - RAILS_MASTER_KEY=${{ secrets.RAILS_MASTER_PRODUCTION_KEY }} \ |
278 |
| - RAILS_ENV=production \ |
279 |
| - bin/rails wasm:upload |
280 |
| - else |
281 |
| - RAILS_MASTER_KEY=${{ secrets.RAILS_MASTER_TEST_KEY }} \ |
282 |
| - RAILS_ENV=test \ |
283 |
| - bin/rails wasm:upload |
284 |
| - fi |
0 commit comments