From b0c1fd006da846a71fd94bfa152f6ac78d2004e9 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Fri, 10 Feb 2017 01:56:23 +0100 Subject: travis: re-add windows builds --- .travis.yml | 8 ++++++++ .travis/targets/github-lambda.sh | 8 ++++---- .travis/targets/win32.sh | 35 +++++++++++++++++++++++++++++++++++ .travis/targets/win64.sh | 35 +++++++++++++++++++++++++++++++++++ 4 files changed, 82 insertions(+), 4 deletions(-) create mode 100644 .travis/targets/win32.sh create mode 100644 .travis/targets/win64.sh diff --git a/.travis.yml b/.travis.yml index 62af586..c148698 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,8 @@ language: c addons: apt: packages: + - gcc-mingw-w64-i686 + - gcc-mingw-w64-x86-64 - libcmocka-dev - rpm - valgrind @@ -19,6 +21,8 @@ env: - TARGET=dist-srpm - TARGET=github-lambda - TARGET=make-embedded + - TARGET=win32 + - TARGET=win64 matrix: exclude: @@ -28,6 +32,10 @@ matrix: env: TARGET=github-lambda - compiler: clang env: TARGET=make-embedded + - compiler: clang + env: TARGET=win32 + - compiler: clang + env: TARGET=win64 install: gem install ronn diff --git a/.travis/targets/github-lambda.sh b/.travis/targets/github-lambda.sh index a92d586..a77c631 100644 --- a/.travis/targets/github-lambda.sh +++ b/.travis/targets/github-lambda.sh @@ -4,11 +4,11 @@ build() { CFLAGS="-Wall -g -O0" \ --enable-ronn \ --disable-silent-rules \ - --enable-tests \ - --enable-valgrind \ - --enable-git-receiver \ + --disable-tests \ + --disable-valgrind \ + --disable-git-receiver \ --enable-make-embedded \ - --enable-runserver + --disable-runserver popd > /dev/null make -C build LDFLAGS="-all-static" blogc diff --git a/.travis/targets/win32.sh b/.travis/targets/win32.sh new file mode 100644 index 0000000..85a781f --- /dev/null +++ b/.travis/targets/win32.sh @@ -0,0 +1,35 @@ +build() { + unset CC + pushd build > /dev/null + ../configure \ + CFLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4" \ + --host=i686-w64-mingw32 \ + --target=i686-w64-mingw32 \ + --enable-ronn \ + --disable-silent-rules \ + --disable-tests \ + --disable-valgrind \ + --disable-git-receiver \ + --disable-make-embedded \ + --disable-runserver + popd > /dev/null + + make -C build blogc.exe + + PN="$(grep PACKAGE_TARNAME build/config.h | cut -d\" -f2)" + PV="$(grep PACKAGE_VERSION build/config.h | cut -d\" -f2)" + DEST_DIR="${PN}-${PV}-${TARGET}" + + rm -rf "${DEST_DIR}" + mkdir -p "${DEST_DIR}" + + cp build/.libs/blogc.exe "${DEST_DIR}/" + cp LICENSE "${DEST_DIR}/" + cp README.md "${DEST_DIR}/" + + zip "build/${DEST_DIR}.zip" "${DEST_DIR}"/* +} + +deploy() { + FILES=( build/*.zip ) +} diff --git a/.travis/targets/win64.sh b/.travis/targets/win64.sh new file mode 100644 index 0000000..88fd83c --- /dev/null +++ b/.travis/targets/win64.sh @@ -0,0 +1,35 @@ +build() { + unset CC + pushd build > /dev/null + ../configure \ + CFLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4" \ + --host=x86_64-w64-mingw32 \ + --target=x86_64-w64-mingw32 \ + --enable-ronn \ + --disable-silent-rules \ + --disable-tests \ + --disable-valgrind \ + --disable-git-receiver \ + --disable-make-embedded \ + --disable-runserver + popd > /dev/null + + make -C build blogc.exe + + PN="$(grep PACKAGE_TARNAME build/config.h | cut -d\" -f2)" + PV="$(grep PACKAGE_VERSION build/config.h | cut -d\" -f2)" + DEST_DIR="${PN}-${PV}-${TARGET}" + + rm -rf "${DEST_DIR}" + mkdir -p "${DEST_DIR}" + + cp build/.libs/blogc.exe "${DEST_DIR}/" + cp LICENSE "${DEST_DIR}/" + cp README.md "${DEST_DIR}/" + + zip "build/${DEST_DIR}.zip" "${DEST_DIR}"/* +} + +deploy() { + FILES=( build/*.zip ) +} -- cgit v1.2.3-18-g5258