-
-
Notifications
You must be signed in to change notification settings - Fork 278
62 lines (51 loc) · 2.09 KB
/
build.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
name: test
on: [pull_request]
jobs:
test:
strategy:
fail-fast: false
matrix:
rust_version: [stable]
platform:
- { target: x86_64-pc-windows-msvc, os: windows-latest }
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest }
- { target: x86_64-apple-darwin, os: macos-latest }
- { target: aarch64-apple-ios, os: macos-latest }
- { target: aarch64-linux-android, os: ubuntu-latest }
runs-on: ${{ matrix.platform.os }}
steps:
- uses: actions/checkout@v2
- name: install stable
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.platform.target }}
- name: install webkit2gtk (ubuntu only)
if: contains(matrix.platform.target, 'gnu')
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.1 libgtksourceview-3.0-dev libayatana-appindicator3-dev
- name: install webview2 (windows only)
if: contains(matrix.platform.target, 'windows')
shell: pwsh
run: |
Invoke-WebRequest https://go.microsoft.com/fwlink/p/?LinkId=2124703 -OutFile installwebview.exe -UseBasicParsing
cmd /C start /wait installwebview.exe /silent /install
- uses: Swatinem/rust-cache@v2
- name: build wry
run: cargo build --target ${{ matrix.platform.target }}
- name: build tests and examples
shell: bash
if: (
!contains(matrix.platform.target, 'android') &&
!contains(matrix.platform.target, 'ios'))
run: cargo test --no-run --verbose --target ${{ matrix.platform.target }}
- name: run tests
if: (
!contains(matrix.platform.target, 'android') &&
!contains(matrix.platform.target, 'ios'))
run: cargo test --verbose --target ${{ matrix.platform.target }}
- name: build wry with winit
if: (
contains(matrix.platform.target, 'windows') ||
contains(matrix.platform.target, 'apple'))
run: cargo build --no-default-features --features winit --target ${{ matrix.platform.target }}