Skip to content

Commit

Permalink
Merge pull request #452 from tfussell/automate-releases
Browse files Browse the repository at this point in the history
Automate releases
  • Loading branch information
tfussell authored Mar 21, 2020
2 parents 2f5934f + a07c8c0 commit 0a2a618
Show file tree
Hide file tree
Showing 6 changed files with 3,237 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ Win32/
*.pyd
python/record.txt
python/xlntpyarrow.egg-info/
/x64/
/x64/
.envrc
38 changes: 28 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ git:

notifications:
email: false

# set up build matrix
matrix:
include:
Expand All @@ -31,7 +31,8 @@ matrix:
- STATIC=OFF
- SAMPLES=OFF
- BENCHMARKS=OFF

- RELEASE=OFF

# ============= GCC ==================
# gcc-6, c++11, release build, dynamic linking
- os: linux
Expand All @@ -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
Expand All @@ -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
Expand All @@ -89,6 +92,7 @@ matrix:
- STATIC=ON
- SAMPLES=ON
- BENCHMARKS=ON
- RELEASE=ON

# =========== CLANG =============
# clang 4, c++11, release build, dynamic linking
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -170,7 +177,7 @@ matrix:
- COVERAGE=ON
- STATIC=ON
- SAMPLES=OFF

before_install:
- export CC=${C_COMPILER}
- export CXX=${CXX_COMPILER}
Expand All @@ -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'
Expand All @@ -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:
- |
Expand All @@ -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 changes: 18 additions & 0 deletions release/.release-it.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}
Loading

0 comments on commit 0a2a618

Please # to comment.