Let amy_render_audio register amy_update_handle itself #1234
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: C/C++ CI | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ['3.12', '3.13', '3.14'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: pip install numpy soundfile | |
| # The one Linux job that HAS libasound, so src/linux_midi.c (ALSA raw | |
| # MIDI) is actually compiled somewhere. It is optional and detected, | |
| # so every other Linux job here builds the without-ALSA path -- which | |
| # is the arrangement that keeps both honest. | |
| - name: Install ALSA headers | |
| run: sudo apt-get update && sudo apt-get install -y libasound2-dev | |
| - name: Build and test | |
| env: | |
| AMY_TEST_THRESHOLD_DB: "-70.0" | |
| run: make test | |
| web: | |
| # Build the emscripten / WASM target (`make web`) so breaks there are caught. | |
| # The other CI jobs build the MCU targets and run the Python tests but never | |
| # the browser build, so e.g. a stale `make web` EXPORTED_FUNCTIONS entry | |
| # (exporting a removed symbol) links fine on-device yet fails wasm-ld. | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Install dependencies | |
| run: pip install numpy | |
| - uses: mymindstorm/setup-emsdk@v14 | |
| with: | |
| # Pin to the emsdk the web build is developed/deployed against. Newer | |
| # emsdk fails the link with undefined pthread_* symbols under the | |
| # AUDIO_WORKLET / WASM_WORKERS flags make web uses. | |
| version: 4.0.22 | |
| - name: Build web (emscripten) | |
| run: make web | |
| godot-api: | |
| # The Godot send() kwarg map in godot/amy.gd is generated from | |
| # amy/__init__.py's _KW_MAP_LIST. Fail the build if a PR changed the Python | |
| # source without regenerating (so Godot can't silently drift like it did | |
| # before), and confirm the generated GDScript still parses. | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Install gdtoolkit (gdparse) | |
| run: pip install "gdtoolkit==4.*" | |
| - name: Regenerate Godot API map | |
| run: make godot-api | |
| - name: Validate GDScript parses | |
| run: gdparse godot/amy.gd | |
| - name: Check godot/amy.gd is in sync with amy/__init__.py | |
| run: | | |
| if ! git diff --quiet -- godot/amy.gd; then | |
| echo "::error::godot/amy.gd is out of sync with amy/__init__.py _KW_MAP_LIST. Run 'make godot-api' and commit the result." | |
| git diff -- godot/amy.gd | |
| exit 1 | |
| fi | |
| c-api: | |
| # The cross-platform C API bindings (pyamy/micropython/web/godot .inc + .js | |
| # files, the amy/__init__.py dispatch block, and godot/amy.gd's C API | |
| # section) are generated from the table in scripts/gen_amy_c_api.py. Fail | |
| # the build if a PR edited the table (or a generated file) without | |
| # regenerating, so the four platforms can't drift. | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Check generated C API bindings are in sync | |
| run: make check-c-api | |
| godot-build: | |
| # Build the Godot GDExtension for Linux. amy_midi.c is excluded from the | |
| # Godot build, so new functions there that core code calls need stubs in | |
| # godot/src/amy_platform_stubs.c — without this job that only surfaces as a | |
| # Windows link failure at release time (which silently ships releases with | |
| # no addon zip). The SConstruct links Linux with -Wl,--no-undefined so the | |
| # same unresolved symbols fail here, on the PR. | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install scons | |
| run: pip install scons | |
| - name: Checkout godot-cpp | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: godotengine/godot-cpp | |
| ref: godot-4.4-stable | |
| path: godot-cpp | |
| submodules: true | |
| - name: Build GDExtension (Linux debug) | |
| working-directory: godot | |
| run: scons platform=linux arch=x86_64 target=template_debug -j4 | |
| env: | |
| GODOT_CPP_PATH: ${{ github.workspace }}/godot-cpp | |
| AMY_SRC_PATH: ${{ github.workspace }}/src |