Skip to content

Commit

Permalink
CI (js_api.yml): Install and build javascript
Browse files Browse the repository at this point in the history
  • Loading branch information
Urhengulas committed Aug 5, 2020
1 parent d41b11a commit 7d5ad4d
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/js_api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ jobs:
headless: --headless
- conf: chrome
headless: --headless
fail-fast: false

env:
RUST_BACKTRACE: 1
RUSTC_WRAPPER: sccache
SCCACHE_CACHE_SIZE: 300M
SCCACHE_DIR: /home/runner/.cache/sccache
SCCACHE_IDLE_TIMEOUT: 0
RAV1E_JS_DIR: rav1e_js

runs-on: ubuntu-latest

Expand Down Expand Up @@ -84,13 +86,13 @@ jobs:
# BUILD & PACK
- name: Build
if: matrix.conf == 'build'
working-directory: rav1e_js
working-directory: ${{ env.RAV1E_JS_DIR }}
# --dev needed, because of https://github.com/rustwasm/wasm-pack/issues/886
run: wasm-pack build --dev

- name: Pack
if: matrix.conf == 'build'
working-directory: rav1e_js
working-directory: ${{ env.RAV1E_JS_DIR }}
run: wasm-pack pack

# TESTING
Expand All @@ -102,9 +104,16 @@ jobs:

- name: Test ${{ matrix.conf }} (${{ matrix.headless }})
if: matrix.conf != 'build'
working-directory: rav1e_js
working-directory: ${{ env.RAV1E_JS_DIR }}
run: wasm-pack test --${{ matrix.conf }} ${{ matrix.headless }}

- name: Install and Build JavaScript
if: matrix.conf == 'build'
working-directory: ${{ env.RAV1E_JS_DIR }}/www
run: |
yarn install
yarn build
# STOP SCCACHE
- name: Stop sccache server
run: |
Expand Down

0 comments on commit 7d5ad4d

Please sign in to comment.