From e890ebaaa3f26d63b51298f394d09b4067bef7ee Mon Sep 17 00:00:00 2001 From: Shaohui Liu Date: Thu, 28 Nov 2024 11:28:26 +0100 Subject: [PATCH] Add CI for limap installation on ubuntu (#99) --- .github/workflows/build.yml | 81 +++++++++++++++++++ .../{format-ubuntu.yml => format.yml} | 0 requirements.txt | 11 +-- 3 files changed, 84 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/build.yml rename .github/workflows/{format-ubuntu.yml => format.yml} (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..126e386 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,81 @@ +name: limap + +on: + push: + branches: + - main + - release/* + pull_request: + types: [ assigned, opened, synchronize, reopened ] + release: + types: [ published, edited ] + +jobs: + build: + name: ${{ matrix.config.os }} ${{ matrix.config.arch }} + runs-on: ${{ matrix.config.os }} + strategy: + matrix: + config: [ + {os: ubuntu-latest}, + ] + env: + COMPILER_CACHE_VERSION: 1 + COMPILER_CACHE_DIR: ${{ github.workspace }}/compiler-cache + CCACHE_DIR: ${{ github.workspace }}/compiler-cache/ccache + CCACHE_BASEDIR: ${{ github.workspace }} + # For faster builds in PRs, skip all but the latest Python versions. + PULL_REQUEST_CIBW_BUILD: cp39-{manylinux}* + steps: + - uses: actions/checkout@v4 + - uses: actions/cache@v4 + id: cache-builds + with: + key: limap-v${{ env.COMPILER_CACHE_VERSION }}-${{ matrix.config.os }}-${{ matrix.config.arch }}-${{ github.run_id }}-${{ github.run_number }} + restore-keys: limap-v${{ env.COMPILER_CACHE_VERSION }}-${{ matrix.config.os }}-${{ matrix.config.arch }} + path: ${{ env.COMPILER_CACHE_DIR }} + + - name: Set env (Linux) + if: runner.os == 'Linux' + run: | + sudo apt-get update && sudo apt-get install -y \ + git \ + build-essential \ + cmake \ + ninja-build \ + libboost-program-options-dev \ + libboost-graph-dev \ + libboost-system-dev \ + libeigen3-dev \ + libceres-dev \ + libflann-dev \ + libfreeimage-dev \ + libmetis-dev \ + libgoogle-glog-dev \ + libgtest-dev \ + libgmock-dev \ + libsqlite3-dev \ + libglew-dev \ + qtbase5-dev \ + libqt5opengl5-dev \ + libcgal-dev \ + libcgal-qt5-dev \ + libgl1-mesa-dri \ + libunwind-dev \ + xvfb + + - name: Install Python dependencies + run: | + git submodule update --init --recursive + python -m pip install --upgrade pip + python -m pip install setuptools + python -m pip install -r requirements.txt # If you have a requirements file + + - name: Build + run: | + python -m pip install -v . + + - name: Run Python tests + run: | + python -c "import limap; print(limap.__version__)" + diff --git a/.github/workflows/format-ubuntu.yml b/.github/workflows/format.yml similarity index 100% rename from .github/workflows/format-ubuntu.yml rename to .github/workflows/format.yml diff --git a/requirements.txt b/requirements.txt index f1ae3d9..c038eea 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,19 +6,14 @@ numpy scipy matplotlib seaborn -brewer2mpl -tensorboard tensorboardX opencv-python opencv-contrib-python scikit-learn scikit-image -shapely -jupyter bresenham pyvista omegaconf -rtree plyfile pathlib open3d==0.16.0 @@ -31,6 +26,6 @@ ruff==0.6.7 clang-format==19.1.0 ./third-party/pytlsd --e ./third-party/Hierarchical-Localization --e ./third-party/DeepLSD --e ./third-party/GlueStick +./third-party/Hierarchical-Localization +./third-party/DeepLSD +./third-party/GlueStick