Merge branch 'MacM1' into 'master'

Mac m1

See merge request OpenMesh/OpenMesh!308
This commit is contained in:
Jan Möbius
2021-12-16 13:56:04 +00:00
6 changed files with 236 additions and 57 deletions

View File

@@ -840,6 +840,48 @@ macos-cpp14-release:
# - build-release-cpp14/Unittests/report-doublevec.xml
#----------- Job Informations:
# Type: Build+Test: debug
# OS: Mac
# Language: cpp14
macos-M1-cpp14-debug:
stage: build
script: "CI/ci-mac-M1-build.sh cpp14 debug ; CI/ci-mac-M1-test.sh cpp14 debug"
tags:
- AppleM1
artifacts:
paths:
- build-debug-cpp14/*.dmg
- build-debug-cpp14/*.tar.gz
# reports:
# junit:
# - build-debug-cpp14/Unittests/report.xml
# - build-debug-cpp14/Unittests/report-customvec.xml
# - build-debug-cpp14/Unittests/report-doublevec.xml
#----------- Job Informations:
# Type: Build+Test: release
# OS: Mac
# Language: cpp14
macos-M1-cpp14-release:
stage: build
script: "CI/ci-mac-M1-build.sh cpp14 release ; CI/ci-mac-M1-test.sh cpp14 release"
tags:
- AppleM1
artifacts:
paths:
- build-release-cpp14/*.dmg
- build-release-cpp14/*.tar.gz
# reports:
# junit:
# - build-release-cpp14/Unittests/report.xml
# - build-release-cpp14/Unittests/report-customvec.xml
# - build-release-cpp14/Unittests/report-doublevec.xml
# -----------------
# Windows tasks
@@ -902,63 +944,6 @@ build-VS2019-x64-shared-FALSE-apps:
- build-release/unittests/report-doublevec.xml
#------------- Job Informations:
# Type: Build+Test: Release
# OS: Windows
# Architecture: x64
# Shared: TRUE
# VS Version: VS2019
# Apps: {{APPS}}
build-VS2019-x64-shared-TRUE-apps:
stage: build
variables:
BUILD_PLATFORM: "VS2019"
ARCHITECTURE: "x64"
SHARED: "TRUE"
APPS: "ON"
script: "CI\\Windows.bat"
tags:
- VS2019
- Qt5150
artifacts:
paths:
- build-release/*.exe
reports:
junit:
- build-release/unittests/report.xml
- build-release/unittests/report-customvec.xml
- build-release/unittests/report-doublevec.xml
#------------- Job Informations:
# Type: Build+Test: Release
# OS: Windows
# Architecture: x64
# Shared: FALSE
# VS Version: VS2019
# Apps: {{APPS}}
build-VS2019-x64-shared-FALSE-apps:
stage: build
variables:
BUILD_PLATFORM: "VS2019"
ARCHITECTURE: "x64"
SHARED: "FALSE"
APPS: "ON"
script: "CI\\Windows.bat"
tags:
- VS2019
- Qt5150
artifacts:
paths:
- build-release/*.exe
reports:
junit:
- build-release/unittests/report.xml
- build-release/unittests/report-customvec.xml
- build-release/unittests/report-doublevec.xml
#------------- Job Informations:
# Type: Build+Test: Release
# OS: Windows

63
CI/ci-mac-M1-build.sh Executable file
View File

@@ -0,0 +1,63 @@
#!/bin/bash
source CI/ci-mac-M1-prepare.sh
echo -e "${OUTPUT}"
echo ""
echo "======================================================================"
echo "Basic configuration details:"
echo "======================================================================"
echo -e "${NC}"
echo "Options: $OPTIONS"
echo "BuildPath: $BUILDPATH"
echo "Path: $PATH"
echo "Language: $LANGUAGE"
cmake --version
echo -e "${OUTPUT}"
echo ""
echo "======================================================================"
echo "Building $BUILD_TYPE version with vectorchecks enabled"
echo "======================================================================"
echo -e "${NC}"
if [ ! -d build-$BUILD_TYPE_L-$BUILDPATH-Vector-Checks ]; then
mkdir build-$BUILD_TYPE_L-$BUILDPATH-Vector-Checks
fi
cd build-$BUILD_TYPE_L-$BUILDPATH-Vector-Checks
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DOPENMESH_BUILD_UNIT_TESTS=TRUE -DSTL_VECTOR_CHECKS=ON $OPTIONS ../
#build it
make
cd ..
if [ "$BUILD_TYPE_L" == "release" ]; then
echo -e "${OUTPUT}"
echo ""
echo "======================================================================"
echo "Package creation (DMG and tarball)"
echo "======================================================================"
echo -e "${NC}"
if [ ! -d build-release-$BUILDPATH ]; then
mkdir build-release-$BUILDPATH
fi
cd build-release-$BUILDPATH
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_APPS=OFF -DCPACK_BINARY_DRAGNDROP=ON $OPTIONS ../
#build it
make
make package
cd ..
fi

42
CI/ci-mac-M1-prepare.sh Executable file
View File

@@ -0,0 +1,42 @@
#!/bin/bash
#Exit on any error
set -e
LANGUAGE=$1
BUILD_TYPE=$2
PATH=$PATH:/opt/local/bin
export PATH
OPTIONS=""
# set qt version path
OPTIONS="$OPTIONS -DQT_VERSION=6"
if [ "$LANGUAGE" == "cpp11" ]; then
echo "Building with C++11";
OPTIONS="$OPTIONS -DCMAKE_CXX_FLAGS='-std=c++11' "
BUILDPATH="cpp11"
elif [ "$LANGUAGE" == "cpp14" ]; then
echo "Building with C++14";
OPTIONS="$OPTIONS -DCMAKE_CXX_FLAGS='-std=c++14' "
BUILDPATH="cpp14"
fi
#=====================================
# Color Settings:
#=====================================
NC='\033[0m'
OUTPUT='\033[0;32m'
WARNING='\033[0;93m'
if [ "$BUILD_TYPE" == "release" ]; then
export BUILD_TYPE=Release
export BUILD_TYPE_L=release
else
export BUILD_TYPE=Debug
export BUILD_TYPE_L=debug
fi

65
CI/ci-mac-M1-test.sh Executable file
View File

@@ -0,0 +1,65 @@
#!/bin/bash
source CI/ci-mac-M1-prepare.sh
echo -e "${OUTPUT}"
echo ""
echo "======================================================================"
echo "Basic configuration details:"
echo "======================================================================"
echo -e "${NC}"
echo "Options: $OPTIONS"
echo "BuildPath: $BUILDPATH"
echo "Path: $PATH"
echo "Language: $LANGUAGE"
echo -e "${OUTPUT}"
echo ""
echo "======================================================================"
echo "Building $BUILD_TYPE version unittests"
echo "======================================================================"
echo -e "${NC}"
if [ ! -d build-$BUILD_TYPE_L-$BUILDPATH-Vector-Checks ]; then
mkdir build-$BUILD_TYPE_L-$BUILDPATH-Vector-Checks
fi
cd build-$BUILD_TYPE_L-$BUILDPATH-Vector-Checks
#build the unit tests
make unittests
echo -e "${OUTPUT}"
echo ""
echo "======================================================================"
echo "Running unittests $BUILD_TYPE version with vectorchecks enabled"
echo "======================================================================"
echo -e "${NC}"
cd Unittests
#execute tests
./unittests --gtest_color=yes --gtest_output=xml:./report.xml
echo -e "${OUTPUT}"
echo ""
echo "======================================================================"
echo "Running unittests $BUILD_TYPE version with minimal vector type"
echo "======================================================================"
echo -e "${NC}"
./unittests_customvec --gtest_color=yes --gtest_output=xml:./report-customvec.xml
echo -e "${OUTPUT}"
echo ""
echo "======================================================================"
echo "Running unittests $BUILD_TYPE version with double vector type"
echo "======================================================================"
echo -e "${NC}"
#execute tests
./unittests_doublevec --gtest_color=yes --gtest_output=xml:./report-doublevec.xml
cd ..
cd ..

View File

@@ -0,0 +1,20 @@
#----------- Job Informations:
# Type: Build+Test: {{BUILDTYPE}}
# OS: Mac
# Language: {{LANGUAGE}}
macos-M1-{{LANGUAGE}}-{{BUILDTYPE}}:
stage: build
script: "CI/ci-mac-M1-build.sh {{LANGUAGE}} {{BUILDTYPE}} ; CI/ci-mac-M1-test.sh {{LANGUAGE}} {{BUILDTYPE}}"
tags:
- AppleM1
artifacts:
paths:
- build-{{BUILDTYPE}}-{{LANGUAGE}}/*.dmg
- build-{{BUILDTYPE}}-{{LANGUAGE}}/*.tar.gz
# reports:
# junit:
# - build-{{BUILDTYPE}}-{{LANGUAGE}}/Unittests/report.xml
# - build-{{BUILDTYPE}}-{{LANGUAGE}}/Unittests/report-customvec.xml
# - build-{{BUILDTYPE}}-{{LANGUAGE}}/Unittests/report-doublevec.xml

View File

@@ -8,3 +8,7 @@
{mac-template-job.yml, BUILDTYPE=debug, LANGUAGE=cpp14}
{mac-template-job.yml, BUILDTYPE=release, LANGUAGE=cpp14}
{mac-m1-template-job.yml, BUILDTYPE=debug, LANGUAGE=cpp14}
{mac-m1-template-job.yml, BUILDTYPE=release, LANGUAGE=cpp14}