-
Notifications
You must be signed in to change notification settings - Fork 1.7k
158 lines (136 loc) · 5.09 KB
/
windows.yml
File metadata and controls
158 lines (136 loc) · 5.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
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@v6
with:
fetch-depth: 0
filter: tree:0
# to work around actions/checkout#1467
ref: ${{ github.ref }}
- name: Cloning SUMO Libraries
uses: actions/checkout@v6
with:
repository: DLR-TS/SUMOLibraries
path: SUMOLibraries
- name: Setup fail-fast PowerShell
run: |
if (-not (Test-Path $PROFILE.CurrentUserAllHosts)) {
New-Item -ItemType File -Path $PROFILE.CurrentUserAllHosts -Force | Out-Null
}
Add-Content -Path $PROFILE.CurrentUserAllHosts -Value '$ErrorActionPreference = "Stop"'
- name: ccache
# do a clean build once a day
if: github.event_name != 'schedule'
uses: hendrikmuhs/ccache-action@v1.2
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@v7
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@v7
with:
name: texttesttmp-${{ matrix.build_type }}
path: D:/texttest/tt.zip
if-no-files-found: warn