]> granicus.if.org Git - openjpeg/commitdiff
Update travis and appveyor to enable automatic releases on tag commit
authorAntonin Descampe <antonin@gmail.com>
Sat, 14 May 2016 22:42:54 +0000 (00:42 +0200)
committerAntonin Descampe <antonin@gmail.com>
Sat, 14 May 2016 22:42:54 +0000 (00:42 +0200)
.travis.yml
appveyor.yml
tools/travis-ci/run.sh

index d53145f350d3c89b11d701f1578e366e84ce0a17..fbbcdf390d6299c9817c954521d60fa7cdfac6c7 100644 (file)
@@ -4,10 +4,10 @@ matrix:
   include:
     - os: osx
       compiler: clang
-      env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Release
+      env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Release OPJ_CI_DEPLOY=1
     - os: linux
       compiler: gcc
-      env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Release
+      env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Release OPJ_CI_DEPLOY=1
     - os: linux
       compiler: gcc
       env: OPJ_CI_ARCH=i386 OPJ_CI_BUILD_CONFIGURATION=Release
@@ -65,3 +65,19 @@ install:
 script:
   - ./tools/travis-ci/run.sh
   - ./tools/travis-ci/abi-check.sh
+
+before_deploy:
+  - export OPJ_RELEASE_PKG_FILE=$(ls *.zip)
+  - echo "deploying $OPJ_RELEASE_PKG_FILE to GitHub releases"
+
+deploy:
+  provider: releases
+  api_key:
+    secure: Npi13uOffALCVNwea4p4q8v85Lo/WsRqaeZQcWrAkt8MxRnfvWQtmnuwmHnVB6Cig+T1lVUHrklOaJIApIb6nkGq3CS/9bD8+SCS2NEdAAP/QYWnBi0ubWXVMRyDLypmwRpzLNSZ0xLYGFUl2PjieZYKRcz1dd/J7S+FnXhPtdjXweq0FS63zTcMe7ggjfmzSOWUCEFmMjZPaM0Be+3PweieCO1dxlHuy7ugCkx2S7d+5hNsicIhQmTADjqtJAkHoMhYqu6/yLFxhjO/+f938PATFULdODTvjCsUwdN/ySWi1Oj4uPAntfytZP7H6YrzLh8dS73QCsdkhhDJIgJskHIBSbRyyEVUnOvQgD9VaBVGHtc1KtZQTwc41OUO3BGPHl97s3oX6bqWqo/L53dB3TPHGx+1+2HL/F0zaDZuHhAKMkPwe8LFPMPB/ur65zXMHjnWb2ZTVVdoIvkbQ7nu8ApI60ejxocYBsEyAuC2CPXU2ki4jdEhm0E1hIziWNE9/LTuM17ziQuJ6WpXOSMrfP4o5aVDmLp5ZGBSocrspOksgyI9XogHaO/r+Y6N3exy+giObFfMHkZVUpsKrKmtOJ7TC1Vg5HsYGlWW8RN8dkJV47bUXm9K4sMos9eYMUt/czykPAs+132cogpII3QxXpFZQqZg6SEPVfOiyqQzTUI=
+  file_glob: true
+  file: "${OPJ_RELEASE_PKG_FILE}"
+  skip_cleanup: true
+  on:
+    repo: uclouvain/openjpeg
+    tags: true
+
index d5cc1620e6d8080288876a2138b7ece3788ed010..9492f040b5dda750b7b675e021bbb40f12ae71b4 100644 (file)
@@ -2,14 +2,16 @@ version: 2.1.1.{build}
 branches:
   except:
   - coverity_scan
-skip_tags: true
+skip_tags: false
 clone_depth: 50
 environment:
   matrix:
   - OPJ_CI_ARCH: x86
     OPJ_CI_VSCOMNTOOLS: $(VS140COMNTOOLS)
+    OPJ_CI_DEPLOY: 1
   - OPJ_CI_ARCH: x64
     OPJ_CI_VSCOMNTOOLS: $(VS140COMNTOOLS)
+    OPJ_CI_DEPLOY: 1
   - OPJ_CI_ARCH: x86
     OPJ_CI_VSCOMNTOOLS: $(VS100COMNTOOLS)
 install:
@@ -20,4 +22,17 @@ build_script:
 
     bash ./tools/travis-ci/run.sh
 test: off
-deploy: off
+#before_deploy:
+#- cmd: c:\cygwin\bin\bash ./tools/travis-ci/before_deploy.sh
+deploy:
+  release: openjpeg-$(appveyor_repo_tag_name)
+  description: 'OpenJPEG $(appveyor_repo_tag_name) has been released'
+  provider: GitHub
+  auth_token:
+    secure: Huk03f1heCD/HMyA+4ZeVmICdmKn9rPxK5p8/KxzgL+FtJDHlqcllcCrtN9bDxRH # your encrypted token from GitHub
+  artifact: /.*\.zip/            # upload all zip packages to release assets
+  draft: true
+  prerelease: false
+  on:
+    branch: openjpeg-*
+    appveyor_repo_tag: true        # deploy on tag push only
index e8c5a2812974c4a1fbbed8164751e13b2e04b0b5..2357cff111926675ede9cd41df632169ae4a3f09 100755 (executable)
@@ -272,4 +272,18 @@ New/unknown test failure found!!!
        fi
 fi
 
+echo "OPJ_CI_DEPLOY: ${OPJ_CI_DEPLOY}"
+echo "TRAVIS_TAG: ${TRAVIS_TAG}"
+echo "APPVEYOR_REPO_TAG: ${APPVEYOR_REPO_TAG}"
+echo "APPVEYOR_REPO_TAG_NAME: ${APPVEYOR_REPO_TAG_NAME}"
+if [ "${OPJ_CI_DEPLOY:-}" == "1" ]; then
+       if [ "${TRAVIS_TAG:-}" != "" ]; then
+               cpack -G ZIP -P "OpenJPEG-${TRAVIS_TAG}-${OPJ_BUILDNAME_TEST}.zip"
+       fi
+       if [ "${APPVEYOR_REPO_TAG:-}" == "true" ]; then
+               cpack -G ZIP -P "OpenJPEG-${APPVEYOR_REPO_TAG_NAME}-${OPJ_BUILDNAME_TEST}.zip"
+               appveyor PushArtifact "OpenJPEG-${APPVEYOR_REPO_TAG_NAME}-${OPJ_BUILDNAME_TEST}.zip"
+       fi
+fi
+
 exit ${OPJ_CI_RESULT}