Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
quodlibetor committed Jun 27, 2020
1 parent 6ed253c commit 0436477
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,8 @@ jobs:
override: true

- name: Build no_std lib
run: bash ci/github.sh
env:
RUST_VERSION: stable
CORE: no_std
run: cargo build --target thumbv6m-none-eabi --color=always
working-directory: ./ci/core-test

wasm:
strategy:
Expand All @@ -108,8 +106,13 @@ jobs:
with:
node-version: '12'

- name: Install wasm-pack
run: |
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
wasm-pack --version
- name: Build and Test
run: bash ci/github.sh
env:
RUST_VERSION: stable
WASM: yes_wasm
WASM: wasm_simple
5 changes: 5 additions & 0 deletions ci/_shlib.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/usr/bin/env bash

# Use github workflow commands to make sections of the tests more obvious
# https://help.github.com/en/actions/reference/workflow-commands-for-github-actions


# Run a test as a "group" -- output will be folded and hidden by default
runt() {
echo "::group::$*"
# stdout is occasionally swallowed by gh actions
Expand Down
6 changes: 6 additions & 0 deletions ci/github.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ meaningful in the github actions feature matrix UI.
if [[ ${RUST_VERSION:-} != 1.13.0 ]]; then
if [[ ${WASM:-} == yes_wasm ]]; then
test_wasm
elif [[ ${WASM:-} == wasm_simple ]]; then
test_wasm_simple
elif [[ ${CORE:-} == no_std ]]; then
test_core
elif [[ ${EXHAUSTIVE_TZ:-} == all_tzs ]]; then
Expand Down Expand Up @@ -84,6 +86,10 @@ test_wasm() {
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
runv wasm-pack --version
fi
test_wasm_simple
}

test_wasm_simple() {
now=$(date +%s)
for tz in "${TEST_TZS[@]}"; do
runt env TZ="$tz" NOW="$now" wasm-pack test --node -- --features wasmbind
Expand Down

0 comments on commit 0436477

Please sign in to comment.