Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
206 commits
Select commit Hold shift + click to select a range
a98c9b9
Chore: refactor client communication into a seperate manager (so that…
legoeruro Sep 18, 2024
4238731
Chore: Restructure and refactor client communication & data retrievin…
legoeruro Sep 18, 2024
3b12a39
Added buttons for modality toggles
legoeruro Sep 20, 2024
b083653
Feature: Define new data modalities in .proto
legoeruro Sep 20, 2024
feef982
Merge branch 'main' into data-modalities
legoeruro Sep 20, 2024
350c0d9
Merge branch 'data-modalities'
legoeruro Sep 20, 2024
e46b746
Feature: Compile protobuf
legoeruro Sep 20, 2024
932b28b
Chore: config proto for new data modalities
legoeruro Sep 20, 2024
2569f29
Feature: implement gyroscope data sending
legoeruro Sep 20, 2024
58f4a38
Merge remote-tracking branch 'upstream/main'
legoeruro Sep 20, 2024
cf1d3a1
Feature: implement gyroscope for server-side display + Update rerun f…
legoeruro Sep 20, 2024
0395000
docs: updated main doc with prebuilt client usage information.
YiqinZhao Sep 20, 2024
80c94c4
refactor(server): (VERY WIP) initial Python typings
FelixNgFender Sep 21, 2024
8ff1e77
fix(server): hashable client identifier
FelixNgFender Sep 21, 2024
21b7152
feat(client): sync with new schema changes
FelixNgFender Sep 21, 2024
326deef
docs(server): surface public API
FelixNgFender Sep 21, 2024
2c26935
chore(server): remove version-specific stuff
FelixNgFender Sep 21, 2024
ce0a890
docs(server): adopt Google `pydocstyle` format
FelixNgFender Sep 25, 2024
b0dbe1f
feat(server): proper graceful shutdown handling
FelixNgFender Sep 25, 2024
7909b24
refactor(server): use `strict` mode for `pyright`
FelixNgFender Sep 25, 2024
30d1b1c
fix(examples): (WIP) sync examples with new server API
FelixNgFender Sep 25, 2024
ccef17c
docs(examples): sync simple example with new server API (replay still…
FelixNgFender Sep 25, 2024
629637b
ci: new workflow for code quality & tests
FelixNgFender Sep 25, 2024
3dd207f
ci: add sample Python test to pass CI
FelixNgFender Sep 25, 2024
4654cf7
ci: keeps CI reproducible
FelixNgFender Sep 25, 2024
340c661
ci: install dev & docs dependencies beforehand to cache
FelixNgFender Sep 25, 2024
067ff9d
ci: install all dependencies beforehand for caching
FelixNgFender Sep 25, 2024
61bd772
ci: fix dumb caching mistake
FelixNgFender Sep 25, 2024
6be4077
ci: install docs deps in case cache miss
FelixNgFender Sep 25, 2024
174f42f
chore(client): removed unused vscode settings.
YiqinZhao Sep 25, 2024
ef66f27
fix(client): added client package name.
YiqinZhao Sep 25, 2024
e3fa391
chore: updated vscode settings to exclude unnecessary files
YiqinZhao Sep 25, 2024
7b242f8
chore: consolidate `.gitignore` files
FelixNgFender Sep 25, 2024
6faf73c
docs: sync simple example in top-level `README.md`
FelixNgFender Sep 25, 2024
10ce041
chore(server): add `pytest-randomly`
FelixNgFender Sep 25, 2024
097e59f
build(server): formalize public API
FelixNgFender Sep 26, 2024
2d99893
fix(client): sync new location of gRPC schema
FelixNgFender Sep 26, 2024
6a2b967
ci: new release workflow on tag
FelixNgFender Sep 26, 2024
b63f05a
feat(server): prefer `mypy-protobuf` plugin output over built-in `--p…
FelixNgFender Sep 26, 2024
cf68771
feat(server): added a way to disable rerun visualization.
YiqinZhao Sep 26, 2024
0719c53
ci: fix permissions to publish docs
FelixNgFender Sep 26, 2024
c3f6463
ci: fix permissions to publish docs
FelixNgFender Sep 26, 2024
e3a6eef
ci: fix permissions to publish docs
FelixNgFender Sep 26, 2024
b5f1b69
ci: add new `pre-release` to Test PyPI workflow
FelixNgFender Sep 26, 2024
29370ce
ci: don't publish docs in pre-release
FelixNgFender Sep 26, 2024
7bd03fa
fix(server): allow partial data in decoded data frame
FelixNgFender Sep 26, 2024
028e484
docs(contributor): contrib-readme-action has updated readme
github-actions[bot] Sep 26, 2024
4d10287
Chore: Remove redundant testing stuff over on minimal
legoeruro Sep 29, 2024
fedfee1
Merge remote-tracking branch 'upstream/main'
legoeruro Sep 29, 2024
72e779d
ci: upload Python package to GitHub once released
FelixNgFender Sep 30, 2024
5c219b5
feat(server): exception and error logger interceptors
FelixNgFender Sep 30, 2024
441490f
Chore: Remove redundant method
legoeruro Sep 30, 2024
5219e17
Chore: sweep dust and clean bathroom
legoeruro Sep 30, 2024
d3e994c
Merge pull request #16 from legoeruro/main
YiqinZhao Oct 1, 2024
2747526
Merge from upstream + recompile proto files
legoeruro Oct 1, 2024
ba14c88
oh and i forgot about this: actually recompiling protoc
legoeruro Oct 1, 2024
63438f7
docs(contributor): contrib-readme-action has updated readme
github-actions[bot] Oct 1, 2024
f24be16
my bad g
legoeruro Oct 1, 2024
f76f362
my bad g 2: breaking good
legoeruro Oct 1, 2024
8bf2fd1
Feature: Audio modality, sending is coupled with other data modalities
legoeruro Oct 3, 2024
d247449
feat(server): additional arguments to `serve` CLI command
FelixNgFender Oct 3, 2024
5c119e0
Feat (WIP): AR Meshing and Draco compression/decompression
legoeruro Oct 4, 2024
a0116ae
ci(server): new testing infra
FelixNgFender Oct 4, 2024
46a9f4e
feat(server): revamp `arflow` CLI
FelixNgFender Oct 4, 2024
ea52bb7
test(server): basic coverage of gRPC service, decoding, CLI, hooks, &…
FelixNgFender Oct 4, 2024
1e958c0
ci(server): prevents `pytest` hangs with timeout
FelixNgFender Oct 4, 2024
063adcf
feat(server): proper logging in place of `print()`
FelixNgFender Oct 4, 2024
59438f8
feat(server): expose log level controls to CLI
FelixNgFender Oct 4, 2024
1696141
Feat (WIP): Plane manager modality, and add package in Unity for AR s…
legoeruro Oct 4, 2024
a4a034a
Fix: Issue with mesh drawing and remove debug comments
legoeruro Oct 4, 2024
901f27d
Fix: Audio not working on mobile devices
legoeruro Oct 4, 2024
bbde0c8
Chore: Modify plane method to clear out old planes
legoeruro Oct 4, 2024
03445a6
fix(server): CLI only allows either `debug` or `verbose`
FelixNgFender Oct 5, 2024
f85ac52
docs(server): simplify getting started UX with CLI & simple example
FelixNgFender Oct 5, 2024
e0c49af
Merge remote-tracking branch 'origin/main' into non-streaming-data-mo…
legoeruro Oct 8, 2024
db22b7b
Chore: List Typings
legoeruro Oct 8, 2024
6204180
Merge pull request #2 from FelixNgFender/non-streaming-data-modalities
legoeruro Oct 8, 2024
8654013
Test: convert_2d_to_3d
legoeruro Oct 8, 2024
1d0f41e
test(server): integration tests with stub for vanilla gRPC server
FelixNgFender Oct 9, 2024
ed03694
refactor(server): move function to do 2d-to-3d conversion of boundary…
FelixNgFender Oct 9, 2024
8ec2104
refactor(server): unify typing for 3D boundary points
FelixNgFender Oct 9, 2024
3a22251
Feat: Asynchronous gRPC (and also Merge branch 'main' of https://gith…
legoeruro Oct 9, 2024
c6aa430
Fix: Modify decoding to throw when input values are of wrong format
legoeruro Oct 9, 2024
670b55b
refactor: conforming to gRPC schema best practices
FelixNgFender Oct 10, 2024
4c77fa3
Fix: error with attitute data being of wrong shape
legoeruro Oct 10, 2024
e1c8a85
Fix: Build errors, connection status errors, and added assembly defs…
legoeruro Oct 10, 2024
4cd7f71
test(server): plane detection, gyroscope, audio, and meshing
FelixNgFender Oct 10, 2024
8ffc737
chore: centralize build script
FelixNgFender Oct 21, 2024
beb8d4a
Chore: use interface for audio impl, change logging to only for debug…
legoeruro Oct 23, 2024
c4281ca
Chore: logging when debugging mode in UnityDataSample file
legoeruro Oct 23, 2024
4a5fcac
Chores: Change namings, add interfaces for outside package installed …
legoeruro Oct 23, 2024
5302096
refactor(server): replace `os` with `pathlib` for modern path handling
FelixNgFender Oct 24, 2024
ff40ec9
Packaging: Initial Unity Package
legoeruro Oct 24, 2024
dc011a1
Chore: Remove interfaces, and add files for packaging
legoeruro Oct 24, 2024
9a64dd8
Chore: Update Unity's README for package installation
legoeruro Oct 24, 2024
de822f7
docs(contributor): contrib-readme-action has updated readme
github-actions[bot] Oct 24, 2024
0f7da5c
Chore: fix installation link to cake-lab
legoeruro Oct 24, 2024
7b16f31
Merge branch 'main' of https://github.com/FelixNgFender/ARFlow
legoeruro Oct 24, 2024
2df7421
Merge pull request #18 from FelixNgFender/main
YiqinZhao Oct 24, 2024
11d5613
Fix: Remove package not on repo
legoeruro Oct 25, 2024
727a166
Merge branch 'cake-lab:main' into main
legoeruro Oct 25, 2024
ce83bf9
Merge pull request #19 from FelixNgFender/main
YiqinZhao Oct 25, 2024
69db5e6
feat(server): (WIP) initial multiplayer impl
FelixNgFender Oct 29, 2024
ad95d33
feat(server): support 2 modes (`view` and `save`) & add `rerun` wrapp…
FelixNgFender Oct 31, 2024
98e9de9
feat(cli): prompt dir creation if not existent in `save` mode
FelixNgFender Nov 1, 2024
24e312d
Feat (wip): Multiplayer session + add timestamp
legoeruro Nov 8, 2024
dab51e0
Feat (wip): Implement connection with QR code
legoeruro Nov 8, 2024
4882a1c
Feat: Connection to multi-player session through QR Code
legoeruro Nov 8, 2024
8ab5a81
Fix: Depth and CPU image unable to send to server
legoeruro Nov 8, 2024
2e9573c
test(server): join session endpoint & new cli
FelixNgFender Nov 8, 2024
6d51e58
docs: centralize and simplify
FelixNgFender Nov 8, 2024
5205e64
ci: bump version & fail CI if under 100% coverage
FelixNgFender Nov 8, 2024
ac18624
docs: fix links and formatting
FelixNgFender Nov 8, 2024
51ef688
docs: fix formatting
FelixNgFender Nov 8, 2024
f1fe7c6
docs: formatting
FelixNgFender Nov 8, 2024
c03e569
docs: formatting
FelixNgFender Nov 8, 2024
afcf1b6
Chore: init UID for client
legoeruro Nov 9, 2024
a9b3c57
Merge branch 'multiplayer' of https://github.com/FelixNgFender/ARFlow…
legoeruro Nov 9, 2024
135cde3
Chore: Fix bug when no plane is found, allow connect via QR without p…
legoeruro Nov 9, 2024
b2963da
Fix: QR connection doesn't work
legoeruro Nov 12, 2024
9e1893f
Fix: Resolve connection bug with QR
legoeruro Nov 13, 2024
acbbdf5
Fix: session joining not working if first time running
legoeruro Nov 14, 2024
9dfd79c
Fix: Time for image and system time does not line up --> change to us…
legoeruro Nov 14, 2024
e6d74f0
docs: temporal sync design
FelixNgFender Nov 15, 2024
84369a9
Merge branch 'multiplayer' of https://github.com/FelixNgFender/ARFlow…
legoeruro Nov 15, 2024
e726e1d
Chore: Differentiate client's uid from session uid, rèactor some code
legoeruro Nov 15, 2024
3c87130
Chore: Delete unity folder (old) to update to unity 6
legoeruro Nov 25, 2024
3bb6f82
feat: implement new multiplayer design
FelixNgFender Nov 25, 2024
dc6abb1
Feat + Chore: Scripts can only be imported inside Runtime folder --> …
legoeruro Nov 27, 2024
f436418
Feat (WIP): Sessions list window
legoeruro Nov 27, 2024
c338b02
Feat (WIP): Define sessions window for joining, creating, deleting, a…
legoeruro Nov 28, 2024
372eabc
feat(protos): improve docs for schema and generated bindings
FelixNgFender Nov 25, 2024
92a47e6
feat(client): more accurate timing and robust format conversion for C…
FelixNgFender Nov 25, 2024
d3a5f4f
refactor(server): rely on generated bindings for camera frame format …
FelixNgFender Nov 26, 2024
5b15b87
feat: buffers for all 8 data types + synchronized buffer client side,…
FelixNgFender Nov 30, 2024
96d06c4
Feat (WIP): Revamp UI
legoeruro Dec 1, 2024
ba5187c
fix(client): decouple image plane lifetime in buffer from native reso…
FelixNgFender Dec 1, 2024
415455e
Feat (WIP): config UI - when turn off also turn manager off
legoeruro Dec 2, 2024
416d639
feat(server): handle 6 modalities (except 2 image-based)
FelixNgFender Dec 3, 2024
6721304
Feat (WIP): Modality UI Configs
legoeruro Dec 3, 2024
946b8e4
Feat (WIP): fix some UI bugs
legoeruro Dec 3, 2024
62713a2
feat(server): log smoothed and raw depth images to different entity p…
FelixNgFender Dec 4, 2024
1ff17d5
feat(server): synchronized ar frame processing
FelixNgFender Dec 4, 2024
b574406
feat(client): NTP client
FelixNgFender Dec 4, 2024
765cdd9
refactor(server): change ntp to use async instead of threads
FelixNgFender Dec 5, 2024
de5507a
refactor(server): make NTP clock easier to use
FelixNgFender Dec 5, 2024
db1116f
refactor(server): move ntp client out of clock, add probing capability
FelixNgFender Dec 5, 2024
25b1b62
feat(wip): UI for buffer
legoeruro Dec 5, 2024
637e816
fix(client): Error on new UI Cancellation (cancellation works but thr…
legoeruro Dec 5, 2024
7c7e084
fix(client): ARManager could potentially be null
legoeruro Dec 6, 2024
03ec152
fix(client): reattach scripts components
legoeruro Dec 6, 2024
8545d85
chore(client): change default sending delay
legoeruro Dec 6, 2024
ffc6c99
chore(client): error handling for connection to server
legoeruro Dec 6, 2024
b5b8de2
chore: On application quit
legoeruro Dec 6, 2024
89abbd9
chore: go back buttons
legoeruro Dec 6, 2024
2cc6e28
fix: port isn't applied and list doesn't refresh
legoeruro Dec 6, 2024
4a8dd57
fix: correct data logging
FelixNgFender Dec 6, 2024
f86b34f
fix: correct data logging
FelixNgFender Dec 6, 2024
bda5939
feat(wip): NTP in devicesample
legoeruro Dec 6, 2024
16cf001
fix(client): ntp should be working (remove port)
legoeruro Dec 6, 2024
53b57e3
fix(client): await ntp sync
FelixNgFender Dec 6, 2024
241a779
fix: ntp when unable to connect blocks user from going to next screen
legoeruro Dec 11, 2024
d9f5623
fix(client): smooth cpu images logging
FelixNgFender Dec 11, 2024
0b8ce9c
docs(server): function signatures
FelixNgFender Dec 11, 2024
7e2fa27
feat: spacial sync (smoothing does not work)
legoeruro Dec 12, 2024
9079b1d
fix: spacial sync not working when changing XR Origin's location dire…
legoeruro Dec 12, 2024
8f6e521
feat(wip): pinhole camera
legoeruro Dec 13, 2024
ad9cc60
fix: pinhole on rerun and remove redundant pose
legoeruro Dec 13, 2024
a127227
refactor: pack intrinsics into color frame
FelixNgFender Dec 13, 2024
501432a
refactor: pack intrinsics into color frame
FelixNgFender Dec 13, 2024
404f461
chore: add guidance messages for syncing
legoeruro Dec 13, 2024
9c69f51
fix: device data to correct window
legoeruro Dec 13, 2024
489616c
fix: comment out removing translation coordinates from transformation…
legoeruro Dec 13, 2024
b1a914c
chore: unify VSCode-specific files
FelixNgFender Jan 16, 2025
cf66b9f
ci(server): temporarily disable typechecking & testing
FelixNgFender Jan 16, 2025
2aee1bd
Merge pull request #20 from FelixNgFender/multiplayer
YiqinZhao Jan 16, 2025
5c4f4d2
docs(contributor): contrib-readme-action has updated readme
github-actions[bot] Jan 16, 2025
325f790
Merge pull request #21 from cake-lab/contributors-readme-action-ceCcc…
YiqinZhao Jan 16, 2025
73d1497
fix(client): race condition when clearing buffer after sending frames
FelixNgFender Jan 17, 2025
8c931c2
feat(server): widen typings in public API for easier usage
FelixNgFender Jan 17, 2025
1530ff5
test(server): tests for new API
FelixNgFender Jan 21, 2025
a85765b
chore: Move transform into seperate entity path (origin pairing is do…
legoeruro Jan 24, 2025
7337432
chore(server): benchmarks scaffolding
FelixNgFender Jan 29, 2025
d61bb7f
fix(client): properly fallback to system clock if no NTP server speci…
FelixNgFender Feb 3, 2025
c09c1ac
style(client): formatting
FelixNgFender Feb 3, 2025
b53f298
perf(client): sending AR frames directly consumes the iterator instea…
FelixNgFender Feb 6, 2025
a40397b
chore(wip): evaluations for spacial/coordinates syncronization
legoeruro Feb 7, 2025
464322f
New file for PR Comment (on Github)
legoeruro Feb 7, 2025
fe517e2
chore(evaluations): precious experiment data for temporal sync evals
FelixNgFender Feb 6, 2025
e0b7e23
chore(evaluations): temporal sync evals diagrams & results
FelixNgFender Feb 10, 2025
920193e
chore(benchmarks): simple empty frames bench
FelixNgFender Feb 14, 2025
c7ed5c6
chore(benchmarks): wip for light, medium, heavy, and mixed load
FelixNgFender Feb 14, 2025
0544daf
feat(client): optimal data transmit parameters
FelixNgFender Feb 23, 2025
8c5ec7c
test(server): add color modality to saving AR frames test
FelixNgFender Feb 23, 2025
8a4340a
chore(benchmarks): send interval vs payload size and batching benches…
FelixNgFender Feb 23, 2025
af2ba65
chore(benchmarks): minor docs cleanup
FelixNgFender Feb 23, 2025
eeca691
Fix: transform not representative in evaluation (rotation is still no…
legoeruro Feb 28, 2025
db73d7f
Merge branch 'main' of https://github.com/FelixNgFender/ARFlow
legoeruro Feb 28, 2025
dcd6a3a
fix: Rotational predictions from ArUco was not correct in Unity's coo…
legoeruro Mar 3, 2025
5510392
chore: Change scene setup and output evaluations
legoeruro Mar 4, 2025
aa5d5b1
chore: add information about randomization factors to evaluation result
legoeruro Mar 4, 2025
89581af
Merge pull request #22 from FelixNgFender/refactor-comments
YiqinZhao Mar 10, 2025
ff61f83
Merge pull request #23 from FelixNgFender/main
YiqinZhao Mar 10, 2025
e987a44
new: bump to 0.4.0
YiqinZhao Jun 2, 2025
e2507c9
clean up.
YiqinZhao Jun 2, 2025
5f97dcc
fix: dep locks
YiqinZhao Jun 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
78 changes: 78 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: CI

on:
push:
branches:
- main

pull_request:
branches:
- main

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# security: restrict permissions for CI jobs.
permissions:
contents: read

jobs:
server-ci:
name: Server CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Python
id: install_python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install Poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: "1.8.4"

- name: Setup a local virtual environment (if no poetry.toml file)
working-directory: ./python
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local

- name: Restore cached virtualenv
uses: actions/cache/restore@v4
with:
path: ./python/.venv
key: venv-${{ runner.os }}-${{
steps.install_python.outputs.python-version }}-${{
hashFiles('./python/poetry.lock') }}

- name: Install dependencies (used by later workflows)
working-directory: ./python
run: |
poetry install
echo "$(poetry env info --path)/bin" >> $GITHUB_PATH
echo "VIRTUAL_ENV=$(poetry env info --path)/bin" >> $GITHUB_ENV

- name: Saved cached virtualenv
uses: actions/cache/save@v4
with:
path: ./python/.venv
key: venv-${{ runner.os }}-${{
steps.install_python.outputs.python-version }}-${{
hashFiles('./python/poetry.lock') }}

- name: Lint with ruff
working-directory: ./python
run: ruff check --output-format=github

# - name: Typecheck with pyright
# working-directory: ./python
# run: pyright arflow
#
# - name: Test with pytest
# working-directory: ./python
# timeout-minutes: 5 # pytest sometimes hangs for (yet) unknown reasons
# run: |
# pytest
17 changes: 0 additions & 17 deletions .github/workflows/main.yml

This file was deleted.

71 changes: 71 additions & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Pre-release

on:
push:
tags:
- "*"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

permissions:
contents: write

jobs:
release:
name: Release package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Python
id: install_python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install Poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: "1.8.4"

- name: Setup a local virtual environment (if no poetry.toml file)
working-directory: ./python
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local

- name: Restore cached virtualenv
uses: actions/cache/restore@v4
with:
path: ./python/.venv
key:
venv-${{ runner.os }}-${{
steps.install_python.outputs.python-version }}-${{
hashFiles('./python/poetry.lock') }}

- name: Install dependencies (skipped if cache hit, fallback to install)
working-directory: ./python
run: |
poetry install
echo "$(poetry env info --path)/bin" >> $GITHUB_PATH
echo "VIRTUAL_ENV=$(poetry env info --path)/bin" >> $GITHUB_ENV

- name: Saved cached virtualenv
uses: actions/cache/save@v4
with:
path: ./python/.venv
key:
venv-${{ runner.os }}-${{
steps.install_python.outputs.python-version }}-${{
hashFiles('./python/poetry.lock') }}

- name: Configure Test PyPI with Poetry
working-directory: ./python
run: |
poetry config repositories.testpypi https://test.pypi.org/legacy/
poetry config pypi-token.testpypi ${{ secrets.TEST_PYPI_API_TOKEN }}

- name: Build and publish the package
working-directory: ./python
run: poetry publish --build -r testpypi
146 changes: 146 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
name: Publish docs

on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
workflow_call:

permissions:
pages: write
id-token: write

jobs:
build-protos-docs:
name: Build protos docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Buf CLI
uses: bufbuild/buf-setup-action@v1.47.2 # must match mise.toml
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Install protoc
uses: arduino/setup-protoc@v1

- name: Build protos docs
run: buf generate

- uses: actions/upload-artifact@v4
with:
name: protos-docs
path: ./website/docs/protos

build-client-docs:
name: Build client docs
runs-on: windows-latest
steps:
- uses: actions/checkout@v4

- name: Dotnet Setup
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.x

- name: Update docfx
run: dotnet tool update -g docfx

- name: Run script to build the documentation
working-directory: ./unity/Documentation
run: ./scripts/build.cmd

- uses: actions/upload-artifact@v4
with:
name: client-docs
path: ./website/docs/client

build-server-docs:
name: Build server docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Python
id: install_python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install Poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: "1.8.4"

- name: Setup a local virtual environment (if no poetry.toml file)
working-directory: ./python
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local

- name: Restore cached virtualenv
uses: actions/cache/restore@v4
with:
path: ./python/.venv
key:
venv-${{ runner.os }}-${{
steps.install_python.outputs.python-version }}-${{
hashFiles('./python/poetry.lock') }}

- name: Install docs dependencies
working-directory: ./python
run: |
poetry install --with docs
echo "$(poetry env info --path)/bin" >> $GITHUB_PATH
echo "VIRTUAL_ENV=$(poetry env info --path)/bin" >> $GITHUB_ENV

- name: Build the documentation
working-directory: ./python
run: python tools/make_docs_cli.py

- uses: actions/upload-artifact@v4
with:
name: server-docs
path: ./website/docs/server

upload-website:
name: Upload website
needs: [build-protos-docs, build-client-docs, build-server-docs]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/download-artifact@v4
with:
name: protos-docs
path: ./website/docs/protos

- uses: actions/download-artifact@v4
with:
name: client-docs
path: ./website/docs/client

- uses: actions/download-artifact@v4
with:
name: server-docs
path: ./website/docs/server

- uses: actions/upload-pages-artifact@v3
with:
path: ./website

# Single deploy job since we're just deploying
deploy-website:
name: Deploy website
needs: upload-website
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
82 changes: 82 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Release

on:
release:
types:
- published

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

permissions:
contents: write

jobs:
release:
name: Release package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Python
id: install_python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install Poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: "1.8.4"

- name: Setup a local virtual environment (if no poetry.toml file)
working-directory: ./python
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local

- name: Restore cached virtualenv
uses: actions/cache/restore@v4
with:
path: ./python/.venv
key:
venv-${{ runner.os }}-${{
steps.install_python.outputs.python-version }}-${{
hashFiles('./python/poetry.lock') }}

- name: Install dependencies (skipped if cache hit, fallback to install)
working-directory: ./python
run: |
poetry install
echo "$(poetry env info --path)/bin" >> $GITHUB_PATH
echo "VIRTUAL_ENV=$(poetry env info --path)/bin" >> $GITHUB_ENV

- name: Saved cached virtualenv
uses: actions/cache/save@v4
with:
path: ./python/.venv
key:
venv-${{ runner.os }}-${{
steps.install_python.outputs.python-version }}-${{
hashFiles('./python/poetry.lock') }}

- name: Use PyPI API token
working-directory: ./python
run: poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}

- name: Build and publish the package
working-directory: ./python
run: poetry publish --build

- name: Upload Python package to GitHub
uses: actions/upload-artifact@v4
with:
path: ./python/dist/
if-no-files-found: error

publish-docs:
name: Publish documentation
permissions:
pages: write
id-token: write
uses: ./.github/workflows/publish-docs.yml
Loading