Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jsapi update ci #2480

Merged
merged 2 commits into from
Aug 5, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 24 additions & 4 deletions .github/workflows/js_api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
include:
- conf: firefox
headless: --headless
driver: --geckodriver ./geckodriver
- conf: chrome
headless: --headless

Expand All @@ -25,6 +26,7 @@ jobs:
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 @@ -100,10 +102,28 @@ jobs:
with:
node-version: 14

# needed because of # https://github.com/rustwasm/wasm-bindgen/issues/2261
- name: Install geckodriver
if: matrix.conf == 'firefox'
working-directory: ${{ env.RAV1E_JS_DIR }}
env:
LINK: https://github.com/mozilla/geckodriver/releases/download
GECKO_VERSION: v0.26.0
run: |
GECKO_FILE=geckodriver-$GECKO_VERSION-linux64
curl -L "$LINK/$GECKO_VERSION/$GECKO_FILE.tar.gz" | tar xz

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

- 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
Expand Down