forked from FreeCAD/FreeCAD
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from FreeCAD/master
Synchronizing
- Loading branch information
Showing
5,120 changed files
with
809,625 additions
and
478,126 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# file types to ignore | ||
|
||
*.DS_Store | ||
*.pyc | ||
*.obj | ||
*.lib | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
#### | ||
###### | ||
# | ||
# Travis-CI configuration file for FreeCAD. | ||
# | ||
# This build configuration will build and test FreeCAD on both Linux | ||
|
@@ -16,7 +17,7 @@ | |
# | ||
# DEPLOY: Repo setting to deploy (defaults to no deploy to reduce | ||
# Travis build times. Set DEPLOY=1 to enable in repo settings. | ||
## | ||
###### | ||
env: | ||
global: | ||
- GENERATOR="Unix Makefiles" | ||
|
@@ -48,7 +49,8 @@ jobs: | |
# - python: 3.7 | ||
fast_finish: true # https://blog.travis-ci.com/2013-11-27-fast-finishing-builds | ||
include: | ||
- os: linux | ||
- if: type != pull_request | ||
os: linux | ||
dist: bionic | ||
language: cpp | ||
compiler: clang | ||
|
@@ -57,33 +59,33 @@ jobs: | |
apt: | ||
sources: | ||
- sourceline: 'ppa:ubuntu-toolchain-r/test' | ||
- sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main' | ||
- sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main' | ||
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key' | ||
packages: | ||
- clang-9 | ||
- clang-10 | ||
env: | ||
- CC=clang-9 | ||
- CXX=clang++-9 | ||
- CC=clang-10 | ||
- CXX=clang++-10 | ||
- CMAKE_ARGS="-DPYTHON_EXECUTABLE=/usr/bin/python3 -DBUILD_FEM_NETGEN=ON -DBUILD_QT5=ON" | ||
- CACHE_NAME=JOB1 | ||
|
||
- os: linux | ||
dist: bionic | ||
language: cpp | ||
compiler: gcc-9 | ||
compiler: gcc-10 | ||
cache: ccache | ||
addons: | ||
apt: | ||
sources: | ||
- sourceline: 'ppa:ubuntu-toolchain-r/test' | ||
packages: | ||
- gcc-9 | ||
- g++-9 | ||
- gcc-10 | ||
- g++-10 | ||
env: | ||
- CC=gcc-9 | ||
- CXX=g++-9 | ||
- CC_FOR_BUILD=gcc-9 | ||
- CXX_FOR_BUILD=g++-9 | ||
- CC=gcc-10 | ||
- CXX=g++-10 | ||
- CC_FOR_BUILD=gcc-10 | ||
- CXX_FOR_BUILD=g++-10 | ||
- CMAKE_ARGS="-DCMAKE_CXX_COMPILER=/usr/bin/c++ -DCMAKE_C_COMPILER=/usr/bin/cc -DPYTHON_EXECUTABLE=/usr/bin/python3 -DBUILD_FEM_NETGEN=ON -DBUILD_QT5=ON" | ||
- CACHE_NAME=JOB2 | ||
|
||
|
@@ -100,6 +102,20 @@ jobs: | |
- CMAKE_ARGS="-DCMAKE_CXX_COMPILER=/usr/bin/c++ -DCMAKE_C_COMPILER=/usr/bin/cc" | ||
- CACHE_NAME=JOB3 | ||
|
||
- os: osx | ||
osx_image: xcode11.6 | ||
language: cpp | ||
cache: | ||
- ccache: true | ||
- directories: | ||
- $HOME/.ccache | ||
- $HOME/Library/Caches/Homebrew | ||
- /usr/local/Homebrew | ||
env: | ||
- CMAKE_OPTS="-DBUILD_QT5=ON -DBUILD_ENABLE_CXX_STD='C++17' -DUSE_PYTHON3=1 -DCMAKE_CXX_FLAGS='-Wno-deprecated-declarations' -DBUILD_FEM_NETGEN=1 -DBUILD_FEM=1 -DBUILD_TECHDRAW=0 -DCMAKE_PREFIX_PATH='/usr/local/opt/qt/lib/cmake;/usr/local/opt/nglib/Contents/Resources' -DBUILD_FEM_NETGEN:BOOL=ON -DFREECAD_USE_EXTERNAL_KDL=ON -DCMAKE_BUILD_TYPE=Release" | ||
- PATH=/usr/local/bin:$PATH | ||
- CACHE_NAME=OSX1 | ||
|
||
- os: windows | ||
language: cpp | ||
env: | ||
|
@@ -119,7 +135,7 @@ jobs: | |
cache: | ||
directories: | ||
- $HOME/clcache | ||
|
||
# - language: python | ||
# python: 3.7 | ||
# dist: xenial # required for Python >= 3.7 (travis-ci/travis-ci#9069) | ||
|
@@ -128,6 +144,9 @@ jobs: | |
# # fail the build if there are Python syntax errors or undefined names | ||
# script: flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics | ||
|
||
before_cache: | ||
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then brew cleanup; fi | ||
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then find /usr/local/Homebrew \! -regex ".+\.git.+" -delete; fi | ||
|
||
before_install: | ||
# - eval "$(curl -fsSL "https://raw.githubusercontent.com/${OSX_PORTS_CACHE}/v${FREECAD_RELEASE}/travis-helpers.sh")" | ||
|
@@ -188,6 +207,11 @@ before_install: | |
# Runtime deps | ||
sudo apt-get install -y --no-install-recommends freecad-daily-python3 python-pivy python3-pivy python-ply python3-ply | ||
# Use newer Eigen to suppress warnings | ||
# https://github.com/FreeCAD/FreeCAD/pull/3485 | ||
wget http://mirrors.kernel.org/ubuntu/pool/universe/e/eigen3/libeigen3-dev_3.3.7-2_all.deb | ||
sudo dpkg -i libeigen3-dev_3.3.7-2_all.deb | ||
export DISPLAY=:99.0 | ||
sh -e /etc/init.d/xvfb start | ||
|
@@ -196,40 +220,55 @@ before_install: | |
;; | ||
"osx") | ||
#xcodebuild -version -sdk | ||
#brew --config | ||
#if [ "${OSX_PORTS_CACHE}X" != "X" ]; then | ||
# brew install jq | ||
# cacheContext=$(create_helper_context repo=${OSX_PORTS_CACHE} auth_token=${GH_TOKEN} release=${FREECAD_RELEASE}) | ||
# travis_wait prime_local_ports_cache $cacheContext | ||
#fi | ||
#brew update >/dev/null | ||
#brew --config | ||
#brew tap FreeCAD/freecad | ||
#brew install --verbose --only-dependencies freecad --with-packaging-utils | ||
#pip install six | ||
## Qt5: Set Qt5 build flag and CMAKE_PREFIX | ||
#QT5_CMAKE_PREFIX=$(ls -d $(brew --cellar)/qt/*/lib/cmake) | ||
#QT5_WEBKIT_CMAKE_PREFIX=$(ls -d $(brew --cellar)/qtwebkit/*/lib/cmake) | ||
#CMAKE_OPTS="${CMAKE_OPTS} -DBUILD_QT5=ON -DCMAKE_PREFIX_PATH=${QT5_CMAKE_PREFIX};${QT5_WEBKIT_CMAKE_PREFIX}" | ||
xcodebuild -version -sdk | ||
brew --config | ||
brew install ccache | ||
brew install coreutils | ||
brew update >/dev/null | ||
brew --config | ||
brew update | ||
brew upgrade | ||
brew install [email protected] | ||
brew unlink [email protected] | ||
brew link --overwrite --force [email protected] | ||
rm /usr/local/bin/python | ||
ln -s /usr/local/bin/python3 /usr/local/bin/python | ||
pip3 install six | ||
pip3 install pyyaml | ||
pip3 install ply | ||
export PATH=/usr/local/bin:$PATH | ||
brew reinstall [email protected] | ||
brew link --force [email protected] | ||
which python | ||
python --version | ||
brew install boost | ||
brew install boost-python3 | ||
brew tap FreeCAD/freecad | ||
brew install freecad/freecad/coin | ||
brew install freecad/freecad/nglib | ||
brew install freecad/freecad/med-file | ||
brew install freecad/freecad/opencamlib | ||
brew install freecad/freecad/shiboken2 | ||
brew install freecad/freecad/pyside2 | ||
brew install freecad/freecad/pyside2-tools | ||
brew install freecad/freecad/pivy | ||
brew install freecad/freecad/matplotlib | ||
##Install the 3DConnexion frameworks | ||
#if [ "${DEPLOY}" == "1" ]; then | ||
# if [ ! -d /Library/Frameworks/3DconnexionClient.framework ]; then | ||
# curl -o /tmp/3dFW.dmg -L 'http://www.3dconnexion.com/index.php?eID=sdl&ext=tx_iccsoftware&oid=a273bdbc-c289-e10d-816b-567043331c9e&filename=3DxWareMac_v10-4-1_r2428.dmg' | ||
# hdiutil attach -readonly /tmp/3dFW.dmg | ||
# sudo installer -package /Volumes/3Dconnexion\ Software/Install\ 3Dconnexion\ software.pkg -target / | ||
# diskutil eject /Volumes/3Dconnexion\ Software | ||
# fi | ||
# export CMAKE_OPTS="${CMAKE_OPTS} -DFREECAD_CREATE_MAC_APP=ON" | ||
# export INSTALLED_APP_PATH="/usr/local/FreeCAD.app/Contents/MacOS/FreeCAD" | ||
#else | ||
# export INSTALLED_APP_PATH="/usr/local/MacOS/FreeCAD" | ||
#fi | ||
if [ ! -d /Library/Frameworks/3DconnexionClient.framework ]; then | ||
curl -o /tmp/3dFW.dmg -L 'https://download.3dconnexion.com/drivers/mac/10-6-6_360DF97D-ED08-4ccf-A55E-0BF905E58476/3DxWareMac_v10-6-6_r3234.dmg' | ||
hdiutil attach -readonly /tmp/3dFW.dmg | ||
sudo installer -package /Volumes/3Dconnexion\ Software/Install\ 3Dconnexion\ software.pkg -target / | ||
diskutil eject /Volumes/3Dconnexion\ Software | ||
fi | ||
export CMAKE_OPTS="${CMAKE_OPTS} -DFREECAD_CREATE_MAC_APP=OFF" | ||
export INSTALLED_APP_PATH="/usr/local/MacOS/FreeCAD" | ||
#export CMAKE_ARGS="${CMAKE_OPTS} -DFREECAD_USE_EXTERNAL_KDL=ON" | ||
export CMAKE_ARGS="${CMAKE_OPTS} -DFREECAD_USE_EXTERNAL_KDL=ON" | ||
brew link --overwrite matplotlib | ||
if [ -f "/usr/local/Cellar/opencascade/7.4.0_1/include/opencascade/Standard_Macro.hxx" ]; then | ||
sed '1,$s/\[\[nodiscard\]\]//' /usr/local/Cellar/opencascade/7.4.0_1/include/opencascade/Standard_Macro.hxx > /tmp/Standard_Macro.hxx && cp /tmp/Standard_Macro.hxx /usr/local/Cellar/opencascade/7.4.0_1/include/opencascade/Standard_Macro.hxx ; | ||
fi | ||
;; | ||
"windows") | ||
|
@@ -245,12 +284,12 @@ before_install: | |
# clcache stats before compilation | ||
cmd.exe //C 'C:\Users\travis\build\FreeCAD\FreeCAD\clcache.exe -s' | ||
curl -L https://github.com/FreeCAD/FreeCAD/releases/download/0.19_pre/FreeCADLibs_12.1.4_x64_VC15.7z --output FreeCADLibs.7z | ||
curl -L https://github.com/FreeCAD/FreeCAD/releases/download/0.19_pre/FreeCADLibs_12.1.6_x64_VC15.7z --output FreeCADLibs.7z | ||
7z x FreeCADLibs.7z -oFreeCADLibs > /dev/null | ||
rm -f FreeCADLibs.7z | ||
export FREECAD_LIBPACK_DIR="$TRAVIS_BUILD_DIR\FreeCADLibs\FreeCADLibs_12.1.4_x64_VC15" | ||
export FREECAD_LIBPACK_DIR="$TRAVIS_BUILD_DIR\FreeCADLibs\FreeCADLibs_12.1.6_x64_VC15" | ||
export CMAKE_ARGS="${CMAKE_OPTS} -DFREECAD_LIBPACK_DIR=$TRAVIS_BUILD_DIR\FreeCADLibs\FreeCADLibs_12.1.4_x64_VC15 -DPYTHON_EXECUTABLE=$TRAVIS_BUILD_DIR\FreeCADLibs\FreeCADLibs_12.1.4_x64_VC15\bin\python.exe \ | ||
export CMAKE_ARGS="${CMAKE_OPTS} -DFREECAD_LIBPACK_DIR=$TRAVIS_BUILD_DIR\FreeCADLibs\FreeCADLibs_12.1.6_x64_VC15 -DPYTHON_EXECUTABLE=$TRAVIS_BUILD_DIR\FreeCADLibs\FreeCADLibs_12.1.6_x64_VC15\bin\python.exe \ | ||
-DBUILD_QT5=TRUE" | ||
export PATH=$MSBUILD_PATH:$PATH | ||
;; | ||
|
@@ -265,7 +304,9 @@ install: | |
#### | ||
# Build FreeCAD with cmake options set above for each platform | ||
## | ||
- mkdir build && cd build && cmake -G"${GENERATOR}" ${CMAKE_ARGS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ../ | ||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then export PATH="/usr/local/bin:/usr/local/opt/ccache/libexec:$PATH"; fi | ||
- echo ${CMAKE_ARGS} | ||
- mkdir build && cd build && cmake -Wno-dev -G"${GENERATOR}" ${CMAKE_ARGS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ../ | ||
|
||
script: | ||
#### | ||
|
@@ -280,7 +321,7 @@ script: | |
cmd.exe //C 'C:\Users\travis\build\FreeCAD\FreeCAD\.travis\build.bat' | ||
# ls -lahR | ||
mkdir bin/ | ||
mv ../FreeCADLibs/FreeCADLibs_12.1.4_x64_VC15/bin/* bin/ | ||
mv ../FreeCADLibs/FreeCADLibs_12.1.6_x64_VC15/bin/* bin/ | ||
du -hs bin/ | ||
# show clcache hit stats | ||
cmd.exe //C 'C:\Users\travis\build\FreeCAD\FreeCAD\clcache.exe -s' | ||
|
@@ -294,9 +335,12 @@ script: | |
# Stop compiling (GCC) after 2 hrs 50 min (3 hrs limit). | ||
# Preserves created ccache for the next build job. | ||
# if [ "${TRAVIS_OS_NAME}" == "linux" ]; then sudo timeout -k 175m 170m make -j2 install || true; fi | ||
# if [ "${TRAVIS_OS_NAME}" == "osx" ]; then sudo make -j2 install; fi | ||
# if [ "${TRAVIS_OS_NAME}" == "osx" ]; then sudo gtimeout -s KILL make -j2 install; fi | ||
cat $HOME/.ccache/ccache.conf | ||
ccache -z -s | ||
df -h | ||
if [ "${TRAVIS_OS_NAME}" == "osx" ]; then export PATH="/usr/local/opt/ccacche/libexec:$PATH"; sudo gtimeout -s KILL 7200 make -j2; [ $? == 124 ] && { ccache -s; return 0; } fi | ||
if [ "${TRAVIS_OS_NAME}" == "linux" ]; then sudo timeout -k 175m 170m make -j2 install || true; fi | ||
sudo make -j2 install | ||
ccache -s | ||
${INSTALLED_APP_PATH} --console --run-test 0 || travis_terminate 1 | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Building FreeCAD on Mac OS 10.15.x -- Catalina # | ||
|
||
General notes on how the tooling works: | ||
|
||
This setup uses [conda](https://docs.conda.io) for dependency management. | ||
Conda is able to pull the deps from a repository called conda-forge and | ||
setup an isolated build environment. Not quite as isolated as docker, but | ||
it is a good option for Mac and its what the FreeCAD CI system uses. | ||
|
||
Once the dependencies are installed into a conda environment, then the | ||
build uses the standard `cmake` configuration process to configure the build | ||
and `ninja` to invoke the actual compilation against whatever host compiler | ||
(gcc, clang, etc.) was installed by conda's `cxx-compiler` package for | ||
that architecture. | ||
|
||
All of this, and some sanity checks, are in a unified shell script. See below. | ||
|
||
# Directions # | ||
|
||
## Install XCode Command line tools ## | ||
|
||
Run `xcode-select --install` and click through. | ||
|
||
## Install Conda ## | ||
|
||
Refer to [MiniConda Docs](https://docs.conda.io/en/latest/miniconda.html). | ||
|
||
## Run the shell script ## | ||
|
||
Run the `./build_unix_dev_conda.sh` and go get coffee. Builds take | ||
an hour+ on a 2012 Retina MacBook. | ||
|
||
Output binaries will be in the `./build/bin/FreeCAD` *and* | ||
`${CONDA_PREFIX}/bin/FreeCAD` directories. | ||
|
||
You can code/build/test using the cmake configuration folder `./build` in | ||
the standard way *from within the freecad_dev conda environment*. | ||
|
This file contains 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
Oops, something went wrong.