-
Notifications
You must be signed in to change notification settings - Fork 1.5k
129 lines (114 loc) · 3.73 KB
/
windows.yml
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
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
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: 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'
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()
run: |
dir d:\texttest
Compress-Archive -Path D:/texttest -DestinationPath D:/texttest/tt.zip
dir d:\texttest
- 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