Skip to content

webgl query

webgl query #147

Workflow file for this run

name: Test, Build, and Deploy
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v1
- name: create dist directory
run: mkdir dist
- name: Get npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v1
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Cache cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
#- name: Cache cargo bin
# uses: actions/cache@v1
# with:
# path: ~/.cargo/bin
# key: ${{ runner.os }}-cargo-index-${{ hashFiles('.cargo/bin/**') }}
- name: Cache cargo build
uses: actions/cache@v1
with:
path: demo/target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- name: download binaryen release
run: curl -u dakom:"$GITHUB_TOKEN" -s https://api.github.com/repos/WebAssembly/binaryen/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | xargs -I {} wget -c https://github.com/WebAssembly/binaryen/releases/latest/download/binaryen-{}-x86_64-linux.tar.gz -O binaryen.tgz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: extract binaryen to folder
run: mkdir binaryen && tar -zxvf ./binaryen.tgz -C binaryen --strip-components 1
- name: add binaryen to path
uses: dakom/actions-path@master
with:
path: ${{github.workspace}}/binaryen
- name: install node
uses: actions/setup-node@v1
- name: install npm deps
run: cd demo && npm ci
- name: install rust nightly
run: rustup toolchain install nightly
- name: make nightly the default
run: rustup default nightly
- name: add rust target
run: rustup target add wasm32-unknown-unknown
- name: install wasm-bindgen
run: cargo install wasm-bindgen-cli
- name: install cargo make
run: cargo install cargo-make
- name: show directory
run: ls -la
- name: build for release
run: cargo make build-production
working-directory: ./demo
- name: copy index to 404 for gh_pages routing
run: cp ./demo/dist/index.html ./demo/dist/404.html
- name: deploy to gh_pages
uses: maxheld83/ghpages@master
env:
BUILD_DIR: "demo/dist/"
GH_PAT: ${{ secrets.GH_PAT }}