From 04364771fb388b9dca21690c8ad980487090f0a7 Mon Sep 17 00:00:00 2001 From: Brandon W Maister Date: Sat, 27 Jun 2020 14:47:45 -0400 Subject: [PATCH] simplify --- .github/workflows/test.yml | 13 ++++++++----- ci/_shlib.sh | 5 +++++ ci/github.sh | 6 ++++++ 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0f9e5ca6d2..232fcb3f30 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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: @@ -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 diff --git a/ci/_shlib.sh b/ci/_shlib.sh index f38e0eb0c9..74f5c383b1 100644 --- a/ci/_shlib.sh +++ b/ci/_shlib.sh @@ -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 diff --git a/ci/github.sh b/ci/github.sh index ec60f8ba61..29335dd99f 100755 --- a/ci/github.sh +++ b/ci/github.sh @@ -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 @@ -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