-
Notifications
You must be signed in to change notification settings - Fork 155
68 lines (55 loc) · 2 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Main
on: [push, pull_request]
env:
RUST_BACKTRACE: 1
jobs:
verify:
runs-on: ${{ matrix.os }}
if: "!contains(github.event.head_commit.message, '[ci skip]')"
strategy:
matrix:
os: [ubuntu-latest, macos-latest] # windows-latest is too slow at the moment
steps:
- name: Checkout sources
uses: actions/checkout@v3
# @TODO: Doesn't work + `cargo.lock` is not usable anymore.
# - name: Cache Rust dependencies
# uses: actions/cache@v1
# with:
# path: target
# key: ${{ runner.OS }}-build-${{ hashFiles('**\Cargo.lock') }}
# restore-keys: |
# ${{ runner.OS }}-build-
- name: Install stable Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: Cache Dependencies
uses: Swatinem/rust-cache@v1
- uses: actions/cache@v3
id: cache-cargo-bins
with:
path: |
~/.cargo/bin/wasm-pack*
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install wasm-pack
if: steps.cache-cargo-bins.outputs.cache-hit != 'true'
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Install cargo-make
uses: davidB/rust-cargo-make@v1
- name: Run tests - Windows or Ubuntu
if: matrix.os == 'ubuntu-latest' || matrix.os == 'windows-latest'
run: |
cargo make test_h chrome
cargo make test_h firefox
cargo make test_examples_firefox
# uncomment once fixes from https://webkit.org/blog/9609/release-notes-for-safari-technology-preview-94/
# are included in installed Safari
# - name: Run tests - macOS
# if: matrix.os == 'macos-latest'
# run: |
# sudo safaridriver --enable
# cargo make test_h safari
- name: Verify
run: cargo make verify_for_ci