Std r10996 #1
This file contains 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: msvc-build | ||
on: | ||
workflow_call: | ||
inputs: | ||
backend: | ||
required: false | ||
type: string | ||
default: posix | ||
target: | ||
required: false | ||
type: string | ||
default: simutrans | ||
build_type: | ||
required: false | ||
type: string | ||
default: Release | ||
additional_dependencies: | ||
required: false | ||
type: string | ||
default: "" | ||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
- name: Init variables | ||
shell: bash | ||
run: python ./.github/init_env.py "${{inputs.target}}" "${{inputs.backend}}" "${{inputs.build_type}}" "windows" | ||
- name: Setup msbuild | ||
uses: microsoft/[email protected] | ||
- name: Setup CMake 3.23.0 | ||
uses: lukka/[email protected] | ||
- name: vcpkg install | ||
run: vcpkg/vcpkg.exe install boost-program-options:x64-windows | ||
- name: vcpkg integrate install | ||
run: vcpkg/vcpkg.exe integrate install | ||
- name: Configure Simutrans | ||
run: cmake .. -DSIMUTRANS_BACKEND=${{inputs.backend}} -G "Visual Studio 17 2022" -A x64 -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/build/vcpkg/scripts/buildsystems/vcpkg.cmake | ||
working-directory: ${{ github.workspace }}/build | ||
- name: Build Simutrans | ||
run: cmake --build . --target ${{inputs.target}}-extended --config ${{inputs.build_type}} | ||
working-directory: ${{ github.workspace }}/build | ||
- name: Upload Artifact (CI) | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{env.st_artifact_name}} | ||
path: ${{ github.workspace }}/${{env.st_artifact_path}} | ||
if-no-files-found: error |