windows #2455
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
name: windows | |
on: | |
push: # run on push events | |
paths-ignore: # but ignore everything in the docs subfolder | |
- 'docs/**' | |
branches: | |
- '**' | |
tags: | |
- '*' | |
pull_request: # run on pull requests | |
paths-ignore: # but ignore everything in the docs subfolder | |
- 'docs/**' | |
workflow_dispatch: | |
schedule: | |
- cron: '25 1 * * *' | |
jobs: | |
build: | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
build_type: [plain, extra] | |
env: | |
CC: cl | |
CXX: cl | |
SUMO_LIBRARIES: D:\a\sumo\sumo\SUMOLibraries | |
TEXTTEST_TMP: D:/texttest | |
steps: | |
- name: Cloning SUMO | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
filter: tree:0 | |
# to work around actions/checkout#1467 | |
ref: ${{ github.ref }} | |
- name: Cloning SUMO Libraries | |
uses: actions/checkout@v4 | |
with: | |
repository: DLR-TS/SUMOLibraries | |
path: SUMOLibraries | |
- name: ccache | |
# do a clean build once a day | |
if: github.event_name != 'schedule' | |
uses: hendrikmuhs/[email protected] | |
with: | |
key: ${{ matrix.build_type }} | |
variant: sccache | |
# required for CMake to find Ninja | |
- name: "Set up MSVC Developer Command Prompt" | |
# uses: seanmiddleditch/gha-setup-vsdevenv@v4 # disabled until it gets an update for node.js | |
uses: compnerd/gha-setup-vsdevenv@main | |
- name: Setup Python dependencies | |
# the pipdeptree below is just for debugging but often comes handy so keep it enabled | |
run: | | |
python -m pip install -r tools/req_ci.txt -r tools/requirements.txt texttest pipdeptree | |
pipdeptree | |
- name: Building SUMO plain | |
if: matrix.build_type == 'plain' | |
run: | | |
python -m pip install build wheel | |
cmake -Bbuild_msvc -GNinja -DCHECK_OPTIONAL_LIBS=false -DENABLE_JAVA_BINDINGS=false | |
cmake --build build_msvc | |
- name: Building SUMO extra | |
if: matrix.build_type == 'extra' | |
run: | | |
cmake -Bbuild_msvc -GNinja -DENABLE_JAVA_BINDINGS=false | |
cmake --build build_msvc | |
- name: Building SUMO debug | |
if: github.event_name == 'workflow_dispatch' | |
run: | | |
cmake -Bbuild_msvc_debug -GNinja -DCMAKE_BUILD_TYPE=Debug | |
cmake --build build_msvc_debug | |
- name: Building TraaS | |
run: cmake --build build_msvc --config Release --target traas | |
- name: Uploading artifacts (SUMO binaries) | |
uses: actions/upload-artifact@v4 | |
with: | |
name: windows-${{ matrix.build_type }}-binaries | |
path: bin | |
retention-days: 30 | |
- name: Running examples and unit tests | |
run: | | |
cmake --build build_msvc --config Release --target examples | |
ctest --test-dir build_msvc --output-on-failure | |
# The following tests need to be split because of resource constraints. If they are not in separate steps | |
# a failing texttest run will not let the step fail because only the final exit code counts. | |
- name: activitygen and router tests | |
if: matrix.build_type == 'plain' | |
run: | | |
$env:TEXTTEST_CI_APPS = "-a activitygen,dfrouter,duarouter,jtrrouter,marouter" | |
tests\runCiTests.bat texttest.exe | |
- name: network building, od2trips and polyconvert tests | |
if: matrix.build_type == 'plain' | |
run: | | |
$env:TEXTTEST_CI_APPS = "-a netgen,od2trips,polyconvert,netconvert" | |
tests\runCiTests.bat texttest.exe | |
- name: sumo tests | |
if: matrix.build_type == 'plain' | |
run: | | |
$env:TEXTTEST_CI_APPS = "-a sumo" | |
tests\runCiTests.bat texttest.exe | |
- name: Running dependency checker | |
if: matrix.build_type == 'extra' | |
run: | | |
Invoke-WebRequest -Uri https://github.com/lucasg/Dependencies/releases/download/v1.11.1/Dependencies_x64_Release_.without.peview.exe.zip -OutFile Dependencies.zip | |
7z x -oDependencies Dependencies.zip | |
$env:PATH += ";$pwd\bin" | |
dir tools\libsumo | |
Dependencies\Dependencies.exe -modules -depth 2 tools\libsumo\_libsumo.pyd | |
- name: complex, traci and tools tests | |
if: matrix.build_type == 'extra' | |
run: | | |
$env:PATH += ";$pwd\bin" | |
$env:TEXTTEST_CI_APPS = "-a complex,traci,tools" | |
tests\runCiTests.bat texttest.exe | |
- name: meso, extra and gdal tests | |
if: matrix.build_type == 'extra' | |
run: | | |
$env:TEXTTEST_CI_APPS = "-a sumo.meso,sumo.extra,netconvert.gdal,polyconvert.gdal" | |
tests\runCiTests.bat texttest.exe | |
- name: Compressing test results | |
if: failure() | |
run: Compress-Archive -Path D:/texttest -DestinationPath D:/texttest/tt.zip | |
- name: Uploading test results | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: texttesttmp-${{ matrix.build_type }} | |
path: D:/texttest/tt.zip | |
if-no-files-found: warn |