-
Notifications
You must be signed in to change notification settings - Fork 0
135 lines (129 loc) · 4.28 KB
/
ci.yml
File metadata and controls
135 lines (129 loc) · 4.28 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# CI for the GameDev monorepo.
# Text2D, Text3D, and Paint3D excluded: heavy PyTorch / diffusers deps, not viable on GPU-less runners.
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
name: ruff (lint + format)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-lint-${{ runner.os }}-${{ hashFiles('ruff.toml', '.pre-commit-config.yaml') }}
restore-keys: pip-lint-${{ runner.os }}-
- name: Install tools
run: pip install --upgrade pip && pip install ruff pre-commit
- name: Ruff check
run: ruff check .
- name: Ruff format
run: ruff format --check .
- name: Run pre-commit
run: pre-commit run --all-files
test-python:
name: pytest (${{ matrix.package }}, Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
# Shared only (no inter-package dependencies)
- package: Shared
python-version: "3.13"
# Other packages need Shared installed first via absolute path
- package: GameAssets
python-version: "3.13"
- package: Texture2D
python-version: "3.13"
- package: Skymap2D
python-version: "3.13"
# Rigging3D — requires-python >=3.13
- package: Rigging3D
python-version: "3.13"
# Torch on CPU
- package: Part3D
python-version: "3.13"
- package: Text2Sound
python-version: "3.13"
# GameDevLab
- package: GameDevLab
python-version: "3.13"
# bpy wheel (cp313)
- package: Animator3D
python-version: "3.13"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Get repo path
id: repo
run: echo "path=$(pwd)" >> $GITHUB_OUTPUT
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-${{ matrix.python-version }}-${{ matrix.package }}-${{ hashFiles(format('Shared/pyproject.toml', matrix.package, '/pyproject.toml')) }}
restore-keys: |
pip-${{ matrix.python-version }}-${{ matrix.package }}-
pip-${{ matrix.python-version }}-
- name: Install Shared (editable, by absolute path)
run: pip install --upgrade pip && pip install -e ${{ steps.repo.outputs.path }}/Shared/.[dev]
- name: Install package and run tests
run: |
pip install -e ${{ steps.repo.outputs.path }}/${{ matrix.package }}/.[dev]
pytest -v --tb=short
working-directory: ${{ steps.repo.outputs.path }}/${{ matrix.package }}
test-rust:
name: cargo (Materialize)
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: rustfmt
run: cargo fmt --all --manifest-path Materialize/Cargo.toml -- --check
- name: Clippy
run: cargo clippy --manifest-path Materialize/Cargo.toml -- -D warnings
- name: Tests
run: cargo test --manifest-path Materialize/Cargo.toml
vibegame:
name: VibeGame (Bun)
runs-on: ubuntu-latest
defaults:
run:
working-directory: VibeGame
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: "1.2.21"
- name: Cache bun
uses: actions/cache@v4
with:
path: ~/.bun/install/cache
key: bun-${{ runner.os }}-${{ hashFiles('VibeGame/bun.lock') }}
restore-keys: bun-${{ runner.os }}-
- name: Install dependencies
run: bun install --frozen-lockfile
- name: TypeScript check
run: bun run check
- name: ESLint
run: bun run lint
- name: Prettier check
run: bun run format:check
- name: Tests
run: bun run test
- name: Vite build
run: bun run build