Pymem save level #897
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: CI | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - pymem | |
| pull_request: | |
| release: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| python: | |
| name: Build g2opy | |
| runs-on: ubuntu-latest | |
| env: | |
| G2O_CACHE_BUILD: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Print env | |
| run: | | |
| echo github.ref: ${{github.ref}} | |
| echo github.event.action: ${{github.event.action}} | |
| echo github.event_name: ${{github.event_name}} | |
| echo runner.os: ${{runner.os}} | |
| - name: ccache | |
| uses: hendrikmuhs/ccache-action@v1.2 | |
| with: | |
| key: python-${{ runner.os }} | |
| max-size: 2000M | |
| - name: Install dependencies on Ubuntu | |
| run: | | |
| sudo apt update | |
| sudo apt install libeigen3-dev libspdlog-dev nlohmann-json3-dev python3-dev python3-numpy python3-pytest | |
| - name: Configure CMake | |
| run: | | |
| echo "number of cores: $(nproc) $(nproc --all)" | |
| cmake --version | |
| cmake -B ${{github.workspace}}/build -DG2O_BUILD_PYTHON=On -DBUILD_SHARED_LIBS=Off -DG2O_BUILD_APPS=Off -DG2O_BUILD_EXAMPLES=Off -DG2O_USE_OPENGL:=Off -DBUILD_UNITTESTS=Off -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache | |
| - name: Build Introspection | |
| shell: bash | |
| run: | | |
| echo "g2o config.h" | |
| cat ${{github.workspace}}/build/g2o/config.h | |
| echo "ENV" | |
| env | sort | |
| - name: Build | |
| run: cmake --build ${{github.workspace}}/build -j $(nproc) --target g2opy | |
| - name: Test (pytest) | |
| run: ${{github.workspace}}/build/pytest_helper.sh | |
| build: | |
| name: ${{ matrix.config.name }} | |
| runs-on: ${{ matrix.config.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - { | |
| name: "Ubuntu Latest GCC", | |
| os: ubuntu-latest, | |
| build_type: "Debug", | |
| do_coverage: "ON", | |
| } | |
| - { | |
| name: "macOS Latest Clang", | |
| os: macos-latest, | |
| build_type: "Debug", | |
| do_coverage: "OFF", | |
| } | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 25 | |
| - name: Print env | |
| run: | | |
| echo github.ref: ${{github.ref}} | |
| echo github.event.action: ${{github.event.action}} | |
| echo github.event_name: ${{github.event_name}} | |
| echo runner.os: ${{runner.os}} | |
| - name: ccache | |
| uses: hendrikmuhs/ccache-action@v1.2 | |
| with: | |
| key: ${{ matrix.config.os }}-${{ matrix.config.build_type }} | |
| max-size: 2000M | |
| - name: Install dependencies on Ubuntu | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt update | |
| sudo apt install libeigen3-dev qt6-declarative-dev qmake6 libsuitesparse-dev lcov libspdlog-dev nlohmann-json3-dev | |
| - name: Install dependencies on macOS | |
| if: runner.os == 'macOS' | |
| run: brew install eigen coreutils nlohmann-json | |
| - name: Configure ccache for macOS | |
| if: runner.os == 'macOS' | |
| run: | | |
| # See https://github.com/hendrikmuhs/ccache-action/issues/146 | |
| ccache --set-config=compiler_check=content | |
| - name: Coverage Configure Build | |
| if: matrix.config.do_coverage == 'ON' | |
| run: | | |
| echo "CFLAGS=--coverage" >> $GITHUB_ENV | |
| echo "CXXFLAGS=--coverage" >> $GITHUB_ENV | |
| - name: Configure CMake | |
| run: | | |
| echo "number of cores: $(nproc) $(nproc --all)" | |
| cmake --version | |
| cmake -B ${{github.workspace}}/build -DBUILD_UNITTESTS=ON -DCMAKE_BUILD_TYPE=${{matrix.config.build_type}} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache | |
| - name: Build Introspection | |
| shell: bash | |
| run: | | |
| echo "g2o config.h" | |
| cat ${{github.workspace}}/build/g2o/config.h | |
| echo "ENV" | |
| env | sort | |
| - name: Build | |
| run: cmake --build ${{github.workspace}}/build --config ${{matrix.config.build_type}} -j $(nproc) | |
| - name: Test | |
| working-directory: ${{github.workspace}}/build | |
| run: ctest -C ${{matrix.config.build_type}} --extra-verbose --output-on-failure | |
| - name: Coverage Results | |
| if: matrix.config.do_coverage == 'ON' | |
| uses: codecov/codecov-action@v5.5.2 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |