-
-
Notifications
You must be signed in to change notification settings - Fork 1
121 lines (115 loc) · 3.79 KB
/
Copy pathci.yaml
File metadata and controls
121 lines (115 loc) · 3.79 KB
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
name: Gosub Continuous Integration (CI)
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
# Beacon depends on the engine through relative path dependencies
# (`../gosub-engine/crates/*`, see Cargo.toml), so CI checks the engine out as a
# sibling directory. The `beacon` branch is the long-lived integration branch for
# Beacon: upstream main plus whatever engine work Beacon needs that has not merged
# yet. Feature branches (beacon-updates etc.) are merged into it as they are pushed,
# and it is re-synced by merging upstream main into it after engine PRs land.
ENGINE_REPO: jaytaph/gosub-engine
ENGINE_REF: beacon
jobs:
build:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
rust_version: [ stable ]
steps:
- uses: actions/checkout@v4
with:
path: gosub-beacon
- uses: actions/checkout@v4
with:
repository: ${{ env.ENGINE_REPO }}
ref: ${{ env.ENGINE_REF }}
path: gosub-engine
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust_version }}
- name: Install dependencies
run: |
sudo apt update -y
sudo apt install -y \
libgtk-4-dev libglib2.0-dev libcairo2-dev libgdk-pixbuf-2.0-dev libpango1.0-dev \
libsqlite3-dev libssl-dev pkg-config \
clang libclang-dev libgl-dev libegl-dev libfontconfig-dev libfreetype-dev
- uses: Swatinem/rust-cache@v2
with:
workspaces: gosub-beacon
- name: Build
working-directory: gosub-beacon
run: cargo build --verbose --all
test:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
rust_version: [ stable ]
steps:
- uses: actions/checkout@v4
with:
path: gosub-beacon
- uses: actions/checkout@v4
with:
repository: ${{ env.ENGINE_REPO }}
ref: ${{ env.ENGINE_REF }}
path: gosub-engine
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust_version }}
- name: Install dependencies
run: |
sudo apt update -y
sudo apt install -y \
libgtk-4-dev libglib2.0-dev libcairo2-dev libgdk-pixbuf-2.0-dev libpango1.0-dev \
libsqlite3-dev libssl-dev pkg-config \
clang libclang-dev libgl-dev libegl-dev libfontconfig-dev libfreetype-dev
- uses: Swatinem/rust-cache@v2
with:
workspaces: gosub-beacon
- name: Run tests
working-directory: gosub-beacon
run: cargo test --verbose --all --no-fail-fast --all-targets
clippy:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
path: gosub-beacon
- uses: actions/checkout@v4
with:
repository: ${{ env.ENGINE_REPO }}
ref: ${{ env.ENGINE_REF }}
path: gosub-engine
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Install dependencies
run: |
sudo apt update -y
sudo apt install -y \
libgtk-4-dev libglib2.0-dev libcairo2-dev libgdk-pixbuf-2.0-dev libpango1.0-dev \
libsqlite3-dev libssl-dev pkg-config \
clang libclang-dev libgl-dev libegl-dev libfontconfig-dev libfreetype-dev
- uses: Swatinem/rust-cache@v2
with:
workspaces: gosub-beacon
- name: Run Clippy
working-directory: gosub-beacon
run: cargo clippy --all --tests -- -D warnings
fmt:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Run fmt
run: cargo fmt --check --all