From 0bf5e7da12e87beac93d5083ed32a842f870df26 Mon Sep 17 00:00:00 2001 From: Insineer Date: Sun, 8 Sep 2019 16:36:22 +0300 Subject: [PATCH] test(build): add appveyor configuration --- .travis.yml | 6 +-- CI/appveyor/appveyor-debug.yml | 34 +++++++++++++++ CI/appveyor/appveyor-release.yml | 55 +++++++++++++++++++++++++ CI/{ => travis}/build.sh | 0 CI/{ => travis}/install_dependencies.sh | 0 CI/{ => travis}/run_tests.sh | 0 6 files changed, 92 insertions(+), 3 deletions(-) create mode 100644 CI/appveyor/appveyor-debug.yml create mode 100644 CI/appveyor/appveyor-release.yml rename CI/{ => travis}/build.sh (100%) rename CI/{ => travis}/install_dependencies.sh (100%) rename CI/{ => travis}/run_tests.sh (100%) diff --git a/.travis.yml b/.travis.yml index e0cd2b6..fbb5b4a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,10 +23,10 @@ addons: - g++-9 env: CC=gcc-9 && CXX=g++-9 install: - - ./CI/install_dependencies.sh + - ./CI/travis/install_dependencies.sh script: - - ./CI/build.sh - - ./CI/run_tests.sh + - ./CI/travis/build.sh + - ./CI/travis/run_tests.sh cache: directories: diff --git a/CI/appveyor/appveyor-debug.yml b/CI/appveyor/appveyor-debug.yml new file mode 100644 index 0000000..b6f7a58 --- /dev/null +++ b/CI/appveyor/appveyor-debug.yml @@ -0,0 +1,34 @@ +image: Visual Studio 2017 + +clone_folder: c:\projects\oss13 +clone_depth: 10 + +matrix: + fast_finish: false + +platform: x64 +configuration: Debug + +environment: + APPVEYOR_SAVE_CACHE_ON_ERROR: true + TOOLCHAIN: msvc15 + +skip_commits: + files: + - GameLogic/* + - Resources/* + +install: + - git submodule update --init --recursive + + - cd C:\Tools\vcpkg + - git pull + - .\bootstrap-vcpkg.bat + - vcpkg integrate install + - cd %APPVEYOR_BUILD_FOLDER% + + - vcpkg install python3:x64-windows-static + - vcpkg install sfml:x64-windows-static + - vcpkg install gtest:x64-windows-static + +cache: c:\tools\vcpkg\ diff --git a/CI/appveyor/appveyor-release.yml b/CI/appveyor/appveyor-release.yml new file mode 100644 index 0000000..1ad53df --- /dev/null +++ b/CI/appveyor/appveyor-release.yml @@ -0,0 +1,55 @@ +image: Visual Studio 2017 + +clone_folder: c:\projects\oss13 +clone_depth: 10 + +version: '0.0.{build}' + +configuration: Release + +environment: + APPVEYOR_SAVE_CACHE_ON_ERROR: true + TOOLCHAIN: msvc15 + +branches: + only: + - never-build-branch-automatically-dont-use-this-name + +platform: + - x64 + - x86 + +matrix: + fast_finish: true + +install: + - git submodule update --init --recursive + + - cd C:\Tools\vcpkg + - git pull + - .\bootstrap-vcpkg.bat + - vcpkg integrate install + - cd %APPVEYOR_BUILD_FOLDER% + + - vcpkg install "python3:%platform%-windows-static" + - vcpkg install "sfml:%platform%-windows-static" + - vcpkg install "gtest:%platform%-windows-static" + +cache: c:\tools\vcpkg\installed\ + +after_build: + - set BIN_FOLDER_SUFFIX=%platform% + - if "%BIN_FOLDER_SUFFIX%"=="x86" (set BIN_FOLDER_SUFFIX=Win32) + + - 7z a "OSS13-%platform%-%appveyor_build_version%.zip" "%APPVEYOR_BUILD_FOLDER%\bin\Release-%BIN_FOLDER_SUFFIX%\OSS13 Client.exe" "%APPVEYOR_BUILD_FOLDER%\bin\Release-%BIN_FOLDER_SUFFIX%\OSS13 Server.exe" Resources -ir!GameLogic\*.py Arialuni.ttf LICENSE README.md UsersDB + +artifacts: + - path: "OSS13-$(platform)-%appveyor_build_version%.zip" + +deploy: + release: OSS13-v$(appveyor_build_version) + provider: GitHub + auth_token: + secure: ZcnounehZDOonSsgvbGJvqxU+3N+s8nY6TvkQldbw7OWOjWujaExqvYoHsqsapgf + force_update: true + artifacts: /.*\.zip diff --git a/CI/build.sh b/CI/travis/build.sh similarity index 100% rename from CI/build.sh rename to CI/travis/build.sh diff --git a/CI/install_dependencies.sh b/CI/travis/install_dependencies.sh similarity index 100% rename from CI/install_dependencies.sh rename to CI/travis/install_dependencies.sh diff --git a/CI/run_tests.sh b/CI/travis/run_tests.sh similarity index 100% rename from CI/run_tests.sh rename to CI/travis/run_tests.sh