EqVIO Filter Implementation #4840
Workflow file for this run
This file contains hidden or 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: Python CI | |
| # Since this is a required check, specify paths-ignore in the check-paths job | |
| # instead of under 'pull_request:'. Otherwise, the check is still required but | |
| # never runs, and a maintainer must bypass the check in order to merge the PR. | |
| on: | |
| pull_request: | |
| paths-ignore: | |
| - '**.md' | |
| - '**.ipynb' | |
| - 'myst.yml' | |
| # Every time you make a push to your PR, it cancel immediately the previous checks, | |
| # and start a new one. The other runner will be available more quickly to your PR. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| # Check paths of changed files to see if any are non-ignored. | |
| check-paths: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| should_run: ${{ steps.filter.outputs.relevant_changes }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Check modified files | |
| id: filter | |
| uses: dorny/paths-filter@v3 | |
| with: | |
| filters: | | |
| relevant_changes: | |
| - '!**.md' | |
| - '!**.ipynb' | |
| - '!myst.yml' | |
| build: | |
| # Only run build if relevant files have been modified in this PR. | |
| needs: check-paths | |
| if: needs.check-paths.outputs.should_run == 'true' | |
| name: ${{ matrix.name }} ${{ matrix.build_type }} Python ${{ matrix.python_version }} | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| CTEST_OUTPUT_ON_FAILURE: ON | |
| CTEST_PARALLEL_LEVEL: 2 | |
| CMAKE_BUILD_TYPE: ${{ matrix.build_type }} | |
| PYTHON_VERSION: ${{ matrix.python_version }} | |
| BOOST_VERSION: 1.72.0 | |
| BOOST_EXE: boost_1_72_0-msvc-14.2 | |
| GTSAM_ALLOW_DEPRECATED_SINCE_V43: OFF | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| # Github Actions requires a single row to be added to the build matrix. | |
| # See https://help.github.com/en/articles/workflow-syntax-for-github-actions. | |
| name: | |
| [ | |
| ubuntu-22.04-gcc-11, | |
| ubuntu-22.04-gcc-11-noboost, | |
| ubuntu-22.04-clang-11, | |
| macos-15-xcode-16, | |
| windows-2022-msvc, | |
| ] | |
| build_type: [Release] | |
| python_version: [3] | |
| include: | |
| - name: ubuntu-22.04-gcc-11 | |
| os: ubuntu-22.04 | |
| compiler: gcc | |
| version: "11" | |
| - name: ubuntu-22.04-gcc-11-noboost | |
| os: ubuntu-22.04 | |
| compiler: gcc | |
| version: "11" | |
| - name: ubuntu-22.04-clang-11 | |
| os: ubuntu-22.04 | |
| compiler: clang | |
| version: "11" | |
| - name: macos-15-xcode-16 | |
| os: macos-15 | |
| compiler: xcode | |
| version: "16" | |
| - name: windows-2022-msvc | |
| os: windows-2022 | |
| platform: 64 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install (Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| if [ "${{ matrix.compiler }}" = "clang" ] && [ "${{ matrix.version }}" = "9" ]; then | |
| # (ipv4|ha).pool.sks-keyservers.net is the SKS GPG global keyserver pool | |
| # ipv4 avoids potential timeouts because of crappy IPv6 infrastructure | |
| # 15CF4D18AF4F7421 is the GPG key for the LLVM apt repository | |
| # This key is not in the keystore by default for Ubuntu so we need to add it. | |
| LLVM_KEY=15CF4D18AF4F7421 | |
| gpg --keyserver keyserver.ubuntu.com --recv-key $LLVM_KEY || gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-key $LLVM_KEY | |
| gpg -a --export $LLVM_KEY | sudo apt-key add - | |
| sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main" | |
| fi | |
| sudo apt-get -y update | |
| if [ "${{ matrix.name }}" = "ubuntu-22.04-gcc-11-noboost" ]; then | |
| sudo apt-get -y install build-essential pkg-config libpython3-dev python3-numpy | |
| else | |
| sudo apt-get -y install build-essential pkg-config libpython3-dev python3-numpy libboost-all-dev | |
| fi | |
| if [ "${{ matrix.compiler }}" = "gcc" ]; then | |
| sudo apt-get install -y g++-${{ matrix.version }} g++-${{ matrix.version }}-multilib | |
| echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV | |
| echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV | |
| else | |
| sudo apt-get install -y clang-${{ matrix.version }} g++-multilib | |
| echo "CC=clang-${{ matrix.version }}" >> $GITHUB_ENV | |
| echo "CXX=clang++-${{ matrix.version }}" >> $GITHUB_ENV | |
| fi | |
| - name: Install (macOS) | |
| if: runner.os == 'macOS' | |
| run: | | |
| brew update | |
| # Install boost only if missing | |
| brew list boost >/dev/null 2>&1 || brew install boost | |
| sudo xcode-select -switch /Applications/Xcode.app | |
| echo "CC=clang" >> $GITHUB_ENV | |
| echo "CXX=clang++" >> $GITHUB_ENV | |
| - name: Setup MSVC (Windows) | |
| if: runner.os == 'Windows' | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: x${{matrix.platform}} | |
| toolset: 14.40 | |
| - name: cl version (Windows) | |
| if: runner.os == 'Windows' | |
| shell: cmd | |
| run: cl | |
| - name: Setup python (Windows) | |
| uses: actions/setup-python@v5 | |
| if: runner.os == 'Windows' | |
| with: | |
| python-version: ${{ matrix.python_version }} | |
| - name: Install Boost (Windows) | |
| if: runner.os == 'Windows' | |
| shell: powershell | |
| run: | | |
| # Snippet from: https://github.com/actions/virtual-environments/issues/2667 | |
| $BOOST_PATH = "C:\hostedtoolcache\windows\Boost\$env:BOOST_VERSION\x86_64" | |
| # Use the prebuilt binary for Windows | |
| $Url = "https://sourceforge.net/projects/boost/files/boost-binaries/$env:BOOST_VERSION/$env:BOOST_EXE-${{matrix.platform}}.exe" | |
| # Create WebClient with appropriate settings and download Boost exe | |
| $wc = New-Object System.Net.Webclient | |
| $wc.Headers.Add("User-Agent: Other"); | |
| $wc.DownloadFile($Url, "$env:TEMP\boost.exe") | |
| Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=$BOOST_PATH" | |
| # Set the BOOST_ROOT variable | |
| echo "BOOST_ROOT=$BOOST_PATH" >> $env:GITHUB_ENV | |
| - name: Set GTSAM_WITH_TBB Flag | |
| if: matrix.flag == 'tbb' | |
| run: | | |
| echo "GTSAM_WITH_TBB=ON" >> $GITHUB_ENV | |
| echo "GTSAM Uses TBB" | |
| - name: Set Swap Space (Linux) | |
| if: runner.os == 'Linux' | |
| uses: pierotofy/set-swap-space@master | |
| with: | |
| swap-size-gb: 6 | |
| - name: Install System Dependencies (Linux, macOS) | |
| if: runner.os != 'Windows' | |
| run: | | |
| bash .github/scripts/python.sh -d | |
| - name: Create virtual on MacOS | |
| if: runner.os == 'macOS' | |
| run: | | |
| python$PYTHON_VERSION -m venv venv | |
| source venv/bin/activate | |
| echo "PATH=$(pwd)/venv/bin:$PATH" >> $GITHUB_ENV | |
| python -m pip install --upgrade pip | |
| - name: Install Python Dependencies | |
| shell: bash | |
| run: python$PYTHON_VERSION -m pip install -r python/dev_requirements.txt | |
| - name: Build | |
| shell: bash | |
| if: matrix.name != 'ubuntu-22.04-gcc-11-noboost' | |
| run: | | |
| bash .github/scripts/python.sh -b | |
| - name: Build (No Boost Wrapper Check) | |
| if: matrix.name == 'ubuntu-22.04-gcc-11-noboost' | |
| shell: bash | |
| run: | | |
| bash .github/scripts/python.sh -b --no-boost | |
| - name: Test | |
| shell: bash | |
| if: matrix.name != 'ubuntu-22.04-gcc-11-noboost' | |
| run: | | |
| bash .github/scripts/python.sh -t | |
| - name: Test (No Boost Wrapper Check) | |
| if: matrix.name == 'ubuntu-22.04-gcc-11-noboost' | |
| shell: bash | |
| run: | | |
| bash .github/scripts/python.sh -t --no-boost |