Repository navigation
docs: describe the linguist identity, the ABI policy and the vcpkg build #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 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 | |
| features: "--x-feature=onnx --x-feature=tests" | |
| 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: 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_BUILD_TESTS=ON ${{ matrix.options }} | |
| - 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 package | |
| # The test fixtures under src/tests/auto/packages include deliberately broken packages, so | |
| # the lint runs on the package that ships with the repository. | |
| run: python3 scripts/check-declarations.py packages/wolf-lang-zxx | |
| - 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 |