-
Notifications
You must be signed in to change notification settings - Fork 10
96 lines (76 loc) · 2.8 KB
/
av-scenechange.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
96
name: av-scenechange
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
clippy-rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install stable
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Install nasm
env:
LINK: http://debian-archive.trafficmanager.net/debian/pool/main/n/nasm
NASM_VERSION: 2.15.05-1
NASM_SHA256: >-
c860caec653b865d5b83359452d97b11f1b3ba5b18b07cac554cf72550b3bfc9
run: |
curl -O "$LINK/nasm_${NASM_VERSION}_amd64.deb"
echo "$NASM_SHA256 nasm_${NASM_VERSION}_amd64.deb" | sha256sum --check
sudo dpkg -i "nasm_${NASM_VERSION}_amd64.deb"
- name: Run rustfmt
run: |
cargo fmt -- --check --verbose
- name: Run clippy
uses: clechasseur/rs-clippy-check@v3
with:
args: -- -D warnings --verbose -A clippy::wrong-self-convention -A clippy::many_single_char_names -A clippy::upper-case-acronyms
build:
strategy:
matrix:
platform: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: Install stable
uses: dtolnay/rust-toolchain@stable
- name: Install nasm for Ubuntu
if: matrix.platform == 'ubuntu-latest'
env:
LINK: http://debian-archive.trafficmanager.net/debian/pool/main/n/nasm
NASM_VERSION: 2.15.05-1
NASM_SHA256: >-
c860caec653b865d5b83359452d97b11f1b3ba5b18b07cac554cf72550b3bfc9
run: |
curl -O "$LINK/nasm_${NASM_VERSION}_amd64.deb"
echo "$NASM_SHA256 nasm_${NASM_VERSION}_amd64.deb" | sha256sum --check
sudo dpkg -i "nasm_${NASM_VERSION}_amd64.deb"
- name: Install nasm for Windows
if: matrix.platform == 'windows-latest'
run: |
$NASM_VERSION="2.15.05"
$LINK="https://www.nasm.us/pub/nasm/releasebuilds/$NASM_VERSION/win64"
curl -LO "$LINK/nasm-$NASM_VERSION-win64.zip"
7z e -y "nasm-$NASM_VERSION-win64.zip" -o"C:\nasm"
echo "C:\nasm" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Set MSVC x86_64 linker path
if: matrix.platform == 'windows-latest'
run: |
$LinkGlob = "VC\Tools\MSVC\*\bin\Hostx64\x64"
$env:PATH = "$env:PATH;${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer"
$LinkPath = vswhere -latest -products * -find "$LinkGlob" |
Select-Object -Last 1
echo "$LinkPath" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Build
run: cargo build --all-features --tests --benches
- name: Run tests
run: cargo test --all-features
- name: Generate docs
run: cargo doc --all-features --no-deps