-
Notifications
You must be signed in to change notification settings - Fork 207
83 lines (75 loc) · 2.58 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
name: CI
on:
push:
pull_request:
workflow_dispatch:
merge_group:
types: [checks_requested]
schedule:
# Runs at 02:30, every Saturday
- cron: "30 2 * * 6"
jobs:
Test:
strategy:
fail-fast: false
matrix:
toolchain: [stable, nightly]
platform:
# native targets
- { target: aarch64-apple-darwin, os: macos-14, native: true }
- { target: x86_64-apple-darwin, os: macos-13, native: true }
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, native: true }
- { target: x86_64-pc-windows-msvc, os: windows-latest, native: true }
# arm64 linux
- { target: aarch64-unknown-linux-gnu, os: ubuntu-latest, native: false }
# all servo's android targets
- { target: aarch64-linux-android, os: ubuntu-latest, native: false }
- { target: armv7-linux-androideabi, os: ubuntu-latest, native: false }
- { target: i686-linux-android, os: ubuntu-latest, native: false }
- { target: x86_64-linux-android, os: ubuntu-latest, native: false }
runs-on: ${{ matrix.platform.os }}
env:
HARFBUZZ_SYS_NO_PKG_CONFIG: true
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.platform.target }}
- uses: libsdl-org/setup-sdl@main
if: ${{ matrix.platform.os == 'windows-latest' }}
with:
install-linux-dependencies: true
version: 2-latest
version-sdl-image: 2-latest
- name: Install packages
if: ${{ matrix.platform.os == 'ubuntu-latest' }}
run: |
sudo apt-get update
sudo apt-get install -y libegl1-mesa-dev libgtk-3-dev libsdl2-dev cmake
- name: Build simd
if: ${{ !matrix.platform.native }}
run: cargo build --target ${{ matrix.platform.target }}
working-directory: simd
- name: Build geometry
if: ${{ !matrix.platform.native }}
run: cargo build --target ${{ matrix.platform.target }}
working-directory: geometry
- name: Build
if: ${{ matrix.platform.native }}
run: cargo build --target ${{ matrix.platform.target }}
- name: Test
if: ${{ matrix.platform.native }}
run: cargo test
build_result:
name: Result
runs-on: ubuntu-latest
needs:
- "Test"
steps:
- name: Mark the job as successful
run: exit 0
if: success()
- name: Mark the job as unsuccessful
run: exit 1
if: "!success()"