diff --git a/.circleci/config.yml b/.circleci/config.yml index 06213ebcb..51efa3345 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -418,6 +418,13 @@ defaults: tags: only: /.*/ + - workflow_trigger_on_releases: &workflow_trigger_on_releases + filters: + tags: + only: /^v.*/ + branches: + ignore: /.*/ + - workflow_ubuntu2004: &workflow_ubuntu2004 <<: *workflow_trigger_on_tags requires: @@ -1416,6 +1423,46 @@ jobs: path: all-bytecode-reports.zip - gitter_notify_failure_unless_pr + c_release_binaries: + <<: *base_ubuntu2004 + steps: + - checkout + - attach_workspace: + at: workspace + - run: + name: Gather and rename binaries from dependent jobs + command: | + mkdir github/ + cp workspace/solc/solc github/solc-static-linux + cp workspace/build/solc/solc github/solc-macos + cp workspace/solc/Release/solc.exe github/solc-windows.exe + cp workspace/soljson.js github/soljson.js + + cd github/ + tar --create --file ../github-binaries.tar * + - store_artifacts: + path: github-binaries.tar + - run: + name: Rename binaries to solc-bin naming convention + command: | + full_version=$( + github/solc-static-linux --version | + sed -En 's/^Version: ([0-9.]+.*\+commit\.[0-9a-f]+(\.mod)?).*$/\1/p' + ) + + mkdir -p solc-bin/{linux-amd64,macosx-amd64,windows-amd64,bin} + + mv github/solc-static-linux "solc-bin/linux-amd64/solc-linux-amd64-${full_version}" + mv github/solc-macos "solc-bin/macosx-amd64/solc-macosx-amd64-${full_version}" + mv github/solc-windows.exe "solc-bin/windows-amd64/solc-windows-amd64-${full_version}.exe" + mv github/soljson.js "solc-bin/bin/soljson-${full_version}.js" + + cd solc-bin/ + tar --create --file ../solc-bin-binaries.tar * + - store_artifacts: + path: solc-bin-binaries.tar + - gitter_notify_failure_unless_pr + workflows: version: 2 @@ -1536,6 +1583,15 @@ workflows: - b_bytecode_osx - b_bytecode_ems + # Final artifacts + - c_release_binaries: + <<: *workflow_trigger_on_releases + requires: + - b_ubu_static + - b_osx + - b_win_release + - b_ems + nightly: triggers: diff --git a/ReleaseChecklist.md b/ReleaseChecklist.md index 6d5008cb3..df72de4ee 100644 --- a/ReleaseChecklist.md +++ b/ReleaseChecklist.md @@ -26,29 +26,16 @@ - [ ] Click the `PUBLISH RELEASE` button on the release page, creating the tag. - [ ] Wait for the CI runs on the tag itself. -### Upload Release Artifacts +### Upload Release Artifacts and Publish Binaries - [ ] Switch to the tag that archives have to be created for. - [ ] Create the ``prerelease.txt`` file: (``echo -n > prerelease.txt``). - [ ] Run ``scripts/create_source_tarball.sh`` while being on the tag to create the source tarball. This will create the tarball in a directory called ``upload``. - [ ] Take the tarball from the upload directory (its name should be ``solidity_x.x.x.tar.gz``, otherwise ``prerelease.txt`` was missing in the step before) and upload the source tarball to the release page. - - [ ] Take the ``solc.exe`` binary from the ``b_win_release`` run of the released commit in circle-ci and add it to the release page as ``solc-windows.exe``. - - [ ] Take the ``solc`` binary from the ``b_osx`` run of the released commit in circle-ci and add it to the release page as ``solc-macos``. - - [ ] Take the ``solc`` binary from the ``b_ubu_static`` run of the released commit in circle-ci and add it to the release page as ``solc-static-linux``. - - [ ] Take the ``soljson.js`` binary from the ``b_ems`` run of the released commit in circle-ci and add it to the release page as ``soljson.js``. - -### Update [solc-bin](https://github.com/ethereum/solc-bin/) - - [ ] Copy files to solc-bin: - ```bash - VERSION=0.8.4 - COMMIT="c7e474f2" - SOLC_BIN="/home/me/solc-bin" - chmod +x solc-static-linux solc-macos - cp soljson.js $SOLC_BIN/bin/soljson-v$VERSION+commit.$COMMIT.js - cp solc-static-linux $SOLC_BIN/linux-amd64/solc-linux-amd64-v$VERSION+commit.$COMMIT - cp solc-macos $SOLC_BIN/macosx-amd64/solc-macosx-amd64-v$VERSION+commit.$COMMIT - cp solc-windows.exe $SOLC_BIN/windows-amd64/solc-windows-amd64-v$VERSION+commit.$COMMIT.exe + - [ ] Take the ``github-binaries.tar`` tarball from ``b_release_binaries`` run of the tagged commit in circle-ci and add all binaries from it to the release page. + Make sure it contains four binaries: ``solc-windows.exe``, ``solc-macos``, ``solc-static-linux`` and ``soljson.js``. + - [ ] Take the ``solc-bin-binaries.tar`` tarball from ``b_release_binaries`` run of the tagged commit in circle-ci and add all binaries from it to solc-bin. - [ ] Run ``./update --reuse-hashes`` in ``solc-bin`` and verify that the script has updated ``list.js``, ``list.txt`` and ``list.json`` files correctly and that symlinks to the new release have been added in ``solc-bin/wasm/`` and ``solc-bin/emscripten-wasm32/``. - - [ ] Create a pull request and merge. + - [ ] Create a pull request in solc-bin and merge. ### Homebrew and MacOS - [ ] Update the version and the hash (``sha256sum solidity_$VERSION.tar.gz``) in https://github.com/Homebrew/homebrew-core/blob/master/Formula/solidity.rb