From 71ec4dca3fce8e69f16a66557a5d5ff94fc9ec19 Mon Sep 17 00:00:00 2001 From: Daniel Wolf Date: Sat, 19 Jun 2021 11:24:47 +0200 Subject: [PATCH] Use GitHub Actions for CI Closes #98 --- .appveyor.yml | 28 -------------- .github/workflows/ci.yml | 83 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 42 -------------------- CHANGELOG.md | 1 + README.adoc | 3 +- rhubarb/CMakeLists.txt | 21 +++------- 6 files changed, 91 insertions(+), 87 deletions(-) delete mode 100644 .appveyor.yml create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index 1f09e67..0000000 --- a/.appveyor.yml +++ /dev/null @@ -1,28 +0,0 @@ -image: Visual Studio 2015 -environment: - BOOST_ROOT: C:\Libraries\boost_1_66_0 - # If the Gradle Daemon is used, AppVeyor waits forever for it to terminate - GRADLE_OPTS: -Dorg.gradle.daemon=false -init: - # Print Remote Desktop information for debugging porposes - - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) -build_script: - - mkdir build - - cd build - - cmake .. -G "Visual Studio 14 2015" - - cmake --build . --config Release --target package - - cd %APPVEYOR_BUILD_FOLDER% -test_script: - - build\rhubarb\Release\runTests.exe -artifacts: - - path: build\rhubarb-lip-sync-*.zip -deploy: - provider: GitHub - release: $(APPVEYOR_REPO_TAG_NAME) - description: '' - auth_token: - secure: Gk7y8Cb9ImDBthgL56W1QMWDEp4oIcbUeKgXnkiBsy7G+V6H59MPXv0ZC7Zht8+3 - artifact: /.*\.zip/ - draft: true - on: - appveyor_repo_tag: true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..68a678b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,83 @@ +on: push +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - description: Windows / Visual Studio + os: windows-2019 + cmakeOptions: '-G "Visual Studio 16 2019" -A x64' + publish: true + - description: macOS / Xcode + os: macos-10.15 + cmakeOptions: "" + publish: true + - description: Linux / GCC + os: ubuntu-20.04 + cmakeOptions: "-D CMAKE_C_COMPILER=gcc-10 -D CMAKE_CXX_COMPILER=g++-10" + publish: true + - description: Linux / Clang + os: ubuntu-20.04 + cmakeOptions: "-D CMAKE_C_COMPILER=clang-12 -D CMAKE_CXX_COMPILER=clang++-12" + publish: false + env: + BOOST_ROOT: ${{ github.workspace }}/lib/boost + BOOST_URL: https://sourceforge.net/projects/boost/files/boost/1.76.0/boost_1_76_0.tar.bz2/download + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Restore Boost from cache + uses: actions/cache@v2 + id: cache-boost + with: + path: ${{ env.BOOST_ROOT }} + key: ${{ env.BOOST_URL }} + - name: Download Boost + if: steps.cache-boost.outputs.cache-hit != 'true' + shell: bash + run: | + if [ "$RUNNER_OS" == "Windows" ]; then + # use forward slashes only + BOOST_ROOT=$(echo $BOOST_ROOT | sed 's/\\/\//g') + fi + mkdir -p $BOOST_ROOT + curl --insecure -L $BOOST_URL | tar -xj --strip-components=1 -C $BOOST_ROOT + - name: Build Rhubarb + shell: bash + run: | + JAVA_HOME=$JAVA_HOME_11_X64 + mkdir build + cd build + cmake ${{ matrix.cmakeOptions }} .. + cmake --build . --config Release --target package + - name: Upload artifacts + uses: actions/upload-artifact@v2 + with: + name: binaries + path: build/*.zip + - name: Run tests + shell: bash + run: | + if [ "$RUNNER_OS" == "Windows" ]; then + ./build/rhubarb/Release/runTests.exe + else + ./build/rhubarb/runTests + fi + release: + needs: build + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/v') + steps: + - name: Download artifacts + uses: actions/download-artifact@v2 + with: + name: binaries + - name: Create GitHub release draft + uses: softprops/action-gh-release@v1 + with: + draft: true + files: "*.zip" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 260dc8f..0000000 --- a/.travis.yml +++ /dev/null @@ -1,42 +0,0 @@ -language: cpp - -sudo: required -dist: trusty -group: deprecated-2017Q4 - -matrix: - include: - - os: linux - compiler: gcc - before_install: - - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - - sudo apt-get -q update - install: - - sudo apt-get -y install g++-5 - - sudo apt-get -y install libboost-all-dev - script: - - mkdir build - - cd build - - cmake -DCMAKE_CXX_COMPILER=g++-5 .. - - cmake --build . --config Release --target package - - ./rhubarb/runTests - - os: osx - osx_image: xcode7.3 - script: - - mkdir build - - cd build - - cmake .. - - cmake --build . --config Release --target package - - ./rhubarb/runTests -deploy: - # Deploy to GitHub releases - provider: releases - api_key: $GITHUB_OAUTH_TOKEN - file_glob: true - file: "./rhubarb-lip-sync-*.zip" - skip_cleanup: true - on: - tags: true - tag_name: $TRAVIS_TAG - name: $TRAVIS_COMMIT_MESSAGE - draft: true diff --git a/CHANGELOG.md b/CHANGELOG.md index 13516a8..d13260d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased * **Changed** Rhubarb Lip Sync for Spine so that it works with any modern JRE ([issue #97](https://github.com/DanielSWolf/rhubarb-lip-sync/issues/97)) +* **Changed** Windows build from 32 bit to 64 bit ([issue #98](https://github.com/DanielSWolf/rhubarb-lip-sync/issues/98)) ## Version 1.10.0 diff --git a/README.adoc b/README.adoc index f9c0645..6041ba5 100644 --- a/README.adoc +++ b/README.adoc @@ -9,8 +9,7 @@ :X: Ⓧ image:https://img.shields.io/twitter/follow/RhubarbLipSync.svg?style=social&label=Follow["Twitter", link="https://twitter.com/RhubarbLipSync"] -image:https://img.shields.io/appveyor/ci/DanielSWolf/rhubarb-lip-sync/master.svg?label=Windows%20build["Windows build status", link="https://ci.appveyor.com/project/DanielSWolf/rhubarb-lip-sync"] -image:https://img.shields.io/travis/DanielSWolf/rhubarb-lip-sync/master.svg?label=OS%20X%20/%20Linux%20build["OS X / Linux build status", link="https://travis-ci.org/DanielSWolf/rhubarb-lip-sync"] +image:https://img.shields.io/github/workflow/status/DanielSWolf/rhubarb-lip-sync/ci["Build status"] --- diff --git a/rhubarb/CMakeLists.txt b/rhubarb/CMakeLists.txt index c2981e5..0e20ed3 100644 --- a/rhubarb/CMakeLists.txt +++ b/rhubarb/CMakeLists.txt @@ -1,28 +1,19 @@ -cmake_minimum_required(VERSION 3.2) +cmake_minimum_required(VERSION 3.10) include("../appInfo.cmake") # Support legacy OS X versions -set(CMAKE_OSX_DEPLOYMENT_TARGET "10.8" CACHE STRING "Minimum OS X deployment version") +set(CMAKE_OSX_DEPLOYMENT_TARGET "10.10" CACHE STRING "Minimum OS X deployment version") project(${appName}) # Enable C++17 -if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17") -elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17") -endif() +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) # Enable POSIX threads -if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -lpthread") -endif() - -# Make sure Xcode uses libc++ instead of libstdc++, allowing us to use the C++14 standard library prior to OS X 10.9 -if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") - add_compile_options(-stdlib=libc++) - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++") +if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread") endif() # Use static run-time