forked from eclipse-sumo/sumo
-
Notifications
You must be signed in to change notification settings - Fork 7
137 lines (121 loc) · 4.03 KB
/
build-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
130
131
132
133
134
135
136
137
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, debug]
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 SUMO debug
if: matrix.build_type == 'debug'
run: |
cd sumo
mkdir build_msvc
cd build_msvc
cmake .. -GNinja -DCHECK_OPTIONAL_LIBS=true
cmake --build . --config 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