chore: Update build #3
Workflow file for this run
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: Visual Studio 2022 | |
on: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- '.github/workflows/**' | |
jobs: | |
build_cmake: | |
name: cmake | |
runs-on: windows-2022 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Copy vcpkg.json | |
run: copy vcpkg_medium.json vcpkg.json | |
- name: Add msbuild to PATH | |
uses: microsoft/setup-msbuild@v2 | |
# Restore from cache the previously built ports. If cache-miss, download and build vcpkg (aka "bootstrap vcpkg"). | |
- name: Restore from cache and install vcpkg | |
# Download and build vcpkg, without installing any port. If content is cached already, it is a no-op. | |
uses: lukka/run-vcpkg@v11.5 | |
with: | |
runVcpkgInstall: false | |
vcpkgJsonGlob: '**/vcpkg.json' | |
vcpkgGitCommitId: b322364f06308bdd24823f9d8f03fe0cc86fd46f # https://github.com/microsoft/vcpkg/releases/tag/2024.12.16 | |
- name: Create build directory | |
run: mkdir build | |
- name: Configure build project | |
run: cmake -G "Visual Studio 17 2022" -A x64 -DOSMSCOUT_BUILD_DOC_API=OFF -DCMAKE_SYSTEM_VERSION=10.0.18362.0 -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}\vcpkg\scripts\buildsystems\vcpkg.cmake -Wno-dev .. | |
working-directory: build | |
- name: Build project | |
run: cmake --build build | |
- name: Create distribution directory | |
run: mkdir dist | |
- name: Collect libosmscout | |
run: copy /Y build\libosmscout\Debug\*.dll dist | |
shell: cmd | |
- name: Collect libosmscout-import | |
run: copy /Y build\libosmscout-import\Debug\*.dll dist | |
shell: cmd | |
- name: Collect libosmscout-map | |
run: copy /Y build\libosmscout-map\Debug\*.dll dist | |
shell: cmd | |
- name: Collect libosmscout-map-cairo | |
run: copy /Y build\libosmscout-map-cairo\Debug\*.dll dist | |
shell: cmd | |
- name: Collect libosmscout-map-directx | |
run: copy /Y build\libosmscout-map-directx\Debug\*.dll dist | |
shell: cmd | |
- name: Collect libosmscout-map-gdi | |
run: copy /Y build\libosmscout-map-gdi\Debug\*.dll dist | |
shell: cmd | |
- name: Collect libosmscout-map-svg | |
run: copy /Y build\libosmscout-map-svg\Debug\*.dll dist | |
shell: cmd | |
- name: Collect Import | |
run: copy /Y build\Import\Debug\*.exe dist | |
shell: cmd | |
- name: Collect Demos | |
run: copy /Y build\Demos\Debug\*.exe dist | |
shell: cmd | |
- name: Upload distribution archive | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Libosmscout_Windows.zip | |
path: dist | |
build_meson: | |
name: meson | |
runs-on: windows-2022 | |
defaults: | |
run: | |
shell: cmd | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Python 3.x for meson | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install meson and ninja | |
run: pip install meson ninja | |
- name: Prepare MSVC | |
uses: bus1/cabuild/action/msdevshell@v1 | |
with: | |
architecture: x64 | |
- name: Configure build project | |
run: meson setup --buildtype debugoptimized --wrap-mode nofallback --unity on -DenableXML=false -Dcpp_std=vc++latest build | |
- name: Dump found dependencies | |
run: meson introspect --dependencies | |
working-directory: build | |
- name: Build project | |
run: meson compile -C build | |
- name: Test project | |
run: meson test -C build --print-errorlogs |