-
Notifications
You must be signed in to change notification settings - Fork 19
51 lines (47 loc) · 1.37 KB
/
rust.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
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: Build and Test
strategy:
matrix:
os: [Ubuntu-latest, Windows-latest, MacOS-latest]
runs-on: ${{ matrix.os }}
steps:
- if: matrix.os == 'ubuntu-latest'
name: Get SDL2 for Linux
run: |
sudo add-apt-repository ppa:team-xbmc/ppa -y
sudo apt-get update -q
sudo apt-get install libegl1-mesa-dev libgles2-mesa-dev libsdl2-dev
- if: matrix.os == 'macOS-latest'
name: Get SDL2 for MacOS
run: |
brew install SDL2
- if: matrix.os == 'windows-latest'
name: Get SDL2 for Windows
shell: pwsh
run: |
Invoke-WebRequest -Uri "https://www.libsdl.org/release/SDL2-devel-2.0.20-VC.zip" -OutFile "SDL2-devel-2.0.20-VC.zip"
7z x SDL2-devel-2.0.20-VC.zip
Copy-Item "SDL2-2.0.20\lib\x64\SDL2*" "C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib"
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: cargo fetch
uses: actions-rs/cargo@v1
with:
command: fetch
- name: cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose