Merge pull request #452 from tfussell/automate-releases

Automate releases
This commit is contained in:
Thomas Fussell 2020-03-21 14:40:49 -04:00 committed by GitHub
commit 0a2a618663
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 3237 additions and 13 deletions

3
.gitignore vendored
View File

@ -16,4 +16,5 @@ Win32/
*.pyd
python/record.txt
python/xlntpyarrow.egg-info/
/x64/
/x64/
.envrc

View File

@ -8,7 +8,7 @@ git:
notifications:
email: false
# set up build matrix
matrix:
include:
@ -31,7 +31,8 @@ matrix:
- STATIC=OFF
- SAMPLES=OFF
- BENCHMARKS=OFF
- RELEASE=OFF
# ============= GCC ==================
# gcc-6, c++11, release build, dynamic linking
- os: linux
@ -51,7 +52,8 @@ matrix:
- STATIC=OFF
- SAMPLES=OFF
- BENCHMARKS=OFF
- RELEASE=OFF
# gcc-7, c++14, release build, static linking
- os: linux
compiler: gcc
@ -70,7 +72,8 @@ matrix:
- STATIC=ON
- SAMPLES=OFF
- BENCHMARKS=OFF
- RELEASE=OFF
# gcc-8, c++17, release build, static linking, samples + benchmarks compiled and run
- os: linux
compiler: gcc
@ -89,6 +92,7 @@ matrix:
- STATIC=ON
- SAMPLES=ON
- BENCHMARKS=ON
- RELEASE=ON
# =========== CLANG =============
# clang 4, c++11, release build, dynamic linking
@ -110,7 +114,8 @@ matrix:
- STATIC=OFF
- SAMPLES=OFF
- BENCHMARKS=OFF
- RELEASE=OFF
# clang 5, c++14, release build, dynamic linking
- os: linux
compiler: clang
@ -130,7 +135,8 @@ matrix:
- STATIC=ON
- SAMPLES=OFF
- BENCHMARKS=OFF
- RELEASE=OFF
# clang 6, c++17, release build, static linking, samples + benchmarks compiled and run
- os: linux
compiler: clang
@ -150,6 +156,7 @@ matrix:
- STATIC=ON
- SAMPLES=ON
- BENCHMARKS=ON
- RELEASE=ON
# ============= CODE COVERAGE ===============
# gcc-6, c++11, debug build, static linking, code coverage enabled
@ -170,7 +177,7 @@ matrix:
- COVERAGE=ON
- STATIC=ON
- SAMPLES=OFF
before_install:
- export CC=${C_COMPILER}
- export CXX=${CXX_COMPILER}
@ -180,14 +187,13 @@ install:
if [[ "${COVERAGE}" == "ON" ]]; then
gem install coveralls-lcov;
fi
- ${CXX} --version
- cmake --version
script:
- mkdir build
- cd build
- cmake .. -DXLNT_CXX_LANG=${CXX_VER} -DSTATIC=$STATIC -DBENCHMARKS=$BENCHMARKS -DSAMPLES=$SAMPLES -DCOVERAGE=$COVERAGE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- cmake .. -DXLNT_CXX_LANG=${CXX_VER} -DSTATIC=$STATIC -DBENCHMARKS=$BENCHMARKS -DSAMPLES=$SAMPLES -DCOVERAGE=$COVERAGE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DRELEASE=$RELEASE
- cmake --build . -- -j2
- ./tests/xlnt.test
- echo "samples" && echo 'travis_fold:start:samples'
@ -199,7 +205,7 @@ script:
- if [[ "${BENCHMARKS}" == "ON" ]]; then ./benchmarks/benchmark-styles; fi
- if [[ "${BENCHMARKS}" == "ON" ]]; then ./benchmarks/benchmark-writer; fi
- echo 'travis_fold:end:benchmarks'
after_success:
- |
@ -211,3 +217,15 @@ after_success:
cd ..
coveralls-lcov build/coverage.info
fi
deploy:
provider: releases
api_key:
secure: "EJKEQkbmNFyXAJYOro7/wSlxSns4O4RAmht5PCBYuOgEqIbB1+QbQjNZd18KyCkqaHQEvww4hVGMdcFsTFnsznjGo6NnDtiYTdhiREtdUd6ohUD0eHTZ15ZL7mW1XR8HWqvv33piDX40UI/dFn1XYLnWunaLZvF5WPa9bzTsloaYHbjxoRw5S4fd0VyqZ2w2zuezCCRUezDcNGOxbVTbB3moSh+hpjrNkw7YxoPNm48CwGRVeRj28XuhDjobfRtPSZMb6Y+EDUnrIZI1mKvB1bkL8QR2ndBtqlG0BWvmEcdDuiQnraJk3iRIAU5T/ycyRqR2UKcW2Fv0iVp5SL9VuqhcvIUxTsYXzuNOZ3hKiWRTj6ndG+gDBsD1K5YwScZksAImwvj/VGEla9Q044W3PbYV2GUE++8mtiZUaxbkaP+uDFUBR5eXqAkte9mainwJ3eaMJ7Tx1KCqkzKO011nUasWfmBWxRUA8vm44SfzwzVfjXToLQZGe4KYzF2cHaXo2YIC48vE/DYs3VnVvnrCjNDO8Cr3m+lfdulhjIZlg+WymQcxuJs7LVzCW7mBPNnrUNOOrGCGP4f/hFxBLk8/eJDznIAzbW27Z1zAHn+MlbADRBzC0Y7cmme4Zu2W7Wy9NTvzNsKabOH/Fe1TfGetEEf6mZ5g7Q3+oZPJ2raLFD8="
file_glob: true
file: build/*.tar.gz
skip_cleanup: true
overwite: true
on:
repo: tfussell/xlnt
tags: true

18
release/.release-it.json Normal file
View File

@ -0,0 +1,18 @@
{
"git": {
"requireBranch": "master",
"requireCommits": true
},
"github": {
"release": true
},
"npm": false,
"plugins": {
"@release-it/bumper": {
"out": {
"file": "../CMakeLists.txt",
"type": "text/plain"
}
}
}
}

3139
release/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

28
release/package.json Normal file
View File

@ -0,0 +1,28 @@
{
"name": "xlnt",
"version": "1.4.0",
"description": "Cross-platform user-friendly xlsx library for C++11+",
"main": "index.js",
"directories": {
"doc": "docs",
"test": "tests"
},
"dependencies": {},
"devDependencies": {
"@release-it/bumper": "^1.1.0",
"release-it": "^13.1.1"
},
"scripts": {
"release": "release-it"
},
"repository": {
"type": "git",
"url": "git+https://github.com/tfussell/xlnt.git"
},
"author": "Thomas Fussell <thomas@fussell.io>",
"license": "MIT",
"bugs": {
"url": "https://github.com/tfussell/xlnt/issues"
},
"homepage": "https://github.com/tfussell/xlnt#readme"
}

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.1)
project(xlnt VERSION 1.4)
project(xlnt VERSION 1.4.0)
set(CMAKE_CXX_STANDARD ${XLNT_CXX_LANG})
set(CMAKE_CXX_STANDARD_REQUIRED ON)
@ -167,7 +167,7 @@ if(NOT STATIC)
set_target_properties(xlnt
PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}
INSTALL_NAME_DIR "${XLNT_LIB_DEST_DIR}")
else()
# Compile static library
@ -307,3 +307,23 @@ if(NOT MSVC)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/xlnt.pc"
DESTINATION ${XLNT_LIB_DEST_DIR}/pkgconfig)
endif()
if(RELEASE)
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
set(CPACK_GENERATOR "TGZ")
set(CPACK_PACKAGE_NAME "xlnt")
set(CPACK_SUFFIX "${CMAKE_SYSTEM_NAME}")
if ("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32")
string(CONCAT CPACK_SUFFIX ${CPACK_SUFFIX} "-x86")
else()
string(CONCAT CPACK_SUFFIX ${CPACK_SUFFIX} "-x64")
endif()
if(STATIC)
string(CONCAT CPACK_SUFFIX ${CPACK_SUFFIX} "-static")
endif()
string(TOLOWER "${CPACK_SUFFIX}" CPACK_SUFFIX)
set(CPACK_SYSTEM_NAME "${CPACK_SUFFIX}")
include(CPack)
endif()