From f6656d1daaed1b89d012e1e3d1a51e022d9aeddd Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Mon, 18 Mar 2024 11:56:35 +0100 Subject: [PATCH] Travis+GitHub: replace Travis CI with GitHub MacOS 14 build --- .github/workflows/main.yml | 38 +++++++++++++++++++++++++++++++ .travis.yml | 46 -------------------------------------- 2 files changed, 38 insertions(+), 46 deletions(-) delete mode 100644 .travis.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 61fbeef58..bd9edc474 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -328,6 +328,44 @@ jobs: path: logs-itest-windows.zip retention-days: 5 + ######################## + # run macOS integration test + ######################## + macos-integration-test: + name: run macOS itest + runs-on: macos-14 + if: '!contains(github.event.pull_request.labels.*.name, ''no-itest'')' + steps: + - name: git checkout + uses: actions/checkout@v3 + + - name: setup go ${{ env.GO_VERSION }} + uses: ./.github/actions/setup-go + with: + go-version: '${{ env.GO_VERSION }}' + key-prefix: integration-test + + - name: install bitcoind + run: | + wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}.0/bitcoin-${BITCOIN_VERSION}.0-arm64-apple-darwin.tar.gz + tar zxvf bitcoin-${BITCOIN_VERSION}.0-arm64-apple-darwin.tar.gz + mv bitcoin-${BITCOIN_VERSION}.0 /tmp/bitcoin + + - name: run itest + run: PATH=$PATH:/tmp/bitcoin/bin make itest-parallel backend=bitcoind + + - name: Zip log files on failure + if: ${{ failure() }} + timeout-minutes: 5 # timeout after 5 minute + run: 7z a logs-itest-macos.zip itest/**/*.log + + - name: Upload log files on failure + uses: actions/upload-artifact@v3 + if: ${{ failure() }} + with: + name: logs-itest-macos + path: logs-itest-macos.zip + retention-days: 5 ######################## # check pinned dependencies diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b7c7734d9..000000000 --- a/.travis.yml +++ /dev/null @@ -1,46 +0,0 @@ -language: go -cache: - directories: - - $GOCACHE - - $GOPATH/pkg/mod - - $GOPATH/src/github.com/btcsuite - - $GOPATH/src/github.com/golang - - $GOPATH/src/github.com/grpc-ecosystem - - $GOPATH/src/gopkg.in/alecthomas - - $GOPATH/src/google.golang.org - -# Remove Travis' default flag --depth=50 from the git clone command to make sure -# we have the whole git history, including the commit we lint against. -git: - depth: false - -go: - # If you change this value, please change it in the following files as well: - # /Dockerfile - # /dev.Dockerfile - # /make/builder.Dockerfile - # /.github/workflows/main.yml - # /.github/workflows/release.yml - - "1.21.0" - -env: - global: - - GOCACHE=$HOME/.go-build - - BITCOIN_VERSION="26" - -sudo: required - -jobs: - include: - - stage: Integration Test - name: Bitcoind Integration ARM - script: - - bash ./scripts/install_bitcoind.sh $BITCOIN_VERSION - - GOMEMLIMIT=1024MiB GOARM=7 GOARCH=arm GOOS=linux travis_wait 120 make itest-parallel backend=bitcoind tranches=8 - arch: arm64 - -after_failure: - - |- - LOG_FILES=$(find ./itest -name '*.log') - echo "Uploading to termbin.com..." && for f in $LOG_FILES; do echo -n $f; cat $f | nc termbin.com 9999 | xargs -r0 printf ' uploaded to %s'; done - echo "Uploading to file.io..." && tar -zcvO $LOG_FILES | curl -s -F 'file=@-;filename=logs.tar.gz' https://file.io | xargs -r0 printf 'logs.tar.gz uploaded to %s\n'