mirror of
https://github.com/OpenTTD/OpenTTD
synced 2025-12-10 06:52:05 +01:00
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
77 lines
1.7 KiB
YAML
77 lines
1.7 KiB
YAML
name: CI (Windows)
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
arch:
|
|
required: true
|
|
type: string
|
|
|
|
env:
|
|
CTEST_OUTPUT_ON_FAILURE: 1
|
|
|
|
jobs:
|
|
windows:
|
|
name: CI
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Setup vcpkg
|
|
uses: ./.github/actions/setup-vcpkg
|
|
with:
|
|
vcpkg-location: ${{ runner.temp }}/vcpkg
|
|
|
|
- name: Install OpenGFX
|
|
shell: bash
|
|
run: |
|
|
mkdir -p "C:/Users/Public/Documents/OpenTTD/baseset"
|
|
cd "C:/Users/Public/Documents/OpenTTD/baseset"
|
|
|
|
echo "::group::Download OpenGFX"
|
|
curl -L https://cdn.openttd.org/opengfx-releases/0.6.0/opengfx-0.6.0-all.zip -o opengfx-all.zip
|
|
echo "::endgroup::"
|
|
|
|
echo "::group::Unpack OpenGFX"
|
|
unzip opengfx-all.zip
|
|
echo "::endgroup::"
|
|
|
|
rm -f opengfx-all.zip
|
|
|
|
- name: Install MSVC problem matcher
|
|
uses: ammaraskar/msvc-problem-matcher@master
|
|
|
|
- name: Configure developer command prompt for ${{ inputs.arch }}
|
|
uses: ilammy/msvc-dev-cmd@v1
|
|
with:
|
|
arch: ${{ inputs.arch }}
|
|
|
|
- name: Build
|
|
shell: bash
|
|
env:
|
|
NINJA_STATUS: "[%f/%t -- %e] " # [finished_edges/total_edges -- elapsed_time], default value is "[%f/%t] "
|
|
run: |
|
|
mkdir build
|
|
cd build
|
|
|
|
echo "::group::CMake"
|
|
cmake .. \
|
|
-GNinja \
|
|
-DVCPKG_TARGET_TRIPLET=${{ inputs.arch }}-windows-static \
|
|
-DCMAKE_TOOLCHAIN_FILE="${{ runner.temp }}\vcpkg\scripts\buildsystems\vcpkg.cmake" \
|
|
# EOF
|
|
echo "::endgroup::"
|
|
|
|
echo "::group::Build"
|
|
cmake --build .
|
|
echo "::endgroup::"
|
|
|
|
- name: Test
|
|
shell: bash
|
|
run: |
|
|
cd build
|
|
ctest --timeout 120
|