44 push :
55 paths :
66 - ' .github/workflows/cibuildwheel.yml'
7- - ' build_config/*pyproject.toml'
8- # push: # run on push events
9- # paths-ignore: # but ignore everything in the docs subfolder
10- # - 'docs/**'
11- # - 'src/gui*/**'
12- # - 'src/netedit/**'
13- # - 'tests/netedit/**'
14- # branches:
15- # - '**'
16- # tags:
17- # - '*'
18- # pull_request: # run on pull requests
19- # paths-ignore: # but ignore everything in the docs subfolder
20- # - 'docs/**'
7+ - ' build_config/pyproject/*.toml'
218 workflow_dispatch :
9+ inputs :
10+ os :
11+ type : string
12+ description : " comma separated list of OS"
13+ required : false
14+ workflow_call :
15+ inputs :
16+ os :
17+ type : string
18+ required : false
2219 schedule :
2320 - cron : ' 25 1 * * *'
2421
2522jobs :
23+ generate-matrix :
24+ uses : ./.github/workflows/generate-matrix.yml
25+ with :
26+ os : ${{ inputs.os }}
27+
28+ # ##################
29+ # building pure python wheels
30+ # ##################
31+ pure-python-wheels :
32+ runs-on : ubuntu-latest
33+ steps :
34+ - name : Cloning SUMO
35+ uses : actions/checkout@v6
36+ with :
37+ fetch-depth : 0
38+ filter : tree:0
39+ # to work around actions/checkout#1467
40+ ref : ${{ github.ref }}
41+
42+ - name : Building sumolib and traci wheels
43+ run : |
44+ python -m pip install build
45+ python tools/build_config/version.py --pep440 build_config/pyproject/sumolib.toml pyproject.toml
46+ python -m build
47+ python tools/build_config/version.py --pep440 build_config/pyproject/traci.toml pyproject.toml
48+ python -m build
49+
50+ - uses : actions/upload-artifact@v6
51+ with :
52+ name : cibw-pure-wheels
53+ path : ./dist/*
54+
55+ # ##################
56+ # building wheels with cibuildwheel
57+ # ##################
2658 build-wheels :
27- name : Build wheels on ${{ matrix.os }}
28- runs-on : ${{ matrix.os }}
59+ needs : [generate-matrix]
2960 strategy :
3061 fail-fast : false
31- matrix :
32- os : [macos-14]
62+ matrix : ${{ fromJSON(needs.generate-matrix.outputs.build_matrix) }}
63+ runs-on : ${{ matrix.os }}
64+ env :
65+ SUMO_LIBRARIES : D:\a\sumo\sumo\SUMOLibraries
3366
3467 steps :
3568 - name : Cloning SUMO
@@ -40,129 +73,78 @@ jobs:
4073 # to work around actions/checkout#1467
4174 ref : ${{ github.ref }}
4275
76+ - name : Cloning SUMO Libraries
77+ if : matrix.os == 'windows-latest'
78+ uses : actions/checkout@v6
79+ with :
80+ repository : DLR-TS/SUMOLibraries
81+ path : SUMOLibraries
82+
83+ - name : " Set up MSVC Developer Command Prompt"
84+ if : matrix.os == 'windows-latest'
85+ uses : compnerd/gha-setup-vsdevenv@v6
86+
4387 - name : ccache
4488 uses :
hendrikmuhs/[email protected] 89+ with :
90+ key : ${{ matrix.os }}-${{ matrix.manylinux }}
91+ variant : ${{ matrix.os == 'windows-latest' && 'sccache' || 'ccache' }}
4592
46- - name : Preparing macos environment
47- if : matrix.os == 'macos-14'
48- run : brew update && brew install --cask xquartz && brew install xerces-c fox proj gdal gl2ps googletest fmt swig eigen
93+ - name : Set up Python
94+ uses : actions/setup-python@v6
95+ with :
96+ python-version : ' 3.12'
4997
5098 - name : Preparing wheel eclipse-sumo
51- run : python3 tools/build_config/version.py --pep440 build_config/eclipse-sumo-pyproject .toml pyproject.toml
99+ run : python tools/build_config/version.py --pep440 build_config/pyproject/ eclipse-sumo.toml pyproject.toml
52100
53101 - name : Building wheel eclipse-sumo
5410255103 env :
56- CIBW_BUILD : cp312-*
104+ CIBW_ENVIRONMENT_LINUX : " CCACHE_DIR=/host/home/runner/work/sumo/sumo/.ccache"
105+ CIBW_ENVIRONMENT_WINDOWS : " CMAKE_GENERATOR=Ninja"
106+ CIBW_MANYLINUX_X86_64_IMAGE : ${{ matrix.manylinux }}
107+ CIBW_MANYLINUX_AARCH64_IMAGE : ${{ matrix.manylinux }}
57108 CIBW_PROJECT_REQUIRES_PYTHON : " >=3.9"
58109 MACOSX_DEPLOYMENT_TARGET : ' 14.0'
59110
60111 - name : Preparing wheel sumo-data
61- run : python3 tools/build_config/version.py --pep440 build_config/sumo-data-pyproject .toml pyproject.toml
112+ run : python tools/build_config/version.py --pep440 build_config/pyproject/ sumo-data.toml pyproject.toml
62113
63114 - name : Building wheel sumo-data
6411565116 env :
66- CIBW_BUILD : cp312-*
117+ CIBW_MANYLINUX_X86_64_IMAGE : ${{ matrix.manylinux }}
118+ CIBW_MANYLINUX_AARCH64_IMAGE : ${{ matrix.manylinux }}
67119 CIBW_PROJECT_REQUIRES_PYTHON : " >=3.9"
68120 CIBW_REPAIR_WHEEL_COMMAND : " " # disable repair, no relocatable binaries inside
69121 MACOSX_DEPLOYMENT_TARGET : ' 14.0'
70122
71123 - name : Preparing wheel libsumo
72- run : python3 tools/build_config/version.py --pep440 build_config/libsumo- pyproject.toml pyproject.toml
124+ run : python tools/build_config/version.py --pep440 build_config/pyproject/libsumo .toml pyproject.toml
73125
74126 - name : Building wheel libsumo
7512776128 env :
77- CIBW_BUILD : cp3*
129+ CIBW_ENVIRONMENT_LINUX : " CCACHE_DIR=/host/home/runner/work/sumo/sumo/.ccache"
130+ CIBW_ENVIRONMENT_WINDOWS : " CMAKE_GENERATOR=Ninja"
131+ CIBW_MANYLINUX_X86_64_IMAGE : ${{ matrix.manylinux }}
132+ CIBW_MANYLINUX_AARCH64_IMAGE : ${{ matrix.manylinux }}
78133 CIBW_PROJECT_REQUIRES_PYTHON : " >=3.9"
79134 # CIBW_REPAIR_WHEEL_COMMAND_MACOS: "" # disable repair process to inspect the wheel
80135 # CIBW_BUILD_VERBOSITY: 2
81136 MACOSX_DEPLOYMENT_TARGET : ' 14.0'
82137
83- - uses : actions/upload-artifact@v5
138+ - uses : actions/upload-artifact@v6
84139 with :
85- name : cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
140+ name : cibw-wheels-${{ matrix.os }}-${{ matrix.manylinux }}
86141 path : ./wheelhouse/*.whl
87142
88143 # ##################
89144 # testing wheels
90145 # ##################
91146 test-wheels :
92- needs : [build-wheels]
93- strategy :
94- fail-fast : false
95- matrix :
96- os : [macos-14, macos-15]
97- python_version : [3.9, '3.10', 3.11, 3.12, 3.13, 3.14]
98- runs-on : ${{ matrix.os }}
99-
100- steps :
101- - name : Cloning SUMO
102- uses : actions/checkout@v6
103- with :
104- fetch-depth : 0
105- filter : tree:0
106- # to work around actions/checkout#1467
107- ref : ${{ github.ref }}
108-
109- - name : Downloading Wheels artifact
110- uses : actions/download-artifact@v6
111- with :
112- path : python-wheels
113- merge-multiple : true
114-
115- - name : Configuring Python
116- uses : actions/setup-python@v6
117- with :
118- python-version : ${{ matrix.python_version }}
119-
120- - name : Installing dependencies
121- run : brew update && brew install proj
122-
123- - name : Preparing Python environment
124- run : |
125- python3 -m pip install --upgrade pip
126- python3 -m pip install wheel # need to do this separately because the texttest install wants it
127- python3 -m pip install texttest
128- python3 -m pip install -f python-wheels eclipse_sumo
129- python3 -c "import sumo; print('SUMO_HOME=' + sumo.SUMO_HOME)" >> $GITHUB_ENV
130-
131- - name : Running "sumo in the wheel" tests
132- run : |
133- if [[ "${{ matrix.python_version }}" != "3.12" ]]; then python3 -m pip install -r tools/requirements.txt; fi
134- tests/runTests.sh -b ci -v ci.fast -a activitygen,duarouter,jtrrouter,marouter,od2trips,polyconvert
135-
136- - name : Running meta tests and cleaning up
137- run : |
138- tests/runTests.sh -b ci -v ci -ts meta
139- python3 -m pip uninstall -y eclipse-sumo
140-
141- - name : Building helper wheels
142- run : |
143- cd tools
144- python3 -m pip install build
145- python3 build_config/version.py build_config/setup-sumolib.py ./setup.py
146- python3 -m build --wheel
147- python3 build_config/version.py build_config/setup-traci.py ./setup.py
148- python3 -m build --wheel
149-
150- - name : Running libsumo tests
151- run : |
152- python3 -m pip install --no-index -f tools/dist sumolib traci
153- python3 -m pip install --no-index -f python-wheels libsumo
154- cd tests
155- texttest -b ci -v ci -a complex.libsumo
156-
157- - name : Compressing test results
158- if : failure()
159- run : |
160- zip -r texttesttmp.zip ~/.texttest/tmp
161-
162- - name : Uploading test results
163- if : failure()
164- uses : actions/upload-artifact@v5
165- with :
166- name : texttesttmp-${{ matrix.python_version }}-${{ matrix.os }}
167- path : texttesttmp.zip
168- if-no-files-found : warn
147+ needs : [generate-matrix, pure-python-wheels, build-wheels]
148+ uses : ./.github/workflows/test-wheels.yml
149+ with :
150+ matrix : ${{ fromJSON(needs.generate-matrix.outputs.test_matrix) }}
0 commit comments