Browse Source

Migrate the CI for Windows to Travis

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/1278/head
Dimitar Dobrev 6 years ago
parent
commit
4cb5ff4475
  1. 3
      .gitmodules
  2. 9
      .travis.yml
  3. 2
      README.md
  4. 91
      appveyor.yml
  5. 1
      build/modules/premake-qt

3
.gitmodules vendored

@ -1,3 +0,0 @@ @@ -1,3 +0,0 @@
[submodule "build/modules/premake-qt"]
path = build/modules/premake-qt
url = https://github.com/dcourtois/premake-qt.git

9
.travis.yml

@ -2,6 +2,7 @@ language: cpp @@ -2,6 +2,7 @@ language: cpp
sudo: required
os:
- windows
- linux
- osx
@ -18,11 +19,13 @@ addons: @@ -18,11 +19,13 @@ addons:
- g++-7
install:
- source build/InstallMono.sh
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then cmd /C "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM%; fi
- if [ "$TRAVIS_OS_NAME" != "windows" ]; then source build/InstallMono.sh; fi
- build/InstallNugets.sh
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$CXX" = "g++" ]; then export CXX="g++-7" CC="gcc-7"; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then PREMAKE=build/premake5-linux-64; else PREMAKE=build/premake5-osx; fi
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then PREMAKE=build/premake5.exe; elif [ "$TRAVIS_OS_NAME" = "linux" ]; then PREMAKE=build/premake5-linux-64; else PREMAKE=build/premake5-osx; fi
- $PREMAKE --file=build/scripts/LLVM.lua download_llvm
script: |
build/Compile.sh && build/RunTests.sh
- if [ "$TRAVIS_OS_NAME" = "windows" ] then $PREMAKE --file=build\premake5.lua %VS_VERSION% --arch=%PLATFORM% && msbuild.exe %BUILD_PATH%\CppSharp.sln; else then build/Compile.sh; fi
- build/RunTests.sh

2
README.md

@ -15,7 +15,7 @@ rich declaration and type information model. @@ -15,7 +15,7 @@ rich declaration and type information model.
|Windows 64-bit|Windows 32-bit| windows-vs-x86 | linux-gcc-x86_64 | osx-clang-x86 |
|---------------------------|---------------------------|---------------------------|-----------------------------|-----------------------------|
| [![NuGet](https://img.shields.io/nuget/v/CppSharp.svg)](https://www.nuget.org/packages/CppSharp/) | [![GitHub release](https://img.shields.io/github/release/mono/CppSharp.svg)](https://github.com/mono/CppSharp/releases) | [![windows-vs-x86](https://ci.appveyor.com/api/projects/status/5o9gxjcttuaup671/branch/master?svg=true)](https://ci.appveyor.com/project/tritao/CppSharp/branch/master) | [![linux-gcc-x86_64](https://travis-ci.org/mono/CppSharp.svg?branch=master)](https://travis-ci.org/mono/CppSharp) | [![osx-clang-x86](https://travis-ci.org/mono/CppSharp.svg?branch=master)](https://travis-ci.org/mono/CppSharp)
| [![NuGet](https://img.shields.io/nuget/v/CppSharp.svg)](https://www.nuget.org/packages/CppSharp/) | [![GitHub release](https://img.shields.io/github/release/mono/CppSharp.svg)](https://github.com/mono/CppSharp/releases) | [![linux-gcc-x86_64](https://travis-ci.org/mono/CppSharp.svg?branch=master)](https://travis-ci.org/mono/CppSharp) | [![osx-clang-x86](https://travis-ci.org/mono/CppSharp.svg?branch=master)](https://travis-ci.org/mono/CppSharp)
1. [Libraries](#libraries)
2. [Documentation](#documentation)

91
appveyor.yml

@ -1,91 +0,0 @@ @@ -1,91 +0,0 @@
# Reference: http://www.appveyor.com/docs/appveyor-yml
# Notes:
# - Indent each level of configuration with 2 spaces. Do not use tabs!
#---------------------------------#
# general configuration #
#---------------------------------#
version: 1.0.{build}
branches:
only:
- master
except:
- gh-pages
#---------------------------------#
# environment configuration #
#---------------------------------#
matrix:
fast_finish: true
os: Visual Studio 2017
platform:
- x86
- x64
configuration:
- Release
environment:
VS_VERSION: vs2017
DEPS_PATH: '%APPVEYOR_BUILD_FOLDER%\deps'
LLVM_PATH: '%APPVEYOR_BUILD_FOLDER%\deps\llvm'
BUILD_PATH: '%APPVEYOR_BUILD_FOLDER%\build\%VS_VERSION%'
LIB_PATH: '%APPVEYOR_BUILD_FOLDER%\build\%VS_VERSION%\lib\%CONFIGURATION%_%PLATFORM%'
ARTIFACT_NAME: '%APPVEYOR_PROJECT_NAME%-%APPVEYOR_REPO_TAG_NAME%-%VS_VERSION%-%PLATFORM%.zip'
GITHUB_ACCESS_TOKEN:
secure: CrxPDgxTKC9ZRvFjttpRPO+e1DT8s0Zkk9HrAmHOIzDkOfFbbu1iTm/yJjZ2eDcd
init:
- git config --global core.autocrlf true
install:
- call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM%
- build\premake5.exe --file=build\scripts\LLVM.lua download_llvm --arch=%PLATFORM%
build_script:
- build\premake5.exe --file=build\premake5.lua %VS_VERSION% --arch=%PLATFORM%
- msbuild %BUILD_PATH%\CppSharp.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /verbosity:minimal
#---------------------------------#
# parser bindings generation #
#---------------------------------#
on_success:
#- git config --global user.name "CppSharp CI"
#- git config --global user.email "joao+cppsharp-ci@tritao.eu"
#- git config --global credential.helper store
#- ps: Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:GITHUB_ACCESS_TOKEN):x-oauth-basic@github.com`n"
#- git remote set-url origin https://github.com/mono/CppSharp.git
#- git checkout master
#- '%LIB_PATH%\CppSharp.Parser.Gen.exe'
#- 'git commit -a -m "CI: Re-generated the parser bindings"'
#- git push
#---------------------------------#
# artifacts configuration #
#---------------------------------#
after_build:
- echo 'Preparing artifacts...'
- 7z a %ARTIFACT_NAME% %LIB_PATH%\CppSharp*
- appveyor PushArtifact %ARTIFACT_NAME%
#---------------------------------#
# deployment configuration #
#---------------------------------#
deploy:
release: 'CppSharp'
description: "Latest successful CI builds of branch 'master'"
provider: GitHub
auth_token:
secure: tSYxyXeLtE0f6ZsXsGaHZEAw5Nj4TcgN/rx8uCfPnRjcE55OLAVn/8WXEiovNXLt
prerelease: true
on:
branch: master
appveyor_repo_tag: true

1
build/modules/premake-qt

@ -1 +0,0 @@ @@ -1 +0,0 @@
Subproject commit 0ddc49715c7892211774d4b5e705a7c5559aeed4
Loading…
Cancel
Save