Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 96cdc73
Author: Liangliang Nan <[email protected]>
Date:   Wed Jan 8 13:19:35 2025 +0100

    Update cmake-build.yml

commit bb6237a
Author: Liangliang Nan <[email protected]>
Date:   Wed Jan 8 13:01:41 2025 +0100

    speedup github actions workflow

commit 977c001
Author: Liangliang Nan <[email protected]>
Date:   Wed Jan 8 11:36:33 2025 +0100

    remove glpk and lpsolve

commit 3de6f5e
Author: Liangliang Nan <[email protected]>
Date:   Tue Jan 7 23:30:28 2025 +0100

    test

commit 4a2fc5c
Author: Liangliang Nan <[email protected]>
Date:   Tue Jan 7 21:56:51 2025 +0100

    update github actions workflow

commit 0721b15
Author: Liangliang Nan <[email protected]>
Date:   Tue Jan 7 21:32:41 2025 +0100

    Update test-build-gcc.yml

commit 40d70d7
Author: Liangliang Nan <[email protected]>
Date:   Tue Jan 7 21:23:54 2025 +0100

    Update test-build-gcc.yml

commit 759e6e2
Author: Liangliang Nan <[email protected]>
Date:   Tue Jan 7 21:21:25 2025 +0100

    Update test-build-gcc.yml

commit dd5801e
Author: Liangliang Nan <[email protected]>
Date:   Tue Jan 7 21:19:10 2025 +0100

    Update test-build-gcc.yml

commit 5aa0b1e
Author: Liangliang Nan <[email protected]>
Date:   Tue Jan 7 21:09:01 2025 +0100

    Update test-build-gcc.yml

commit 3fa84a0
Author: Liangliang Nan <[email protected]>
Date:   Tue Jan 7 21:06:24 2025 +0100

    Update test-build-gcc.yml

commit 12ae530
Author: Liangliang Nan <[email protected]>
Date:   Tue Jan 7 20:11:56 2025 +0100

    Update test-build-gcc.yml

commit 37d5de0
Author: Liangliang Nan <[email protected]>
Date:   Tue Jan 7 19:41:16 2025 +0100

    Update test-build-gcc.yml

commit 94090ba
Author: Liangliang Nan <[email protected]>
Date:   Tue Jan 7 19:25:38 2025 +0100

    Update test-build-gcc.yml

commit 546b121
Author: Liangliang Nan <[email protected]>
Date:   Tue Jan 7 18:27:01 2025 +0100

    github actions workflow for three platforms
  • Loading branch information
LiangliangNan committed Jan 8, 2025
1 parent a24d40d commit 2b25397
Show file tree
Hide file tree
Showing 369 changed files with 128 additions and 193,266 deletions.
84 changes: 84 additions & 0 deletions .github/workflows/cmake-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
##############################################################################
# GitHub Actions Workflow to test building PolyFit on Windows, Ubuntu, and macOS.
#
# Copyright (C) 2022 Liangliang Nan <[email protected]>
#
# Licensed under GNU LGPL.3, see LICENCE file
##############################################################################
name: Test Build PolyFit

on: [push, pull_request]

jobs:
build:
name: "Build on ${{ matrix.platform }} - ${{ matrix.build_type }}"
strategy:
fail-fast: false
matrix:
platform: [windows-latest, ubuntu-latest, macos-latest]
build_type: [Debug, Release]
runs-on: ${{ matrix.platform }}

steps:
# Checkout the code
- uses: actions/checkout@v3

# Install dependencies for each platform
- name: Install Dependencies (Ubuntu)
if: runner.os == 'Linux'
run: |
sudo apt-get update || true
sudo apt-get install -y cmake build-essential libgl1-mesa-dev \
mesa-common-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev \
libcgal-dev qt6-base-dev libglu1-mesa-dev freeglut3-dev
- name: Install Dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew update || true
brew install cmake cgal qt
# Set up Conda on Windows
- name: Set up Conda (Windows)
if: runner.os == 'Windows'
uses: conda-incubator/setup-miniconda@v3
with:
architecture: x64
activate-environment: PolyFitDev
auto-activate-base: false
channels: conda-forge,defaults

# Install Conda packages on Windows
- name: Install Dependencies via Conda (Windows)
if: runner.os == 'Windows'
shell: bash -l {0}
run: |
conda install -y \
ninja \
conda-forge::qt6-main \
conda-forge::cgal || exit 1
# Configure the project
- name: Configure (Linux & macOS)
if: runner.os != 'Windows'
run: |
cmake -S . -B build/${{ matrix.build_type }} -G "Unix Makefiles"
- name: Configure (Windows)
if: runner.os == 'Windows'
shell: bash -l {0}
run: |
cmake -S . -B build/${{ matrix.build_type }} \
-G "Visual Studio 17 2022" \
-A x64 \
-DCMAKE_PREFIX_PATH="$CONDA_PREFIX/Library"
# Build the project
- name: Build (Linux & macOS)
if: runner.os != 'Windows'
run: cmake --build build/${{ matrix.build_type }}

- name: Build (Windows)
if: runner.os == 'Windows'
shell: bash -l {0}
run: cmake --build build/${{ matrix.build_type }} --config ${{ matrix.build_type }}
43 changes: 0 additions & 43 deletions .github/workflows/test-build-gcc.yml

This file was deleted.

6 changes: 3 additions & 3 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,14 @@ Please note, PolyFit assumes that the model is closed and all necessary planes a
---
### About the solvers
Four solvers, namely Gurobi, SCIP, GLPK, and lp_solve, are provided (with source code) in PolyFit.
Two solvers, namely Gurobi and SCIP (with source code), are provided in PolyFit.
The Gurobi solver is more efficient and reliable and should always be your first choice.
To use Gurobi, you need to install it and also obtain a license (free for academic use) from
[here](https://www.gurobi.com/downloads/end-user-license-agreement-academic/). You may also need to modify the path(s)
to Gurobi in [FindGUROBI.cmake](./code/cmake/FindGUROBI.cmake), for CMake to find Gurobi.
In case you want a fast but open-source solver, please try SCIP, which is slower than Gurobi but acceptable.
The GLPK and lp_solve solvers only manage to solve small problems. They are too slow (and thus may not guarantee to succeed).
For example the data "Fig1", Gurobi takes only 0.02 seconds, while lp_solve 15 minutes.
The GLPK and lp_solve solvers (only available in previous PolyFit distributions) can only manage to solve small problems.
They are too slow (and thus may not guarantee to succeed). For example the data "Fig1", Gurobi takes only 0.02 seconds, while lp_solve 15 minutes.
**Note for Linux users:** You may have to build the Gurobi library (`libgurobi_c++.a`) because the prebuilt one in the original package might NOT be compatible with your compiler. To do so, go to `src/build` and run `make`. Then replace the original `libgurobi_c++.a` (in the `lib` directory) with your generated file.
Expand Down
3 changes: 3 additions & 0 deletions code/3rd_QGLViewer/QGLViewer/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ Error : libQGLViewer requires a minimum Qt version of 5.4 Error
#ifdef Q_OS_MAC
# include <OpenGL/glu.h>
#else
#ifdef WIN32
#include <windows.h>
#endif
# include <GL/glu.h>
#endif

Expand Down
234 changes: 0 additions & 234 deletions code/3rd_glpk/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit 2b25397

Please sign in to comment.