windows #122
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/**' | |
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: Fetching SUMO tags | |
run: | | |
cd sumo | |
git fetch --tags --force | |
- 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 wheel | |
cd sumo | |
mkdir build_msvc | |
cd build_msvc | |
cmake .. -GNinja -DCHECK_OPTIONAL_LIBS=false | |
cmake --build . --config Release | |
- name: Building SUMO extra | |
if: matrix.build_type == 'extra' | |
run: | | |
cd sumo | |
mkdir build_msvc | |
cd build_msvc | |
cmake .. -GNinja -DCHECK_OPTIONAL_LIBS=true | |
cmake --build . --config Release | |
- 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 | |
python -m pip install -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 |