From 5833f33f41e97136135d0c778862cd5b26d3619f Mon Sep 17 00:00:00 2001 From: Alexander Bezzubov Date: Tue, 23 Oct 2018 23:42:17 +0200 Subject: [PATCH 1/3] ci: fail fast on release & fix linux-shared build Signed-off-by: Alexander Bezzubov --- .travis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index fb9ae76..490a7d4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -67,6 +67,8 @@ jobs: - name: 'linux shared lib' stage: release + install: + - go get -v -t ./... script: make linux-shared deploy: provider: release @@ -109,9 +111,9 @@ jobs: before_script: - cd java - make - - curl -o ./shared/linux-x86-64/libenry.so -sL "https://github.com/$TRAVIS_REPO_SLUG/releases/download/$TRAVIS_TAG/libenry.so" + - curl -o ./shared/linux-x86-64/libenry.so -sL "https://github.com/$TRAVIS_REPO_SLUG/releases/download/$TRAVIS_TAG/libenry.so" || travis_terminate 1 - mkdir -p ./shared/darwin - - curl -o ./shared/darwin/libenry.dylib -sL "https://github.com/$TRAVIS_REPO_SLUG/releases/download/$TRAVIS_TAG/libenry.dylib" + - curl -o ./shared/darwin/libenry.dylib -sL "https://github.com/$TRAVIS_REPO_SLUG/releases/download/$TRAVIS_TAG/libenry.dylib" || travis_terminate 1 - openssl aes-256-cbc -K $encrypted_a0e1c69dbbc7_key -iv $encrypted_a0e1c69dbbc7_iv -in key.asc.enc -out key.asc -d - gpg --no-default-keyring --primary-keyring ./project/.gnupg/pubring.gpg --secret-keyring ./project/.gnupg/secring.gpg --keyring ./project/.gnupg/pubring.gpg --fingerprint --import key.asc script: From dc7b8d721565dcc19dc0d671679341a7c275d5c1 Mon Sep 17 00:00:00 2001 From: Alexander Bezzubov Date: Tue, 23 Oct 2018 23:55:57 +0200 Subject: [PATCH 2/3] ci: move publishing .jar to separate stage Publishing jar relies on native lib artifacts beeing published to GH release first, thus a separate stage is needed to guarantee order. Signed-off-by: Alexander Bezzubov --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 490a7d4..b82ef5d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,6 +21,8 @@ stages: - name: test - name: release if: tag IS present + - name: publish + if: tag IS present jobs: include: @@ -101,7 +103,7 @@ jobs: skip_cleanup: true - name: 'java: publish to maven' - stage: release + stage: publish language: scala jdk: oraclejdk8 install: From 9d68ab72cd5a6b954cfb6a149129cc5fc286ce59 Mon Sep 17 00:00:00 2001 From: Alexander Bezzubov Date: Wed, 24 Oct 2018 00:37:52 +0200 Subject: [PATCH 3/3] ci: make curl actually fail on 404s Signed-off-by: Alexander Bezzubov --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index b82ef5d..169e813 100644 --- a/.travis.yml +++ b/.travis.yml @@ -92,7 +92,7 @@ jobs: - sudo apt-get update - sudo apt-get install -y --no-install-recommends clang g++ gcc gcc-multilib libc6-dev libc6-dev-i386 mingw-w64 patch xz-utils - cd ${HOME} - - curl -sSL ${OSXCROSS_URL} | tar -C ${HOME} -xzf - + - curl -sfSL ${OSXCROSS_URL} | tar -C ${HOME} -xzf - - cd $GOPATH/src/gopkg.in/src-d/enry.v1 script: make darwin-shared deploy: @@ -113,9 +113,9 @@ jobs: before_script: - cd java - make - - curl -o ./shared/linux-x86-64/libenry.so -sL "https://github.com/$TRAVIS_REPO_SLUG/releases/download/$TRAVIS_TAG/libenry.so" || travis_terminate 1 + - curl -o ./shared/linux-x86-64/libenry.so -sfL "https://github.com/$TRAVIS_REPO_SLUG/releases/download/$TRAVIS_TAG/libenry.so" || travis_terminate 1 - mkdir -p ./shared/darwin - - curl -o ./shared/darwin/libenry.dylib -sL "https://github.com/$TRAVIS_REPO_SLUG/releases/download/$TRAVIS_TAG/libenry.dylib" || travis_terminate 1 + - curl -o ./shared/darwin/libenry.dylib -sfL "https://github.com/$TRAVIS_REPO_SLUG/releases/download/$TRAVIS_TAG/libenry.dylib" || travis_terminate 1 - openssl aes-256-cbc -K $encrypted_a0e1c69dbbc7_key -iv $encrypted_a0e1c69dbbc7_iv -in key.asc.enc -out key.asc -d - gpg --no-default-keyring --primary-keyring ./project/.gnupg/pubring.gpg --secret-keyring ./project/.gnupg/secring.gpg --keyring ./project/.gnupg/pubring.gpg --fingerprint --import key.asc script: