mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
Merge pull request #452 from tfussell/automate-releases
Automate releases
This commit is contained in:
commit
0a2a618663
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -17,3 +17,4 @@ Win32/
|
|||
python/record.txt
|
||||
python/xlntpyarrow.egg-info/
|
||||
/x64/
|
||||
.envrc
|
||||
|
|
22
.travis.yml
22
.travis.yml
|
@ -31,6 +31,7 @@ matrix:
|
|||
- STATIC=OFF
|
||||
- SAMPLES=OFF
|
||||
- BENCHMARKS=OFF
|
||||
- RELEASE=OFF
|
||||
|
||||
# ============= GCC ==================
|
||||
# gcc-6, c++11, release build, dynamic linking
|
||||
|
@ -51,6 +52,7 @@ matrix:
|
|||
- STATIC=OFF
|
||||
- SAMPLES=OFF
|
||||
- BENCHMARKS=OFF
|
||||
- RELEASE=OFF
|
||||
|
||||
# gcc-7, c++14, release build, static linking
|
||||
- os: linux
|
||||
|
@ -70,6 +72,7 @@ matrix:
|
|||
- STATIC=ON
|
||||
- SAMPLES=OFF
|
||||
- BENCHMARKS=OFF
|
||||
- RELEASE=OFF
|
||||
|
||||
# gcc-8, c++17, release build, static linking, samples + benchmarks compiled and run
|
||||
- os: linux
|
||||
|
@ -89,6 +92,7 @@ matrix:
|
|||
- STATIC=ON
|
||||
- SAMPLES=ON
|
||||
- BENCHMARKS=ON
|
||||
- RELEASE=ON
|
||||
|
||||
# =========== CLANG =============
|
||||
# clang 4, c++11, release build, dynamic linking
|
||||
|
@ -110,6 +114,7 @@ matrix:
|
|||
- STATIC=OFF
|
||||
- SAMPLES=OFF
|
||||
- BENCHMARKS=OFF
|
||||
- RELEASE=OFF
|
||||
|
||||
# clang 5, c++14, release build, dynamic linking
|
||||
- os: linux
|
||||
|
@ -130,6 +135,7 @@ matrix:
|
|||
- STATIC=ON
|
||||
- SAMPLES=OFF
|
||||
- BENCHMARKS=OFF
|
||||
- RELEASE=OFF
|
||||
|
||||
# clang 6, c++17, release build, static linking, samples + benchmarks compiled and run
|
||||
- os: linux
|
||||
|
@ -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
|
||||
|
@ -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'
|
||||
|
@ -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
18
release/.release-it.json
Normal 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
3139
release/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
28
release/package.json
Normal file
28
release/package.json
Normal 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"
|
||||
}
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue
Block a user