Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,18 +175,20 @@ jobs:
if [ "$RUNNER_OS" = "Windows" ]; then cl 2>&1 | head -1; else c++ --version | head -1; fi
echo "CARGO_TARGET_DIR=$GITHUB_WORKSPACE/target" >> "$GITHUB_ENV"
echo "DSTUDIO_DEPS_DIR=$GITHUB_WORKSPACE/.deps" >> "$GITHUB_ENV"
- name: Cache SDK downloads
# The SDK downloads, the cargo target dir (debug builds only in this
# job) and the ccache store are restored on every run but saved only by
# pushes to main and the nightly run. Pull requests then start from
# main's latest build, and their own saves cannot fill the repository's
# 10 GB cache and evict main's.
- name: Restore SDK downloads
id: deps-cache
if: steps.changes.outputs.engine == 'true'
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: .deps
key: deps-${{ runner.os }}-${{ hashFiles('engine/CMakeLists.txt') }}
# The cargo target dir (debug builds only in this job) and the ccache
# store are restored on every run but saved only by pushes to main and
# the nightly run, under a new key each time. Pull requests then start
# from main's latest build, and their own saves cannot fill the
# repository's 10 GB cache and evict main's. The cargo-v2 fallback is the
# layout before the tests/app split (one cache with both profiles).
# The cargo and ccache keys are new on every save. The cargo-v2 fallback
# is the layout before the tests/app split (one cache with both profiles).
- name: Restore cargo registry and target
if: steps.changes.outputs.run == 'true'
id: cargo-cache
Expand Down Expand Up @@ -259,6 +261,12 @@ jobs:
- name: ccache statistics
if: steps.changes.outputs.run == 'true' && !cancelled()
run: ccache --show-stats
- name: Save SDK downloads
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' && steps.changes.outputs.engine == 'true' && steps.deps-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: .deps
key: ${{ steps.deps-cache.outputs.cache-primary-key }}
- name: Save cargo registry and target
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' && steps.changes.outputs.run == 'true' && !cancelled()
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
Expand Down
6 changes: 4 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@ cd engine && cmake --preset default && cmake --build --preset default && ctest -
cargo run --release -p dstudio-app -- --self-test --no-audio # drive the real UI through its checks
```

CI runs the tests and the self-test (not the interactive `--demo`) on macOS, Windows and Linux for every pull request.
CI runs the tests and the self-test (not the interactive `--demo`) on macOS, Windows and Linux. A pull request runs the
parts its changes reach: documentation-only changes run none, engine-test-only changes skip the Rust tests and the app,
and anything CI can't classify runs everything (the rules are in docs/building.md).
Its runners have no audio device, so the self-test runs with `--no-audio` (Linux also runs it against a headless
PipeWire server) and anything that needs audio hardware has to be tested by hand. The Windows self-test takes about
30 minutes under the software renderer, so pull requests run it only with the `windows-self-test` label; main and
30 minutes under the software renderer, so pull requests that change the app run it only with the `windows-self-test` label; main and
the nightly run always run it, and a failure fails the job. The engine is built with warnings as errors on
clang, MSVC and GCC, so please build on more than one compiler if you can, or check the CI result.

Expand Down
20 changes: 11 additions & 9 deletions docs/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,16 @@ jobs that run side by side:
- **tests (system)** configures and builds the engine with warnings as errors
and runs ctest, then builds and tests the Rust workspace (`cargo test
--workspace --locked`, debug).
- **app (system)** builds the app in release mode and runs its smoke tests: a
reference-state screenshot and `device-studio --self-test`, which must report
every check passed (`tools/ci/self-test.sh`). macOS runs `--no-audio`; Linux
runs `--no-audio` and `--self-test-audio` side by side under Xvfb with Mesa
- **app (system)** builds the app in release mode and runs its smoke tests.
`device-studio --self-test` must report every check passed
(`tools/ci/self-test.sh`). macOS runs `--self-test --no-audio` (no
screenshot); Linux takes a reference-state screenshot and runs `--no-audio`
and `--self-test-audio`, all three side by side under Xvfb with Mesa
lavapipe; Windows takes the screenshot under WARP on every run, and runs the
full self-test (about 30 minutes under WARP) on pushes to main, the nightly
run, manual runs, and pull requests labelled `windows-self-test`. The
screenshots and self-test logs are uploaded as an artifact.
run, manual runs, and pull requests labelled `windows-self-test` whose
changes reach the app. The screenshots and self-test logs are uploaded as an
artifact.

A **lint** job checks the workflows (actionlint, which also runs shellcheck on
their scripts), the scripts in `tools/`, the change detection below and the
Expand All @@ -188,9 +190,9 @@ main and the nightly run. A job with nothing to do still runs and passes, so
the required checks always report.

Caches: the cargo registry and target dir (one per system and job, so debug and
release are restored separately) and the ccache store are restored on every run
and saved only by main and the nightly run, so a pull request never writes a
cache another run uses. Every C/C++ compile goes through ccache. Before
release are restored separately), the ccache store and the engine's SDK
downloads are restored on every run and saved only by main and the nightly run,
so a pull request never writes a cache another run uses. Every C/C++ compile goes through ccache. Before
building, [`tools/ci/prepare-target.sh`](../tools/ci/prepare-target.sh) makes
every source newer than the restored build (so nothing restored is reused for
changed code) and reconfigures the engine's CMake tree from scratch.
Expand Down
17 changes: 9 additions & 8 deletions engine/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,24 +118,25 @@ POSIX signal or Windows NTSTATUS exception code).
| Plugin editors | NSWindow (AU/VST3/CLAP) | top-level HWND hosting the plugin child window (VST3 `kPlatformTypeHWND`, CLAP `win32`) | X11 top-level window hosting the plugin window (VST3 `kPlatformTypeX11EmbedWindowID`, CLAP `x11`), XWayland on Wayland; see [Plugins on Windows and Linux](#plugins-on-windows-and-linux) |
| Scanner children | `posix_spawn` | `CreateProcessW` (no WER dialogs in the child) | `posix_spawn` |
| Test plugins | `.clap`/`.vst3` bundles | `.clap` DLL, `.vst3/Contents/x86_64-win/*.vst3`, + `DStudioTestGui.clap` | `.clap` .so, `.vst3/Contents/x86_64-linux/*.so` |
| Built with warnings as errors | yes (clang, `-Werror`), every CI run | yes (`/W4 /WX`), every CI run | yes (GCC, `-Werror`), every CI run |
| ctest | all tests, every CI run; device tests skip on the hosted runner (no audio device), run by hand on a Mac | all tests, every CI run; AU tests and device tests skip (no audio endpoint) | all tests, every CI run, against a headless PipeWire server (null sink + loopback); AU tests skip |
| Built with warnings as errors | yes (clang, `-Werror`) in CI | yes (`/W4 /WX`) in CI | yes (GCC, `-Werror`) in CI |
| ctest | all tests in CI; device tests skip on the hosted runner (no audio device), run by hand on a Mac | all tests in CI; AU tests and device tests skip (no audio endpoint) | all tests in CI, against a headless PipeWire server (null sink + loopback); AU tests skip |
| Tested on real audio hardware | yes (Core Audio output + duplex, see below) | **no** | **no** (real PipeWire streams in CI, no sound card) |

**CI** (`.github/workflows/ci.yml`) runs one job per OS, all on GitHub-hosted
runners (`macos-latest`, `windows-latest`, `ubuntu-latest`), none with an
audio device. Each job builds the engine with warnings as errors, runs
**CI** (`.github/workflows/ci.yml`) runs on GitHub-hosted runners
(`macos-latest`, `windows-latest`, `ubuntu-latest`), none with an audio
device. On each system it builds the engine with warnings as errors, runs
ctest, builds and tests the Rust workspace and runs the app's
`--self-test --no-audio`.
`--self-test --no-audio`. Pushes to main and the nightly run do all of it;
a pull request runs the parts its changes reach (see docs/building.md).

The app (`crates/dstudio-app`) builds on all three. The hosted jobs run it
without a GPU or audio device: on Linux under Xvfb with Mesa lavapipe (software Vulkan;
`SLINT_WGPU_CPU=1`), a `--state reference-default` screenshot and the full `--self-test
--no-audio` (125 checks pass; the 21 checks of the Audio Unit devices section
are reported as skipped off macOS), as a required step; on Windows with WARP
(DX12 software adapter) the same, also failing the job when a check fails (the
full self-test runs on main, nightly and labelled pull requests; see
docs/building.md): the screenshot renders and the self-test passes, but the
full self-test runs on main, nightly and labelled pull requests that change
the app; see docs/building.md): the screenshot renders and the self-test passes, but the
process exits with code 0x87A after the run (not yet explained; macOS/Linux
exit 0), so CI prints that exit code and checks the summary line instead.
Debug builds of the app abort at exit on every OS (pre-existing: wgpu-core's
Expand Down
Loading