Merge branch 'main' of github.com:eclipse-sumo/sumo into Netedit_dev #6
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: cibuildwheel | |
on: | |
push: # run on push events | |
paths-ignore: # but ignore everything in the docs subfolder | |
- 'docs/**' | |
- 'src/gui*/**' | |
- 'src/netedit/**' | |
- 'tests/netedit/**' | |
branches: | |
- '**' | |
tags: | |
- '*' | |
pull_request: # run on pull requests | |
paths-ignore: # but ignore everything in the docs subfolder | |
- 'docs/**' | |
jobs: | |
build-wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-13, macos-14] | |
steps: | |
- name: Cloning SUMO | |
uses: actions/checkout@v4 | |
with: | |
path: sumo | |
fetch-depth: 0 | |
- name: Preparing wheel eclipse-sumo | |
run: | | |
cp sumo/build_config/pyproject.toml sumo/ | |
python3 sumo/tools/build_config/version.py sumo/tools/build_config/setup-sumo.py sumo/setup.py | |
- name: Building wheel eclipse-sumo | |
uses: pypa/cibuildwheel@v2.22.0 | |
with: | |
package-dir: sumo | |
output-dir: wheelhouse | |
env: | |
CIBW_BEFORE_ALL_MACOS: brew update && brew install --cask xquartz && brew install xerces-c fox proj gdal gl2ps ccache googletest fmt swig eigen | |
CIBW_BUILD: cp39-* | |
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.9" | |
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.os == 'macos-13' && '13.0' || matrix.os == 'macos-14' && '14.0' }} | |
SKBUILD_WHEEL_PY_API: "py2.py3" | |
- name: Preparing wheel libsumo | |
run: | | |
cp sumo/build_config/pyproject.toml sumo/ | |
python3 sumo/tools/build_config/version.py sumo/tools/build_config/setup-libsumo-sk.py sumo/setup.py | |
- name: Building wheel libsumo | |
uses: pypa/cibuildwheel@v2.22.0 | |
with: | |
package-dir: sumo | |
output-dir: wheelhouse | |
env: | |
CIBW_BEFORE_ALL_MACOS: brew update && brew install --cask xquartz && brew install xerces-c fox proj gdal gl2ps ccache googletest fmt swig eigen | |
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.9" | |
# CIBW_REPAIR_WHEEL_COMMAND_MACOS: "" # disable repair process to inspect the wheel | |
# CIBW_BUILD_VERBOSITY: 2 | |
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.os == 'macos-13' && '13.0' || matrix.os == 'macos-14' && '14.0' }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | |
path: ./wheelhouse/*.whl | |
################### | |
# testing wheels | |
################### | |
test-wheels: | |
needs: [build-wheels] | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-13, macos-14, macos-15] | |
python_version: [3.9, '3.10', 3.11, 3.12] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Cloning SUMO | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Downloading Wheels artifact | |
uses: actions/download-artifact@v4 | |
with: | |
path: python-wheels | |
merge-multiple: true | |
- name: Configuring Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python_version }} | |
- name: Installing dependencies | |
run: | | |
brew update | |
brew install --cask xquartz | |
brew install xerces-c fox proj gdal gl2ps ccache googletest fmt swig eigen | |
- name: Preparing Python environment | |
run: | | |
python3 -m pip install --upgrade pip | |
python3 -m pip install wheel # need to do this separately because the texttest install wants it | |
python3 -m pip install texttest | |
python3 -m pip install -f python-wheels eclipse_sumo | |
python3 -c "import sumo; print('SUMO_HOME=' + sumo.SUMO_HOME)" >> $GITHUB_ENV | |
- name: Running "sumo in the wheel" tests | |
run: | | |
if [[ "${{ matrix.python_version }}" != "3.12" ]]; then python3 -m pip install -r tools/requirements.txt; fi | |
tests/runTests.sh -b ci -v ci.fast -a activitygen,duarouter,jtrrouter,marouter,od2trips,polyconvert | |
- name: Running meta tests and cleaning up | |
run: | | |
tests/runTests.sh -b ci -v ci -ts meta | |
python3 -m pip uninstall -y eclipse-sumo | |
- name: Building helper wheels | |
run: | | |
cd tools | |
python3 -m pip install build | |
python3 build_config/version.py build_config/setup-sumolib.py ./setup.py | |
python3 -m build --wheel | |
python3 build_config/version.py build_config/setup-traci.py ./setup.py | |
python3 -m build --wheel | |
- name: Running libsumo tests | |
run: | | |
python3 -m pip install -f tools/dist sumolib traci | |
python3 -m pip install -f python-wheels libsumo | |
cd tests | |
texttest -b ci -v ci -a complex.libsumo | |
- name: Compressing test results | |
if: failure() | |
run: | | |
zip -r texttesttmp.zip ~/.texttest/tmp | |
- name: Uploading test results | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: texttesttmp-${{ matrix.python_version }}-${{ matrix.os }} | |
path: texttesttmp.zip | |
if-no-files-found: warn |