Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI for Windows #310

Merged
merged 3 commits into from
Aug 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ if(MINGW)
CACHE STRING "Version of GCC in your MinGW installation")

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-format -Wno-format-extra-args")
set(CMAKE_CXX_STANDARD_LIBRARIES "-static -lwsock32 -lws2_32 ${CMAKE_CSS_STANDARD_LIBRARIES}")

# Linking mingw libs statically
set(CMAKE_CXX_STANDARD_LIBRARIES "-Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive, -static-libgcc -static-libstdc++ -lwsock32 -lws2_32 ${CMAKE_CSS_STANDARD_LIBRARIES}")

# Check for gcc target architecture
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpmachine OUTPUT_VARIABLE GCC_ARCH)
string(STRIP "${GCC_ARCH}" GCC_ARCH_TRIPLE)
Expand Down
54 changes: 54 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
version: 2.0.0-beta.1-{branch}+{build}
image: Visual Studio 2015
environment:
BOOST_ROOT: C:\Libraries\boost_1_65_1

install:
- 'git submodule update --init'
- ps: '$env:path = $env:path.replace("C:\Program Files\Git\usr\bin;", "")'
- ps: '$env:path = "C:\msys64\mingw64\bin;C:\msys64\usr\bin\;" + $env:path'

build_script:

# uninstall tcl/tk
- pacman -Rdd --noconfirm mingw-w64-x86_64-tcl mingw-w64-x86_64-tk

# build tcl
- cd C:\projects
- wget -O tcl-release.tar.gz https://github.com/tcltk/tcl/archive/release.tar.gz
- tar xf tcl-release.tar.gz
- cd tcl-release/win/
- bash configure --enable-threads --enable-64bit --prefix=C:/tcltk/
- make
- make install

# build tk
- cd C:\projects
- wget -O tk-release.tar.gz https://github.com/tcltk/tk/archive/release.tar.gz
- tar xf tk-release.tar.gz
- cd tk-release/win/
- bash configure --enable-64bit --prefix=C:/tcltk/ --with-tcl=../../tcl-release/win/
- make
- make install

# build boost
- cd %BOOST_ROOT%
- call bootstrap.bat gcc
- cat bootstrap.log
- .\b2 toolset=gcc variant=release --with-thread --with-system --with-random --with-filesystem --with-program_options

# install emacs
# We cannot use $(pacman -S *-emacs because ISS packs C:/.../emacs.exe/../* which would include all of msys)
- choco install emacs64

# build mozart2
- mkdir C:\projects\mozart2\build
- cd C:\projects\mozart2\build
- cmake -DCMAKE_BUILD_TYPE=Release -G"MSYS Makefiles" -DCMAKE_PREFIX_PATH=C:/tcltk -DBOOST_ROOT="%BOOST_ROOT%" -DISS_INCLUDE_TCL=ON -DISS_INCLUDE_EMACS=ON C:\projects\mozart2
- make check || true
- cmake --build . --target installer -- VERBOSE=1

artifacts:
- path: build\mozart2-2.0.0-beta.1-x86_64-windows.exe
name: binary installer

5 changes: 5 additions & 0 deletions vm/boostenv/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,8 @@ include_directories(${GENERATED_BOOSTSOURCES_DIR})

add_library(mozartvmboost boostvm.cc boostenvmodules.cc)
add_dependencies(mozartvmboost genboostsources)

# We add bcrypt lib(dynamically) for Windows
if(WIN32)
target_link_libraries(mozartvmboost bcrypt)
endif()