Skip to content

Commit

Permalink
CI: Add gcc version
Browse files Browse the repository at this point in the history
  • Loading branch information
KangLin committed Nov 27, 2019
1 parent 4119b3a commit 0f24ba8
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
22 changes: 20 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,38 @@ environment:
GENERATORS: "Visual Studio 12 2013"
TOOLCHAIN_VERSION: 12
BUILD_ARCH: x86
BUILD_SHARED_LIBS: ON

- BUILD_TARGERT: windows_msvc
GENERATORS: "Visual Studio 12 2013 Win64"
TOOLCHAIN_VERSION: 12
BUILD_ARCH: x64
BUILD_SHARED_LIBS: ON

##### msvc 2015 ########
- BUILD_TARGERT: windows_msvc
GENERATORS: "Visual Studio 14 2015"
TOOLCHAIN_VERSION: 14
BUILD_ARCH: x86
BUILD_SHARED_LIBS: ON

- BUILD_TARGERT: windows_msvc
GENERATORS: "Visual Studio 14 2015 Win64"
TOOLCHAIN_VERSION: 14
BUILD_ARCH: x64
BUILD_SHARED_LIBS: ON

- BUILD_TARGERT: windows_msvc
GENERATORS: "Visual Studio 14 2015"
TOOLCHAIN_VERSION: 14
BUILD_ARCH: x86
BUILD_SHARED_LIBS: OFF

- BUILD_TARGERT: windows_msvc
GENERATORS: "Visual Studio 14 2015 Win64"
TOOLCHAIN_VERSION: 14
BUILD_ARCH: x64
BUILD_SHARED_LIBS: OFF

##### msvc 2017 ########
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
Expand All @@ -54,30 +60,41 @@ environment:
GENERATORS: "Visual Studio 14 2015 Win64"
BUILD_TARGERT: windows_msvc
TOOLCHAIN_VERSION: 15
BUILD_ARCH: x64
BUILD_ARCH: x86
BUILD_SHARED_LIBS: ON

- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
GENERATORS: "Visual Studio 14 2015 Win64"
BUILD_TARGERT: windows_msvc
TOOLCHAIN_VERSION: 15
BUILD_ARCH: x64
BUILD_SHARED_LIBS: ON

##### mingw ########
- BUILD_TARGERT: windows_mingw
GENERATORS: "MSYS Makefiles"
TOOLCHAIN_VERSION: 492_32
BUILD_ARCH: x86
BUILD_SHARED_LIBS: ON

- BUILD_TARGERT: windows_mingw
GENERATORS: "MSYS Makefiles"
TOOLCHAIN_VERSION: 530_32
BUILD_ARCH: x86
BUILD_SHARED_LIBS: ON

- BUILD_TARGERT: windows_mingw
GENERATORS: "MSYS Makefiles"
TOOLCHAIN_VERSION: 730_64
BUILD_ARCH: x64

BUILD_SHARED_LIBS: ON

- BUILD_TARGERT: windows_mingw
GENERATORS: "MSYS Makefiles"
TOOLCHAIN_VERSION: 730_64
BUILD_ARCH: x64
BUILD_SHARED_LIBS: OFF

matrix:
fast_finish: false

Expand Down Expand Up @@ -122,4 +139,5 @@ deploy:
#draft: true
#prerelease: true
on:
BUILD_SHARED_LIBS: ON
appveyor_repo_tag: true # deploy on tag push only
11 changes: 9 additions & 2 deletions ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,18 @@ fi
cmake --build . --config Release --target install -- ${RABBIT_MAKE_JOB_PARA}

if [ "${BUILD_TARGERT}" = "unix" -a "ON" = "${BUILD_SHARED_LIBS}" ]; then
TAR_FILE="SeetaFace_${BUILD_TARGERT}.tar.gz"
# configure C compiler
export compiler=$(which gcc)
# get version code
MAJOR=$(echo __GNUC__ | $compiler -E -xc - | tail -n 1)
MINOR=$(echo __GNUC_MINOR__ | $compiler -E -xc - | tail -n 1)
PATCHLEVEL=$(echo __GNUC_PATCHLEVEL__ | $compiler -E -xc - | tail -n 1)
TAR_FILE="SeetaFace_${BUILD_TARGERT}_gcc${MAJOR}.${MINOR}.${PATCHLEVEL}.tar.gz"
fi
if [ -n "${TAR_FILE}" -a "$TRAVIS_TAG" != "" ]; then
TAR_FILE=`echo "${TAR_FILE}" | sed 's/[ ][ ]*/_/g'`
tar czvf "${TAR_FILE}" `pwd`/install
cd `pwd`/install
tar czf "${TAR_FILE}" *
wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
chmod u+x upload.sh
./upload.sh "${TAR_FILE}"
Expand Down

0 comments on commit 0f24ba8

Please sign in to comment.