Repository navigation
docs: define the beat-layer release rule and add its onset depth tests #5
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 wolf 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: | |
| # The workflow runs on the integration branches as well as on main. Work stays on an | |
| # integration branch for weeks before it reaches main, and a workflow restricted to main does | |
| # not run in that period. | |
| branches: [main, "linguistic-**"] | |
| pull_request: | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-24.04 | |
| triplet: x64-linux | |
| # The lang-packages feature installs the data packages from the release that the | |
| # port pins, which is the only step that touches those URLs and SHA512 values. | |
| # It covers test_ConvertedPackages; the cases that need the shared G2P model backend, | |
| # which the port installs only with its non-default `multi` feature, or the voicebank | |
| # fixture, which this workflow never generates, still skip here. | |
| features: "--x-feature=onnx --x-feature=tests --x-feature=lang-packages" | |
| options: "" | |
| - os: windows-2022 | |
| triplet: x64-windows | |
| features: "--x-feature=onnx --x-feature=tests" | |
| options: "" | |
| 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 | |
| - 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 \ | |
| ${{ matrix.features }} | |
| - name: Generate the test fixture packages | |
| # The packages are not committed; the tests that read them skip when they are absent, so | |
| # this step keeps the fixture suite running in CI. | |
| run: python3 scripts/make-test-fixtures.py --output build/test-fixtures | |
| - 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 \ | |
| -DWOLF_TEST_FIXTURES_SOURCE="$PWD/build/test-fixtures" \ | |
| -DWOLF_BUILD_TESTS=ON ${{ matrix.options }} | |
| - name: Build | |
| run: cmake --build build/cmake | |
| - name: Run the lint unit tests | |
| run: python3 -m unittest discover -s scripts -p "test_*.py" | |
| - name: Lint the shipped package | |
| # The fixtures include deliberately broken packages, so the lint runs on the package that | |
| # ships with the repository, which the step above generated with them. | |
| run: python3 scripts/check-declarations.py build/test-fixtures/wolf-lang-zxx | |
| - name: Check the release pins against their copies | |
| # The port verifies the pinned SHA512 against the archives it downloads. This step | |
| # compares the same pins against the copies inside the repository, and reports the | |
| # comparisons that a clean checkout cannot run instead of passing them silently. | |
| run: python3 scripts/check-release-assets.py | |
| - 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 installed package | |
| # that a host consumes. The install rules write the targets, the include directories and | |
| # the plugin directory of that package, and no earlier step 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 |