diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..d288ea682 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,342 @@ +name: Release +on: + push: + tags: + - 'v*' +env: + GO_VERSION: 1.13 + GOPATH: ${{ github.workspace }}/go + WORKING_DIR: ${{ github.workspace }}/go/src/github.com/ethereum/go-ethereum +jobs: + build: + name: 'Build binary for ${{ matrix.os }}' + strategy: + fail-fast: false + matrix: + os: ["ubuntu-latest", "macos-latest"] + runs-on: ${{ matrix.os }} + steps: + - name: 'Setup Go ${{ env.GO_VERSION }}' + uses: actions/setup-go@v1 + with: + go-version: ${{ env.GO_VERSION }} + - name: 'Prepare environment' + id: env + run: | + echo "::add-path::$(go env GOPATH)/bin" + echo "::set-output name=key::$(go env GOOS)_$(go env GOARCH)" + echo "::set-output name=version::${GITHUB_REF##*/}" + - name: 'Check out project files' + uses: actions/checkout@574281d + with: + submodules: recursive + path: ${{ env.WORKING_DIR }} + - name: 'Build geth' + working-directory: ${{ env.WORKING_DIR }} + run: | + make geth + mkdir -p build/artifact + tar cfvz build/artifact/geth_${{ steps.env.outputs.version }}_${{ steps.env.outputs.key }}.tar.gz -C build/bin geth + - name: 'Upload artifact' + uses: actions/upload-artifact@v2 + with: + path: ${{ env.WORKING_DIR }}/build/artifact + name: ${{ steps.env.outputs.key }} + prepare-bintray: + name: 'Prepare Bintray' + runs-on: ubuntu-latest + steps: + - name: 'Setup jfrog CLI' + uses: jfrog/setup-jfrog-cli@v1 + - name: 'Create new version in Bintray' + id: prepare_bintray + run: | + TAG="${GITHUB_REF##*/}" + PACKAGE="${{ secrets.BINTRAY_PACKAGE }}" # e.g.: quorumengineering/quorum/geth + VERSION="$PACKAGE/$TAG" + jfrog bt package-show --key ${{ secrets.BINTRAY_API_KEY }} --user ${{ secrets.BINTRAY_USER }} $PACKAGE + echo "Checking $VERSION" + jfrog bt version-show --key ${{ secrets.BINTRAY_API_KEY }} --user ${{ secrets.BINTRAY_USER }} $VERSION && x=0 || x=1 + if [ $x -eq 0 ]; then + echo "$VERSION already exists" + else + jfrog bt version-create --key ${{ secrets.BINTRAY_API_KEY }} --user ${{ secrets.BINTRAY_USER }} \ + --vcs-tag $TAG --released $(date -u +"%Y-%m-%dT%H:%M:%SZ") \ + $VERSION + fi + deploy-bintray: + name: 'Deploy binaries to Bintray' + needs: + - build + - prepare-bintray + runs-on: ubuntu-latest + steps: + - name: 'Setup jfrog CLI' + uses: jfrog/setup-jfrog-cli@v1 + - name: 'Download artifacts' + uses: actions/download-artifact@v2 + with: + path: artifact + - name: 'Upload artifacts to Bintray' + run: | + TAG="${GITHUB_REF##*/}" + jfrog bt upload --key ${{ secrets.BINTRAY_API_KEY }} --user ${{ secrets.BINTRAY_USER }} --publish --override \ + "artifact/*/*.*" \ + ${{ secrets.BINTRAY_PACKAGE }}/$TAG \ + $TAG/ + draft-release: + name: 'Draft Github release' + needs: + - deploy-bintray + runs-on: ubuntu-latest + steps: + - name: 'Check out project files' + uses: actions/checkout@v2 + - name: 'Generate release notes' + id: release_notes + run: | + git fetch --depth=1 origin +refs/tags/*:refs/tags/* + package="${{ secrets.BINTRAY_PACKAGE }}" + repo="${package%/*}" + file="generated-release-notes.md" + current_version="${GITHUB_REF##*/}" + last_version=$(git describe --abbrev=0 --tags `git rev-list --tags --skip=1 --max-count=1`) + last_release_date=$(git log -1 --format=%cd --date=short $last_version) + echo "Last version: $last_version on $last_release_date" + # pulling from git logs + curl -q -s -H "Accept: application/vnd.github.v3+json" \ + "https://api.github.com/search/issues?q=repo:jpmorganchase/quorum+is:pr+is:merged+merged%3A>=$last_release_date+sort%3Aupdated-desc" | jq -r '"* " + (.items[]|.title + " #" + (.number|tostring))' \ + >> $file + # pulling file hashes from Bintray + echo "" >> $file + echo "| Filename | SHA256 Hash |" >> $file + echo "|:---------|:------------|" >> $file + curl -q -s -u ${{ secrets.BINTRAY_USER }}:${{ secrets.BINTRAY_API_KEY}} "https://api.bintray.com/packages/$package/versions/$current_version/files" \ + | jq '.[] | select(.name | endswith(".asc") | not) | "|[\(.name)](https://bintray.com/$repo/download_file?file_path=\(.path))|`\(.sha256)`|"' -r \ + >> $file + content=$(cat $file) + # escape newline + content="${content//'%'/'%25'}" + content="${content//$'\n'/'%0A'}" + content="${content//$'\r'/'%0D'}" + echo "::set-output name=content::$content" + - name: 'Create Github draft release' + uses: actions/create-release@v1 + env: + # This token is provided by Actions, you do not need to create your own token + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: ${{ github.ref }} + body: | + ${{ steps.release_notes.outputs.content }} + draft: true + prerelease: false + notify: + if: always() + name: 'Notify' + needs: + - build + - deploy-bintray + - draft-release + runs-on: ubuntu-latest + steps: + - name: 'Setup metadata' + id: setup + run: | + gitref_path="${{ github.ref }}" + gitref_path=${gitref_path/refs\/heads/tree} # for refs/heads/my-branch + gitref_path=${gitref_path/refs\/tags/tree} # for refs/tags/v1.0.0 + gitref_path=${gitref_path#refs\/} # for refs/pull/123/merge + gitref_path=${gitref_path%/merge} # for refs/pull/123/merge + echo "::set-output name=gitref-path::$gitref_path" + echo "::set-output name=version::${GITHUB_REF##*/}" + - name: 'Prepare Slack message with full info' + id: status + uses: actions/github-script@0.8.0 + with: + script: | + var gitref_path = "${{ steps.setup.outputs.gitref-path }}" + //////////////////////////////////// + // retrieve workflow run data + //////////////////////////////////// + console.log("get workflow run") + const wf_run = await github.actions.getWorkflowRun({ + owner: context.repo.owner, + repo: context.repo.repo, + run_id: ${{ github.run_id }} + }) + console.log(wf_run.data) + console.log("get jobs for workflow run:", wf_run.data.jobs_url) + const jobs_response = await github.request(wf_run.data.jobs_url) + //////////////////////////////////// + // build slack notification message + //////////////////////////////////// + // some utility functions + var date_diff_func = function(start, end) { + var duration = end - start + // format the duration + var delta = duration / 1000 + var days = Math.floor(delta / 86400) + delta -= days * 86400 + var hours = Math.floor(delta / 3600) % 24 + delta -= hours * 3600 + var minutes = Math.floor(delta / 60) % 60 + delta -= minutes * 60 + var seconds = Math.floor(delta % 60) + var format_func = function(v, text, check) { + if (v <= 0 && check) { + return "" + } else { + return v + text + } + } + return format_func(days, "d", true) + format_func(hours, "h", true) + format_func(minutes, "m", true) + format_func(seconds, "s", false) + } + var status_icon_func = function(s) { + switch (s) { + case "w_success": + return ":white_check_mark:" + case "w_failure": + return ":no_entry:" + case "w_cancelled": + return ":warning:" + case "success": + return "\u2713" + case "failure": + return "\u2717" + default: + return "\u20e0" + } + } + // build the message + var job_blocks = [] + var is_wf_success = true + var is_wf_failure = false + for (j of jobs_response.data.jobs) { + console.log(j.name, ":", j.status, j.conclusion, j.started_at, j.completed_at) + // ignore the current job running this script + if (j.status != "completed") { + continue + } + if (j.conclusion != "success") { + is_wf_success = false + } + if (j.conclusion == "failure") { + is_wf_failure = true + } + job_blocks.push({ + type: "section", + text: { + type: "mrkdwn", + text: `${status_icon_func(j.conclusion)} <${j.html_url}|${j.name}> took ${date_diff_func(new Date(j.started_at), new Date(j.completed_at))}` + } + }) + } + var workflow_status = "w_cancelled" + if (is_wf_success) { + workflow_status = "w_success" + } else if (is_wf_failure) { + workflow_status = "w_failure" + } + var context_elements = [ + { + "type": "mrkdwn", + "text": "*Repo:* " + }, + { + "type": "mrkdwn", + "text": `*Branch:* ` + }, + { + "type": "mrkdwn", + "text": `*Event:* ${wf_run.data.event}` + }, + { + "type": "mrkdwn", + "text": `*Commit:* ` + }, + { + "type": "mrkdwn", + "text": `*Author:* ${wf_run.data.head_commit.author.name}` + } + ] + var header_blocks = [ + { + type: "section", + text: { + type: "mrkdwn", + text: `${status_icon_func(workflow_status)} *${{ github.workflow }} ${{ steps.setup.outputs.version }}* <${wf_run.data.html_url}|#${{ github.run_number }}> took ${date_diff_func(new Date(wf_run.data.created_at), new Date(wf_run.data.updated_at))}` + } + }, + { + type: "context", + elements: context_elements, + }, + { + type: "divider" + } + ] + var slack_msg = { + blocks: [].concat(header_blocks, job_blocks) + } + return slack_msg + - name: 'Prepare Slack message with partial info' + id: short_status + if: failure() + uses: actions/github-script@0.8.0 + with: + script: | + //////////////////////////////////// + // retrieve workflow run data + //////////////////////////////////// + const wf_run = await github.actions.getWorkflowRun({ + owner: context.repo.owner, + repo: context.repo.repo, + run_id: ${{ github.run_id }} + }) + var date_diff_func = function(start, end) { + var duration = end - start + // format the duration + var delta = duration / 1000 + var days = Math.floor(delta / 86400) + delta -= days * 86400 + var hours = Math.floor(delta / 3600) % 24 + delta -= hours * 3600 + var minutes = Math.floor(delta / 60) % 60 + delta -= minutes * 60 + var seconds = Math.floor(delta % 60) + var format_func = function(v, text, check) { + if (v <= 0 && check) { + return "" + } else { + return v + text + } + } + return format_func(days, "d", true) + format_func(hours, "h", true) + format_func(minutes, "m", true) + format_func(seconds, "s", false) + } + var slack_msg = { + blocks: [ + { + type: "section", + text: { + type: "mrkdwn", + text: `:skull_and_crossbones: *${{ github.workflow }}* <${wf_run.data.html_url}|#${{ github.run_number }}> (took ${date_diff_func(new Date(wf_run.data.created_at), new Date(wf_run.data.updated_at))})` + } + } + ] + } + return slack_msg + - name: 'Send to Slack' + if: always() + run: | + cat < long_message.json + ${{ steps.status.outputs.result }} + JSON + cat < short_message.json + ${{ steps.short_status.outputs.result }} + JSON + _post() { + curl -X POST ${{ secrets.SLACK_WEBHOOK_URL }} -H "Content-type: application/json" --data "@${1}" + } + _post "long_message.json" || _post "short_message.json" \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 7e0bc09ad..82aa5a994 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,79 +1,228 @@ -# simplified version of the upstream travis configuration with additional features -# 1. Distribute binaries to bintray from Tag - language: go go_import_path: github.com/ethereum/go-ethereum -go: 1.13.x -sudo: true -branches: - only: - - /.*/ # everything including tags - -env: - global: - - BINTRAY_ORGANIZATION=quorumengineering - - BINTRAY_USER=quorumbot - # Bintray API Key - - secure: "QHiPcd3zQoJEsT3VSpxoLVTYwbiYzS8H18EpY7Tk0EqCIfswS2AvRlyRXUxNvCf9ktzpaeXV4b5cPYJ67dwdp5V/O/ARaK5AL6ZjjrTPR1avPnmz/X2VeQEP0aWk1UGMs1nBUj5rzMbIIxlVhpbiITTLAI4Ao0+xRcBi215mDbv271Z7mACEZfXxjaoJA0/3IkbKz9pu1nC7bTjaaExCDAeLp2p8fHi2YQPnBll/7dkn/m1rnsIY9M3KWNCx6xBmQOr1hulrrB6tZoHwFBoDsVTFJFLckPfrWUZsYUgtfWJMQWc6ntv1gFl0f9x6s5fYEphCU2m1JYjEczlQ03B5ro9EyPGKjO7vQxAaFd5nVd2Xf34ZbssEIyXxlSnP/4Gv1GXl9L9aU1Hth9ckYvT5gYP5t/Nw3CDbKD0HelPBvkf8jZwfdlotzFPS2bOZNdl/rJLWgQrX18a/mC3BH9l4TSRz13tbRfo6YcC3Y/uOvG1n4GxzcVaWojAxn86SkknOczPTf2pk9F3JOcGVSYA2R4kGQAe+ErJH2X5g2sh1D5cCYDjQyl5rzWg6P3eK//HYW+mg2+TQ8k2iQVVSwFwrR0Yn4P+5cRDCW9mjtktgq1rTtslj41gSH49Avqr9oXGM2rqdcJPdN8dnmLMrAtmeSUNMMoexiRMmlF2OQKLrW3k=" - -matrix: +sudo: false +jobs: include: - - if: tag IS present + # This builder only tests code linters on latest version of Go + - stage: lint os: linux dist: xenial - env: OUTPUT_FILE=geth_${TRAVIS_TAG}_linux_amd64.tar.gz + go: 1.13.x + env: + - lint + git: + submodules: false # avoid cloning ethereum/tests script: - - build/env.sh go run build/ci.go install ./cmd/geth - - sudo mkdir -p /dist - - cd build/bin - - sudo tar cfvz /dist/${OUTPUT_FILE} geth + - go run build/ci.go lint - - if: tag IS present + - stage: build + os: linux + dist: xenial + go: 1.11.x + script: + - go run build/ci.go install + - go run build/ci.go test -coverage $TEST_PACKAGES + + - stage: build + os: linux + dist: xenial + go: 1.12.x + script: + - go run build/ci.go install + - go run build/ci.go test -coverage $TEST_PACKAGES + + # These are the latest Go versions. + - stage: build + os: linux + dist: xenial + go: 1.13.x + script: + - go run build/ci.go install + - go run build/ci.go test -coverage $TEST_PACKAGES + + - stage: build os: osx - env: OUTPUT_FILE=geth_${TRAVIS_TAG}_darwin_amd64.tar.gz + go: 1.13.x script: - - build/env.sh go run build/ci.go install ./cmd/geth - - sudo mkdir -p /dist - - cd build/bin - - sudo tar cfvz /dist/${OUTPUT_FILE} geth + - echo "Increase the maximum number of open file descriptors on macOS" + - NOFILE=20480 + - sudo sysctl -w kern.maxfiles=$NOFILE + - sudo sysctl -w kern.maxfilesperproc=$NOFILE + - sudo launchctl limit maxfiles $NOFILE $NOFILE + - sudo launchctl limit maxfiles + - ulimit -S -n $NOFILE + - ulimit -n + - unset -f cd # workaround for https://github.com/travis-ci/travis-ci/issues/8703 + - go run build/ci.go install + - go run build/ci.go test -coverage $TEST_PACKAGES -before_deploy: - - | - echo "Prepare Bintray descriptor" - export GETH_VERSION=$(cat ${TRAVIS_BUILD_DIR}/VERSION) - export RELEASED_DATE=$(date +'%Y-%m-%d') - sed -e "s/_TRAVIS_TAG_/${TRAVIS_TAG}/g" \ - -e "s/_TRAVIS_BUILD_NUMBER_/${TRAVIS_BUILD_NUMBER}/g" \ - -e "s/_GETH_VERSION_/${GETH_VERSION}/g" \ - -e "s/_RELEASED_DATE_/${RELEASED_DATE}/g" \ - -e "s/_TRAVIS_COMMIT_/${TRAVIS_COMMIT}/g" \ - -e "s/_TRAVIS_JOB_WEB_URL_/${TRAVIS_JOB_WEB_URL//\//\\/}/g" \ - -e "s/_ORGANIZATION_/${BINTRAY_ORGANIZATION}/g" \ - ${TRAVIS_BUILD_DIR}/.bintray.json > /tmp/bintray.json -after_deploy: - - | - published="" - while [ "$published" == "" ]; do - echo "Sleep 5s to wait until ${OUTPUT_FILE} is published" - sleep 5 - result=$(curl -u ${BINTRAY_USER}:${BINTRAY_API_KEY} "https://api.bintray.com/packages/${BINTRAY_ORGANIZATION}/quorum/geth/versions/${TRAVIS_TAG}/files") - echo "$result" - if [[ "$result" == *"${OUTPUT_FILE}"* ]]; then - published="done" - fi - done - - | - echo "Add ${OUTPUT_FILE} to Download List" - curl -u ${BINTRAY_USER}:${BINTRAY_API_KEY} \ - -H "Content-type: application/json" \ - -X PUT \ - --data "{\"list_in_downloads\": true}" \ - https://api.bintray.com/file_metadata/${BINTRAY_ORGANIZATION}/quorum/${TRAVIS_TAG}/${OUTPUT_FILE} -deploy: - provider: bintray - file: /tmp/bintray.json - user: ${BINTRAY_USER} - key: ${BINTRAY_API_KEY} - skip_cleanup: true - on: - tags: true \ No newline at end of file + # This builder does the Ubuntu PPA upload + - stage: build + if: type = push + os: linux + dist: xenial + go: 1.13.x + env: + - ubuntu-ppa + git: + submodules: false # avoid cloning ethereum/tests + addons: + apt: + packages: + - devscripts + - debhelper + - dput + - fakeroot + - python-bzrlib + - python-paramiko + cache: + directories: + - $HOME/.gobundle + script: + - echo '|1|7SiYPr9xl3uctzovOTj4gMwAC1M=|t6ReES75Bo/PxlOPJ6/GsGbTrM0= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0aKz5UTUndYgIGG7dQBV+HaeuEZJ2xPHo2DS2iSKvUL4xNMSAY4UguNW+pX56nAQmZKIZZ8MaEvSj6zMEDiq6HFfn5JcTlM80UwlnyKe8B8p7Nk06PPQLrnmQt5fh0HmEcZx+JU9TZsfCHPnX7MNz4ELfZE6cFsclClrKim3BHUIGq//t93DllB+h4O9LHjEUsQ1Sr63irDLSutkLJD6RXchjROXkNirlcNVHH/jwLWR5RcYilNX7S5bIkK8NlWPjsn/8Ua5O7I9/YoE97PpO6i73DTGLh5H9JN/SITwCKBkgSDWUt61uPK3Y11Gty7o2lWsBjhBUm2Y38CBsoGmBw==' >> ~/.ssh/known_hosts + - go run build/ci.go debsrc -upload ethereum/ethereum -sftp-user geth-ci -signer "Go Ethereum Linux Builder " -goversion 1.13.4 -gohash 95dbeab442ee2746b9acf0934c8e2fc26414a0565c008631b04addb8c02e7624 -gobundle $HOME/.gobundle/go.tar.gz + + # This builder does the Linux Azure uploads + - stage: build + if: type = push + os: linux + dist: xenial + sudo: required + go: 1.13.x + env: + - azure-linux + git: + submodules: false # avoid cloning ethereum/tests + addons: + apt: + packages: + - gcc-multilib + script: + # Build for the primary platforms that Trusty can manage + - go run build/ci.go install + - go run build/ci.go archive -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds + - go run build/ci.go install -arch 386 + - go run build/ci.go archive -arch 386 -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds + + # Switch over GCC to cross compilation (breaks 386, hence why do it here only) + - sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install gcc-arm-linux-gnueabi libc6-dev-armel-cross gcc-arm-linux-gnueabihf libc6-dev-armhf-cross gcc-aarch64-linux-gnu libc6-dev-arm64-cross + - sudo ln -s /usr/include/asm-generic /usr/include/asm + + - GOARM=5 go run build/ci.go install -arch arm -cc arm-linux-gnueabi-gcc + - GOARM=5 go run build/ci.go archive -arch arm -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds + - GOARM=6 go run build/ci.go install -arch arm -cc arm-linux-gnueabi-gcc + - GOARM=6 go run build/ci.go archive -arch arm -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds + - GOARM=7 go run build/ci.go install -arch arm -cc arm-linux-gnueabihf-gcc + - GOARM=7 go run build/ci.go archive -arch arm -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds + - go run build/ci.go install -arch arm64 -cc aarch64-linux-gnu-gcc + - go run build/ci.go archive -arch arm64 -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds + + # This builder does the Linux Azure MIPS xgo uploads + - stage: build + if: type = push + os: linux + dist: xenial + services: + - docker + go: 1.13.x + env: + - azure-linux-mips + git: + submodules: false # avoid cloning ethereum/tests + script: + - go run build/ci.go xgo --alltools -- --targets=linux/mips --ldflags '-extldflags "-static"' -v + - for bin in build/bin/*-linux-mips; do mv -f "${bin}" "${bin/-linux-mips/}"; done + - go run build/ci.go archive -arch mips -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds + + - go run build/ci.go xgo --alltools -- --targets=linux/mipsle --ldflags '-extldflags "-static"' -v + - for bin in build/bin/*-linux-mipsle; do mv -f "${bin}" "${bin/-linux-mipsle/}"; done + - go run build/ci.go archive -arch mipsle -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds + + - go run build/ci.go xgo --alltools -- --targets=linux/mips64 --ldflags '-extldflags "-static"' -v + - for bin in build/bin/*-linux-mips64; do mv -f "${bin}" "${bin/-linux-mips64/}"; done + - go run build/ci.go archive -arch mips64 -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds + + - go run build/ci.go xgo --alltools -- --targets=linux/mips64le --ldflags '-extldflags "-static"' -v + - for bin in build/bin/*-linux-mips64le; do mv -f "${bin}" "${bin/-linux-mips64le/}"; done + - go run build/ci.go archive -arch mips64le -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds + + # This builder does the Android Maven and Azure uploads + - stage: build + if: type = push + os: linux + dist: xenial + addons: + apt: + packages: + - oracle-java8-installer + - oracle-java8-set-default + language: android + android: + components: + - platform-tools + - tools + - android-15 + - android-19 + - android-24 + env: + - azure-android + - maven-android + git: + submodules: false # avoid cloning ethereum/tests + before_install: + - curl https://dl.google.com/go/go1.13.linux-amd64.tar.gz | tar -xz + - export PATH=`pwd`/go/bin:$PATH + - export GOROOT=`pwd`/go + - export GOPATH=$HOME/go + script: + # Build the Android archive and upload it to Maven Central and Azure + - curl https://dl.google.com/android/repository/android-ndk-r19b-linux-x86_64.zip -o android-ndk-r19b.zip + - unzip -q android-ndk-r19b.zip && rm android-ndk-r19b.zip + - mv android-ndk-r19b $ANDROID_HOME/ndk-bundle + + - mkdir -p $GOPATH/src/github.com/ethereum + - ln -s `pwd` $GOPATH/src/github.com/ethereum/go-ethereum + - go run build/ci.go aar -signer ANDROID_SIGNING_KEY -deploy https://oss.sonatype.org -upload gethstore/builds + + # This builder does the OSX Azure, iOS CocoaPods and iOS Azure uploads + - stage: build + if: type = push + os: osx + go: 1.13.x + env: + - azure-osx + - azure-ios + - cocoapods-ios + git: + submodules: false # avoid cloning ethereum/tests + script: + - go run build/ci.go install + - go run build/ci.go archive -type tar -signer OSX_SIGNING_KEY -upload gethstore/builds + + # Build the iOS framework and upload it to CocoaPods and Azure + - gem uninstall cocoapods -a -x + - gem install cocoapods + + - mv ~/.cocoapods/repos/master ~/.cocoapods/repos/master.bak + - sed -i '.bak' 's/repo.join/!repo.join/g' $(dirname `gem which cocoapods`)/cocoapods/sources_manager.rb + - if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then git clone --depth=1 https://github.com/CocoaPods/Specs.git ~/.cocoapods/repos/master && pod setup --verbose; fi + + - xctool -version + - xcrun simctl list + + # Workaround for https://github.com/golang/go/issues/23749 + - export CGO_CFLAGS_ALLOW='-fmodules|-fblocks|-fobjc-arc' + - go run build/ci.go xcode -signer IOS_SIGNING_KEY -deploy trunk -upload gethstore/builds + + # This builder does the Azure archive purges to avoid accumulating junk + - stage: build + if: type = cron + os: linux + dist: xenial + go: 1.13.x + env: + - azure-purge + git: + submodules: false # avoid cloning ethereum/tests + script: + - go run build/ci.go purge -store gethstore/builds -days 14 diff --git a/Makefile b/Makefile index 2fc1fa056..f62ca2293 100644 --- a/Makefile +++ b/Makefile @@ -147,44 +147,3 @@ geth-windows-amd64: build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=windows/amd64 -v ./cmd/geth @echo "Windows amd64 cross compilation done:" @ls -ld $(GOBIN)/geth-windows-* | grep amd64 - -# QUORUM - BEGIN -RELEASE_NOTES_FILE := generated-release-notes.md -LAST_RELEASE_VERSION := $(shell git describe --tags --abbrev=0 @^) -REQUIRED_ENV_VARS := QUORUM_RELEASE BINTRAY_USER BINTRAY_API_KEY GITHUB_TOKEN -release-prepare: release-tools - @[ "${QUORUM_RELEASE}" ] || (echo "Please provide QUORUM_RELEASE env variable" ; exit 1) - @rm -f $(RELEASE_NOTES_FILE) - @echo "Last release: $(LAST_RELEASE_VERSION)" - @echo "This release: ${QUORUM_RELEASE}" - @echo "${QUORUM_RELEASE}\n\n" > $(RELEASE_NOTES_FILE) - @git log --pretty=format:%s $(LAST_RELEASE_VERSION)..@ >> $(RELEASE_NOTES_FILE) - @echo "$(RELEASE_NOTES_FILE) has been created" - -release: release-tools check-release-env - @jfrog bt version-show quorumengineering/quorum/geth/${QUORUM_RELEASE} --key ${BINTRAY_API_KEY} --user ${BINTRAY_USER} - @echo "\n\n| Filename | SHA256 Hash |" >> $(RELEASE_NOTES_FILE) - @echo "|:---------|:------------|" >> $(RELEASE_NOTES_FILE) - @curl -s -u ${BINTRAY_USER}:${BINTRAY_API_KEY} https://api.bintray.com/packages/quorumengineering/quorum/geth/versions/${QUORUM_RELEASE}/files \ - | jq '.[] | select(.name | endswith(".asc") | not) | "|[\(.name)](https://bintray.com/quorumengineering/quorum/download_file?file_path=\(.path))|`\(.sha256)`|"' -r \ - >> $(RELEASE_NOTES_FILE) - @hub release create -d -F $(RELEASE_NOTES_FILE) ${QUORUM_RELEASE} - -# make sure all API Keys are set -check-release-env: $(REQUIRED_ENV_VARS) - @[ -f "$(RELEASE_NOTES_FILE)" ] || (echo "Please run 'make release-prepare' and edit the release notes"; exit 1) - -$(REQUIRED_ENV_VARS): - @[ "${$@}" ] || (echo "Please provide $@ env variable" ; exit 1) - -release-tools: -ifeq (, $(shell which hub)) - @echo "Please install Github CLI from https://hub.github.com" -endif -ifeq (, $(shell which jfrog)) - @echo "Please install JFrog CLI from https://jfrog.com/getcli" -endif -ifeq (, $(shell which jq)) - @echo "Please install jq from https://stedolan.github.io/jq/download" -endif -# QUORUM - END diff --git a/README.md b/README.md index d150fb8fe..6e6699f04 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Quorum Slack -[![Build Status](https://travis-ci.org/jpmorganchase/quorum.svg?branch=master)](https://travis-ci.org/jpmorganchase/quorum) +![Build Check](https://github.com/jpmorganchase/quorum/workflows/Build%20Check/badge.svg?branch=master) [![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/quorumengineering/quorum)](https://hub.docker.com/r/quorumengineering/quorum/builds) [![Documentation Status](https://readthedocs.org/projects/goquorum/badge/?version=latest)](http://docs.goquorum.com/en/latest/?badge=latest) [![Download](https://api.bintray.com/packages/quorumengineering/quorum/geth/images/download.svg)](https://bintray.com/quorumengineering/quorum/geth/_latestVersion)