Fixed #15929 #17410
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: 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 | |
steps: | |
- name: Cloning SUMO | |
uses: actions/checkout@v4 | |
with: | |
path: sumo | |
fetch-depth: 0 | |
- name: Cloning SUMO Libraries | |
uses: actions/checkout@v4 | |
with: | |
repository: DLR-TS/SUMOLibraries | |
path: sumolibraries | |
- name: "Set up compiler cache" | |
uses: actions/cache@v4 | |
with: | |
path: C:\Users\runneradmin\AppData\Local\Mozilla\sccache\cache | |
key: ${{ matrix.build_type }}-${{ github.head_ref }}-${{ github.run_number }} | |
restore-keys: | | |
${{ matrix.build_type }}-${{ github.head_ref }}- | |
${{ matrix.build_type }}- | |
# 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: Building SUMO plain | |
if: matrix.build_type == 'plain' | |
run: | | |
python -m pip install build wheel | |
cd sumo | |
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: | | |
cd sumo | |
cmake -Bbuild_msvc -GNinja -DENABLE_JAVA_BINDINGS=false | |
cmake --build build_msvc | |
- name: Building SUMO debug | |
if: github.event_name == 'workflow_dispatch' | |
run: | | |
cd sumo | |
cmake -Bbuild_msvc_debug -GNinja -DCMAKE_BUILD_TYPE=Debug | |
cmake --build build_msvc_debug | |
- name: Building TraaS | |
run: | | |
cd sumo/build_msvc | |
cmake --build . --config Release --target traas | |
- name: Uploading artifacts (SUMO binaries) | |
uses: actions/upload-artifact@v4 | |
with: | |
name: windows-${{ matrix.build_type }}-binaries | |
path: sumo/bin | |
retention-days: 30 | |
- name: Plain examples and tests | |
if: matrix.build_type == 'plain' | |
run: | | |
cd sumo/build_msvc | |
$env:TEXTTEST_TMP = "D:/texttest" | |
$env:TEXTTEST_CI_APPS = "-a activitygen,dfrouter,duarouter,jtrrouter" | |
ctest -R texttest --verbose | |
$env:TEXTTEST_CI_APPS = "-a marouter,netgen,od2trips,polyconvert,netconvert" | |
ctest -R texttest --verbose | |
$env:TEXTTEST_CI_APPS = "-a sumo" | |
ctest -R texttest --verbose | |
- name: Examples and extra tests | |
if: matrix.build_type == 'extra' && github.repository == 'DLR-TS/sumo' | |
run: | | |
python -m pip install -r sumo/tools/req_ci.txt -r sumo/tools/requirements.txt | |
cd sumo/build_msvc | |
cmake --build . --config Release --target examples | |
$env:TEXTTEST_TMP = "D:/texttest" | |
$env:TEXTTEST_CI_APPS = "-a complex,tools,traci" | |
ctest --build-config Release --verbose | |
$env:TEXTTEST_CI_APPS = "-a sumo.meso,sumo.extra,netconvert.gdal,polyconvert.gdal" | |
ctest --build-config Release --verbose | |
- name: Compressing test results | |
if: failure() && github.repository == 'DLR-TS/sumo' | |
run: | | |
dir d:\texttest | |
Compress-Archive -Path D:/texttest -DestinationPath D:/texttest/tt.zip | |
dir d:\texttest | |
- name: Uploading test results | |
if: failure() && github.repository == 'DLR-TS/sumo' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: texttesttmp-${{ matrix.build_type }} | |
path: D:/texttest/tt.zip | |
if-no-files-found: warn |