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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
name: Build (MacOS, Linux, Windows)
on:
jobs:
build-web:
name: Build (wasm)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install wasm-pack
uses: actions-rs/cargo@v1
with:
command: install
args: wasm-pack
- name: Run wasm-pack build
run: wasm-pack build
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
steps:
- uses: actions/checkout@v1
- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
# glow's gl_ReadPixels cannot read GL_FLOAT pixels. So this is broken and shouldn't be pushed.
# test-web:
# name: Tests (wasm)
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v1
# - uses: actions-rs/toolchain@v1
# with:
# toolchain: stable
# override: true
# - name: Install wasm-pack
# uses: actions-rs/cargo@v1
# with:
# command: install
# args: wasm-pack
# - name: Run tests
# run: wasm-pack test --chrome --headless
# windows-latest, macOS-latest: Unsupported PixelFormat?
# ubuntu-latest: No OpenGL software renderer?
# test:
# name: Tests
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os: [windows-latest, macOS-latest, ubuntu-latest]
# steps:
# - uses: actions/checkout@v1
# - uses: actions-rs/toolchain@v1
# with:
# toolchain: stable
# override: true
# - name: Run tests
# uses: actions-rs/cargo@v1
# with:
# command: test
# args: -- --test-threads=1
clippy:
name: Linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
# We can't run coverage without working tests.
# coverage:
# name: Coverage
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@v1
# - name: Install Rust Toolchain
# uses: actions-rs/toolchain@v1
# with:
# toolchain: stable
# override: true
# - name: Generate test profile
# uses: actions-rs/cargo@v1
# with:
# command: test
# args: --all-features --no-fail-fast
# env:
# 'CARGO_INCREMENTAL': '0'
# 'RUSTFLAGS': '-Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off'
# - name: Generate coverage report
# id: coverage
# uses: actions-rs/grcov@v0.1
# - name: list all /tmp files
# run: ls -la /tmp
# - name: show the coverage report
# run: cat ${{ steps.coverage.outputs.report }}
# - name: Upload coverage report
# uses: codecov/codecov-action@v1.0.2
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# file: ./lcov.info