Repository navigation
docs: describe the library for hosts and the ds-editor-lite integration #2
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
| # Builds and tests otter on Linux and Windows. | |
| # | |
| # The dependency tree comes from vcpkg through the manifest in scripts/vcpkg-manifest, with the | |
| # in-repo ports in scripts/vcpkg-ports searched before the shared overlay submodule. | |
| name: ci | |
| on: | |
| push: | |
| # Covers the integration branches as well as the trunk, because work stays on an integration | |
| # branch for weeks. A workflow restricted to a branch absent from this repository never runs: | |
| # the trunk is main, as in wolf. | |
| branches: [main, "analysis-**"] | |
| pull_request: | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-24.04 | |
| triplet: x64-linux | |
| - os: windows-2022 | |
| triplet: x64-windows | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install build tools | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ninja-build python3 | |
| # The model fixtures are generated at build time when a Python with onnx is present. | |
| python3 -m pip install --user --break-system-packages onnx numpy | |
| - name: Set up the MSVC environment | |
| if: runner.os == 'Windows' | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| - name: Set up vcpkg | |
| uses: lukka/run-vcpkg@v11 | |
| with: | |
| vcpkgDirectory: ${{ runner.temp }}/vcpkg | |
| vcpkgGitCommitId: 1fddddc280dfed63956e15ef74f4321bc6a219c9 | |
| runVcpkgInstall: false | |
| - name: Install dependencies | |
| shell: bash | |
| run: | | |
| "${{ runner.temp }}/vcpkg/vcpkg" install \ | |
| --x-manifest-root=scripts/vcpkg-manifest \ | |
| --x-install-root=build/vcpkg_installed \ | |
| --x-feature=onnx --x-feature=tests | |
| - name: Configure | |
| shell: bash | |
| run: | | |
| cmake -S . -B build/cmake -G Ninja \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DCMAKE_TOOLCHAIN_FILE="${{ runner.temp }}/vcpkg/scripts/buildsystems/vcpkg.cmake" \ | |
| -DVCPKG_INSTALLED_DIR="$PWD/build/vcpkg_installed" \ | |
| -DVCPKG_MANIFEST_MODE=OFF \ | |
| -DOTTER_BUILD_TESTS=ON | |
| - name: Build | |
| run: cmake --build build/cmake | |
| - name: Run the lint self tests | |
| run: python3 -m unittest discover -s scripts -p "test_*.py" | |
| - name: Lint the shipped declarations | |
| # The repository holds the declarations without their models, so only the declarations | |
| # are checked here; make-package.py checks the files when a package is assembled. | |
| run: python3 scripts/check-declarations.py --declarations-only packages/rmvpe packages/game packages/hfa | |
| - name: Test | |
| # Data dependent tests exit with the skip status when their packages are absent. | |
| run: ctest --test-dir build/cmake --output-on-failure | |
| - name: Check the installed CMake package | |
| # The test suite above exercises the code, and this step exercises the package a host | |
| # consumes. The install rules write its targets, include directories and plugin directory, | |
| # and only a consumer reads them. | |
| shell: bash | |
| run: | | |
| cmake --install build/cmake --prefix build/install | |
| cmake -S .github/consumer -B build/consumer -G Ninja \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DCMAKE_TOOLCHAIN_FILE="${{ runner.temp }}/vcpkg/scripts/buildsystems/vcpkg.cmake" \ | |
| -DVCPKG_INSTALLED_DIR="$PWD/build/vcpkg_installed" \ | |
| -DVCPKG_MANIFEST_MODE=OFF \ | |
| -DCMAKE_PREFIX_PATH="$PWD/build/install" | |
| cmake --build build/consumer |