-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (49 loc) · 1.95 KB
/
Copy pathci.yml
File metadata and controls
62 lines (49 loc) · 1.95 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
name: CI
# The Unity project itself cannot be built here - that needs the 2020.1.5f1
# editor and a licensed runner. What CI *can* prove, on an ordinary runner, is
# that the engine-free half of the game still compiles and behaves, and that the
# project's structure has not rotted. See CLAUDE.md for why that split exists.
on:
push:
branches: [master]
pull_request:
workflow_dispatch:
jobs:
tests:
name: Simulation tests (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
# global.json pins 8.0.100 with rollForward: latestFeature, so the
# runner's 8.0.x patch is accepted but a major bump is not.
dotnet-version: '8.0.x'
- name: Report the toolchain actually in use
run: dotnet --info
- name: Restore
run: dotnet restore NetworkSimSandbox.sln
# TreatWarningsAsErrors is on for the whole solution. Because NetworkSimSandbox.Sim
# *links* Assets/Scripts rather than copying it, this step also fails if
# the game sources drift past the C# 8 that Unity 2020.1 accepts.
- name: Build (warnings are errors)
run: dotnet build NetworkSimSandbox.sln --no-restore --configuration Release
- name: Test
run: dotnet test NetworkSimSandbox.sln --no-build --configuration Release --logger "console;verbosity=normal"
structure:
name: Project structure
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
# No pip install: the checker is stdlib-only on purpose, so it runs
# anywhere the repo is checked out.
- name: Check .meta pairing, GUIDs, build scenes and asset hygiene
run: python tools/check_project.py --verbose