add atomic lane change logic for platoons avoiding side-to-side crash… #58
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: macos-wheels | |
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/**' | |
schedule: | |
- cron: '25 2 * * *' | |
jobs: | |
build-wheels: | |
strategy: | |
fail-fast: false | |
matrix: | |
python_version: [3.7, 3.8, 3.9, '3.10', 3.11] | |
runs-on: macos-11 | |
env: | |
CCACHE_COMPILERTYPE: clang | |
steps: | |
- name: Cloning SUMO | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Fetching SUMO tags | |
run: git fetch --tags --force | |
- name: Set up Python ${{ matrix.python_version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python_version }} | |
- name: Preparing Build System | |
run: | | |
brew install --cask xquartz | |
brew install xerces-c fox proj gdal gl2ps ccache | |
- name: ccache | |
if: github.event_name != 'schedule' | |
uses: hendrikmuhs/[email protected] | |
- name: Building SUMO / Libsumo wheels | |
run: | | |
python3 -m pip install --upgrade pip | |
python3 -m pip install build | |
cp build/pyproject.toml . | |
python3 tools/build/version.py tools/build/setup-sumo.py ./setup.py | |
python3 -m build --wheel | |
python3 tools/build/version.py tools/build/setup-libsumo.py tools/setup.py | |
python3 -m build --wheel tools -o dist | |
python3 tools/build/version.py tools/build/setup-libtraci.py tools/setup.py | |
python3 -m build --wheel tools -o dist | |
if [[ "${{ matrix.python_version }}" != "3.8" ]]; then rm dist/eclipse_sumo-*; fi | |
if [[ "${{ matrix.python_version }}" == "3.8" ]]; then mv dist/eclipse_sumo-* `echo dist/eclipse_sumo-* | sed 's/cp38-cp38/py2.py3-none/'`; fi | |
- name: Uploading artifacts (Python wheels) | |
uses: actions/upload-artifact@v3 | |
with: | |
name: python-wheels | |
path: dist | |
test-wheels: | |
needs: [build-wheels] | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-11, macos-12] | |
python_version: [3.7, 3.8, 3.9, '3.10', 3.11] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Cloning SUMO | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Fetching SUMO tags | |
run: git fetch --tags --force | |
- name: Downloading Wheels artifact | |
uses: actions/download-artifact@v3 | |
- name: Configuring Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python_version }} | |
- name: Installing dependencies | |
run: | | |
brew install --cask xquartz | |
brew install xerces-c fox proj gdal gl2ps | |
- 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 python-wheels/eclipse_sumo* | |
python3 -c "import sumo; print('SUMO_HOME=' + sumo.SUMO_HOME)" >> $GITHUB_ENV | |
# - name: Running "sumo in the wheel" tests | |
# if: github.repository == 'DLR-TS/sumo' | |
# run: | | |
# python -m pip install -r tools/requirements.txt | |
# tests/runTests.sh -b ci -v ci.fast | |
- 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/version.py build/setup-sumolib.py ./setup.py | |
python3 -m build --wheel | |
python3 build/version.py build/setup-traci.py ./setup.py | |
python3 -m build --wheel | |
- name: Running libsumo tests | |
run: | | |
python3 -m pip install tools/dist/sumolib-* tools/dist/traci-* | |
PYTHON_VERSION=${{ matrix.python_version }} | |
python3 -m pip install python-wheels/libsumo-*cp3${PYTHON_VERSION:2}* | |
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@v3 | |
with: | |
name: texttesttmp-${{ matrix.python_version }}-${{ matrix.os }} | |
path: texttesttmp.zip | |
if-no-files-found: warn | |
publish-wheels: | |
if: github.repository == 'eclipse/sumo' && (github.event_name == 'schedule' || startsWith(github.ref, 'refs/tags')) | |
needs: [test-wheels] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@v3 | |
- name: Publish to Test PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.TEST_PYPI_TOKEN }} | |
repository-url: https://test.pypi.org/legacy/ | |
skip-existing: true | |
packages-dir: python-wheels/ | |
- name: Publish to PyPI | |
if: startsWith(github.ref, 'refs/tags') | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.PYPI_TOKEN }} | |
packages-dir: python-wheels/ |