-
Notifications
You must be signed in to change notification settings - Fork 2
95 lines (90 loc) · 2.87 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
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
on: [push, pull_request]
name: CI
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
# make sure all code has been formatted with rustfmt
- run: rustup component add rustfmt
- name: check rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check --color always
# run clippy to verify we have no warnings
- run: rustup component add clippy
- name: cargo fetch
uses: actions-rs/cargo@v1
with:
command: fetch
- name: cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --tests -- -D warnings
test:
name: Test
strategy:
matrix:
name: [windows, linux]
include:
- name: linux
os: ubuntu-latest
artifact_name: rdm4-bin
asset_name: rdm4-linux-x64
- name: windows
os: windows-latest
artifact_name: rdm4-bin.exe
asset_name: rdm4-windows-x64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: get glTF Validator (Linux)
if: runner.os == 'Linux'
run: curl -L https://github.com/KhronosGroup/glTF-Validator/releases/download/2.0.0-dev.3.3/gltf_validator-2.0.0-dev.3.3-linux64.tar.xz | tar xvfJ -
- name: get glTF Validator (Windows)
if: runner.os == 'Windows'
shell: cmd
run: curl -L https://github.com/KhronosGroup/glTF-Validator/releases/download/2.0.0-dev.3.3/gltf_validator-2.0.0-dev.3.3-win64.zip > vali.zip && tar xvfJ vali.zip
- name: get texconv (Windows)
if: runner.os == 'Windows'
shell: powershell
run: |
curl.exe -O -L https://github.com/microsoft/DirectXTex/releases/download/apr2021/texconv.exe
pwd | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: cargo fetch
uses: actions-rs/cargo@v1
with:
command: fetch
args: --locked
- name: cargo test build
uses: actions-rs/cargo@v1
with:
command: build
args: --tests --release --workspace --locked
- name: cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --release --workspace --locked
- name: cargo build release
uses: actions-rs/cargo@v1
with:
command: build
args: --release --workspace --locked
- uses: actions/upload-artifact@v2
with:
name: ${{ matrix.asset_name }}
path: target/release/${{ matrix.artifact_name }}