format last free pos ref #13962 #13960
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: linux | |
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: '5 0 * * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
# Allow all other matrix-jobs to continue running, even if one of the jobs fails | |
fail-fast: false | |
matrix: | |
build_type: [full, minimal] | |
compiler: [gcc, clang] | |
jps_version: ['v1.0.6'] | |
# include: | |
# - build_type: full | |
# jps_version: master | |
# compiler: gcc | |
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: Preparing Build System | |
run: | | |
sudo apt-get update | |
sudo apt-get install libunwind-dev # to work around https://bugs.launchpad.net/ubuntu/+source/google-glog/+bug/1991919 | |
sudo apt-get install cmake libeigen3-dev libxerces-c-dev libfox-1.6-dev libgdal-dev libproj-dev | |
sudo apt-get install libgtest-dev libgoogle-perftools-dev libgl2ps-dev python3-dev python3-setuptools swig | |
sudo apt-get install maven ccache libv8-dev gettext | |
sudo pip3 install texttest | |
- name: Validate CITATION.cff | |
if: matrix.build_type == 'full' && github.repository == 'DLR-TS/sumo' && github.event_name == 'schedule' && matrix.compiler == 'gcc' | |
uses: dieghernan/cff-validator@v3 | |
with: | |
citation-path: sumo/CITATION.cff | |
- name: ccache | |
if: github.event_name != 'schedule' | |
uses: hendrikmuhs/[email protected] | |
- name: Cloning jupedsim | |
if: matrix.build_type == 'full' && github.repository == 'DLR-TS/sumo' | |
uses: actions/checkout@v4 | |
with: | |
repository: PedestrianDynamics/jupedsim | |
ref: ${{ matrix.jps_version }} | |
path: jupedsim | |
- name: Building libjupedsim | |
if: matrix.build_type == 'full' && github.repository == 'DLR-TS/sumo' | |
run: | | |
sudo apt-get install libgeos-dev | |
cmake -B jupedsim-build -DCMAKE_INSTALL_PREFIX=jupedsim-install jupedsim | |
cmake --build jupedsim-build -j4 --config Release | |
cmake --install jupedsim-build --config Release | |
- name: Configuring SUMO | |
run: | | |
mkdir -p sumo/cmake-build | |
cd sumo/cmake-build | |
if [[ "${{ matrix.compiler }}" == "gcc" ]]; then export CC=gcc; export CXX=g++; fi | |
if [[ "${{ matrix.compiler }}" == "clang" ]]; then export CC=clang; export CXX=clang++; fi | |
if [[ "${{ matrix.build_type }}" == "full" ]]; then cmake ..; fi | |
if [[ "${{ matrix.build_type }}" == "minimal" ]]; then cmake -DFOX_CONFIG= -DPROJ_LIBRARY= -DCHECK_OPTIONAL_LIBS=OFF -DFMI=OFF ..; fi | |
- name: Building Traas | |
run: | | |
cd sumo/cmake-build | |
make traas | |
- name: Setting up SonarQube | |
if: matrix.build_type == 'full' && github.repository == 'eclipse-sumo/sumo' && github.event_name == 'schedule' && matrix.compiler == 'gcc' | |
uses: warchant/setup-sonar-scanner@v8 | |
- name: Building SUMO with SonarQube wrapper | |
if: matrix.build_type == 'full' && github.repository == 'eclipse-sumo/sumo' && github.event_name == 'schedule' && matrix.compiler == 'gcc' | |
run: | | |
cd sumo/cmake-build | |
curl -L -O https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip | |
unzip -o build-wrapper-linux-x86.zip | |
build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw-output make -j4 | |
cd .. | |
sonar-scanner -Dsonar.login=${{ secrets.SONAR_TOKEN }} -Dsonar.cfamily.build-wrapper-output=cmake-build/bw-output | |
- name: Building and Installing SUMO | |
if: matrix.build_type != 'full' || github.repository != 'eclipse-sumo/sumo' || github.event_name != 'schedule' || matrix.compiler != 'gcc' | |
run: | | |
cd sumo/cmake-build | |
make -j4 | |
sudo make install | |
- name: Building Examples and Tests | |
if: matrix.build_type == 'full' && (github.repository == 'DLR-TS/sumo' || matrix.compiler == 'gcc') | |
run: | | |
sudo apt-get install python3-pyproj python3-rtree python3-pandas python3-flake8 python3-autopep8 python3-scipy python3-pulp python3-ezdxf python3-pyperclip python3-polib | |
python -m pip install -r sumo/tools/req_ci.txt | |
python -m pip install -r sumo/tools/requirements.txt | |
cd sumo/cmake-build | |
make CTEST_OUTPUT_ON_FAILURE=1 examples test | |
- name: Extra tests | |
if: matrix.build_type == 'full' && github.repository == 'DLR-TS/sumo' | |
run: | | |
sudo apt-get install python2 | |
sumo/tests/runTests.sh -b ci -a sumo.meso.ci,sumo.extra.ci | |
sumo/tests/runTests.sh -b ci -a netconvert.gdal.ci,polyconvert.gdal.ci | |
sumo/tests/runTests.sh -b ci -a tools.python2.ci | |
- 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.compiler }}-${{ matrix.build_type }} | |
path: texttesttmp.zip | |
if-no-files-found: warn | |
- name: Uploading artifacts (SUMO binaries) | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-${{ matrix.compiler }}-${{ matrix.build_type }}-binaries | |
path: sumo/bin |