Skip to content

Commit

Permalink
build: add MacOS to Appveyor
Browse files Browse the repository at this point in the history
  • Loading branch information
cdcseacave committed Jan 5, 2020
1 parent b200d3b commit e56f2a3
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 80 deletions.
159 changes: 81 additions & 78 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Specify version format
# specify version format
version: "{build}"

image:
- Visual Studio 2017
- ubuntu1804
- macos

platform:
- x64
Expand All @@ -17,105 +18,107 @@ configuration:
- Debug
- Release

# scripts that are called at very beginning, before repo cloning
init:
#------------------
# Windows 10
#------------------
- cmd: ver
- cmd: cmake --version
- cmd: msbuild /version

#------------------
# Ubuntu 18.04 LTS
#------------------
- sh: lsb_release -a
- sh: cmake --version

# branches to build
branches:
# blacklist
except:
- gh-pages

# scripts that run after cloning repository
install:
for:
-
#------------------
# Windows 10
#------------------
# update vcpkg
- cmd: cd C:\tools\vcpkg
- cmd: git pull
- cmd: .\bootstrap-vcpkg.bat

- cmd: if "%platform%"=="Win32" set VCPKG_ARCH=x86-windows
- cmd: if "%platform%"=="x64" set VCPKG_ARCH=x64-windows

# remove outdated versions
- cmd: vcpkg remove --outdated --recurse

# install required dependencies
- cmd: vcpkg install --recurse --triplet %VCPKG_ARCH% zlib boost-iostreams boost-program-options boost-system boost-serialization eigen3 cgal[core] opencv

# install optional dependencies
- cmd: vcpkg install --recurse --triplet %VCPKG_ARCH% glew glfw3

- cmd: vcpkg integrate install
- cmd: cd "%APPVEYOR_BUILD_FOLDER%"

#------------------
# Ubuntu 18.04 LTS
#------------------
- sh: sudo apt-get update -qq && sudo apt-get install -qq
- sh: sudo apt-get -y install build-essential git cmake libpng-dev libjpeg-dev libtiff-dev libglu1-mesa-dev libxmu-dev libxi-dev
- sh: sudo apt-get -y install libboost-iostreams-dev libboost-program-options-dev libboost-system-dev libboost-serialization-dev
- sh: sudo apt-get -y install libopencv-dev libcgal-dev libcgal-qt5-dev libatlas-base-dev
#- sh: sudo apt-get -y install libsuitesparse-dev libceres-dev
- sh: sudo apt-get -y install freeglut3-dev libglew-dev libglfw3-dev

# preserve contents of selected directories and files across project builds
for:
-
matrix:
only:
- image: Visual Studio 2017
# scripts that are called at very beginning, before repo cloning
init:
- ver
- cmake --version
- msbuild /version
# scripts that run after cloning repository
install:
# update vcpkg
- cd C:\tools\vcpkg
- git pull
- .\bootstrap-vcpkg.bat
- if "%platform%"=="Win32" set VCPKG_ARCH=x86-windows
- if "%platform%"=="x64" set VCPKG_ARCH=x64-windows
# remove outdated versions
- vcpkg remove --outdated --recurse
# install dependencies
- vcpkg install --recurse --triplet %VCPKG_ARCH% zlib boost-iostreams boost-program-options boost-system boost-serialization eigen3 cgal[core] opencv glew glfw3
- vcpkg integrate install
- cd "%APPVEYOR_BUILD_FOLDER%"
# preserve contents of selected directories and files across project builds
cache:
- 'C:\tools\vcpkg\installed'
build_script:
- git clone https://github.com/cdcseacave/VCG.git
- if "%platform%"=="Win32" set CMAKE_GENERATOR=-G"Visual Studio 15 2017"
- if "%platform%"=="x64" set CMAKE_GENERATOR=-G"Visual Studio 15 2017 Win64"
- mkdir bin && cd bin
- cmake %CMAKE_GENERATOR% -DCMAKE_BUILD_TYPE=%Configuration% -DCMAKE_TOOLCHAIN_FILE="C:\tools\vcpkg\scripts\buildsystems\vcpkg.cmake" -DVCG_ROOT="%APPVEYOR_BUILD_FOLDER%\VCG" ..
- cmake --build . --target ALL_BUILD --config %Configuration% -- /maxcpucount:4
-
#------------------
# Ubuntu 18.04 LTS
#------------------
matrix:
only:
- image: ubuntu1804
# scripts that are called at very beginning, before repo cloning
init:
- lsb_release -a
- cmake --version
- gcc -v
# scripts that run after cloning repository
install:
- sudo apt-get update -qq && sudo apt-get install -qq
- sudo apt-get -y install build-essential git cmake libpng-dev libjpeg-dev libtiff-dev libglu1-mesa-dev libxmu-dev libxi-dev
- sudo apt-get -y install libboost-iostreams-dev libboost-program-options-dev libboost-system-dev libboost-serialization-dev
- sudo apt-get -y install libopencv-dev libcgal-dev libcgal-qt5-dev libatlas-base-dev
- sudo apt-get -y install freeglut3-dev libglew-dev libglfw3-dev
# preserve contents of selected directories and files across project builds
cache:
- '/usr/lib/x86_64-linux-gnu/'

build_script:
# get VCG library
- git clone https://github.com/cdcseacave/VCG.git

#------------------
# Windows 10
#------------------
- cmd: if "%platform%"=="Win32" set CMAKE_GENERATOR=-G"Visual Studio 15 2017"
- cmd: if "%platform%"=="x64" set CMAKE_GENERATOR=-G"Visual Studio 15 2017 Win64"
- cmd: mkdir bin && cd bin
- cmd: cmake %CMAKE_GENERATOR% -DCMAKE_BUILD_TYPE=%Configuration% -DCMAKE_TOOLCHAIN_FILE="C:\tools\vcpkg\scripts\buildsystems\vcpkg.cmake" -DVCG_ROOT="%APPVEYOR_BUILD_FOLDER%\VCG" ..
- cmd: cmake --build . --target ALL_BUILD --config %Configuration% -- /maxcpucount:4

build_script:
- git clone https://github.com/cdcseacave/VCG.git
- git clone --single-branch --branch 3.2 https://gitlab.com/libeigen/eigen.git
- mkdir eigen_build && cd eigen_build
- cmake . ../eigen
- make && sudo make install
- cd ..
- mkdir bin && cd bin
- cmake -DCMAKE_BUILD_TYPE=$Configuration -DVCG_ROOT="$APPVEYOR_BUILD_FOLDER/VCG" ..
- make
-
#------------------
# Ubuntu 18.04 LTS
# MacOS
#------------------
- sh: git clone https://gitlab.com/libeigen/eigen.git --branch 3.2
- sh: mkdir eigen_build && cd eigen_build
- sh: cmake . ../eigen
- sh: make && sudo make install
- sh: cd ..
- sh: mkdir bin && cd bin
- sh: cmake -DCMAKE_BUILD_TYPE=$Configuration -DVCG_ROOT="$APPVEYOR_BUILD_FOLDER/VCG" ..
- sh: make

test_script:
#- cmd: ctest --build-config %Configuration% --parallel 4 --output-on-failure
#- sh: ctest -j4
matrix:
only:
- image: macos
# scripts that are called at very beginning, before repo cloning
init:
- system_profiler SPSoftwareDataType
- cmake --version
- gcc -v
# scripts that run after cloning repository
install:
- brew update
- printf "#%s/bin/bash\nbrew install libomp boost eigen opencv cgal glew glfw3\nexit 0\n" "!" > install.sh
- chmod +x install.sh
- ./install.sh
# preserve contents of selected directories and files across project builds
cache:
- '/usr/local/Cellar/'
build_script:
- git clone https://github.com/cdcseacave/VCG.git
- mkdir bin && cd bin
- cmake -DCMAKE_BUILD_TYPE=$CONFIGURATION -DVCG_ROOT="$APPVEYOR_BUILD_FOLDER/VCG" ..
- make

on_success:
- cmd: 7z a OpenMVS_x64.7z "C:\projects\openmvs\bin\bin\vc15\x64\%Configuration%\*.exe" "C:\projects\openmvs\bin\bin\vc15\x64\%Configuration%\*.dll"
Expand Down
3 changes: 1 addition & 2 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@ Install dependencies, run CMake and make.
```
#Install dependencies
brew update
brew tap homebrew/science
brew install boost eigen opencv cgal ceres-solver
brew install boost eigen opencv cgal
main_path=`pwd`
#GLFW3 (Optional)
Expand Down

0 comments on commit e56f2a3

Please sign in to comment.