Browse Source

Add appveyor.yml and attempt of windows build

merge-requests/365/head
Jørgen Lien Sellæg 10 years ago
parent
commit
01fce1781e
  1. 2
      .travis.yml
  2. 15
      appveyor.yml
  3. 9
      ci/compile.sh
  4. 14
      ci/execute.sh
  5. 12
      ci/update_ci.sh

2
.travis.yml

@ -11,7 +11,7 @@ services:
- docker - docker
before_install: before_install:
- ./ci/update_travis.sh - ./ci/update_ci.sh
script: script:
- script=compile CXX=clang++ CC=clang ./ci/execute.sh - script=compile CXX=clang++ CC=clang ./ci/execute.sh

15
appveyor.yml

@ -0,0 +1,15 @@
platform:
- x86
- x64
before_build:
- C:\msys64\usr\bin\pacman --noconfirm --sync --refresh --refresh pacman
- C:\msys64\usr\bin\pacman --noconfirm --sync --refresh --refresh git
- C:\msys64\usr\bin\pacman --noconfirm --sync --refresh --refresh --sysupgrade --sysupgrade
build_script:
- C:\msys64\usr\bin\bash -lc "script=compile CXX=clang++ CC=clang $(cygpath ${APPVEYOR_BUILD_FOLDER})/ci/execute.sh"
- C:\msys64\usr\bin\bash -lc "script=clean $(cygpath ${APPVEYOR_BUILD_FOLDER})/ci/execute.sh"
- C:\msys64\usr\bin\bash -lc "script=compile $(cygpath ${APPVEYOR_BUILD_FOLDER})/ci/execute.sh"
- C:\msys64\usr\bin\bash -lc "script=static_analysis $(cygpath ${APPVEYOR_BUILD_FOLDER})/ci/execute.sh"
- C:\msys64\usr\bin\bash -lc "script=compile make_command=\"broadwayd & make test\" $(cygpath ${APPVEYOR_BUILD_FOLDER})/ci/execute.sh"

9
ci/compile.sh

@ -1,8 +1,17 @@
#!/bin/bash #!/bin/bash
if [ "${cmake_command}" == "" ]; then if [ "${cmake_command}" == "" ]; then
if [ $APPVEYOR ]; then
if [ "$PLATFORM" == "x64" ]; then
mingw="mingw64"
else
mingw="mingw32"
fi
cmake_command="cmake -G\"MSYS Makefiles\" -DCMAKE_INSTALL_PREFIX=/${mingw} .. -DENABLE_TESTING=1 -DCMAKE_CXX_FLAGS=-Werror .."
else
cmake_command="cmake -DENABLE_TESTING=1 -DCMAKE_CXX_FLAGS=-Werror .." cmake_command="cmake -DENABLE_TESTING=1 -DCMAKE_CXX_FLAGS=-Werror .."
fi fi
fi
if [ "${make_command}" == "" ]; then if [ "${make_command}" == "" ]; then
make_command="make -j 2" make_command="make -j 2"

14
ci/execute.sh

@ -22,4 +22,18 @@ function osx () {
true true
} }
function windows () {
cd "$(dirname "$0")" || exit
if [ "${script}" == "clean" ]; then
sudo rm ./build -rf
return 0
fi
sh -c "./ci/${script}.sh"
}
if [ "$TRAVIS_OS_NAME" == "" ]; then
TRAVIS_OS_NAME=windows
fi
$TRAVIS_OS_NAME $TRAVIS_OS_NAME

12
ci/update_travis.sh → ci/update_ci.sh

@ -19,4 +19,16 @@ function osx () {
brew install cmake pkg-config boost homebrew/x11/gtksourceviewmm3 aspell clang-format brew install cmake pkg-config boost homebrew/x11/gtksourceviewmm3 aspell clang-format
} }
function windows () {
arch=x86_64
if [ "$PLATFORM" == "x86" ]; then
arch=i686
fi
sh -c "pacman -S git mingw-w64-${arch}-cmake make mingw-w64-${arch}-toolchain mingw-w64-${arch}-clang mingw-w64-${arch}-gtkmm3 mingw-w64-${arch}-gtksourceviewmm3 mingw-w64-${arch}-boost mingw-w64-${arch}-aspell mingw-w64-${arch}-aspell-en"
}
if [ "$TRAVIS_OS_NAME" == "" ]; then
TRAVIS_OS_NAME=windows
fi
$TRAVIS_OS_NAME $TRAVIS_OS_NAME
Loading…
Cancel
Save