Skip to content

Commit 0153822

Browse files
committed
CI: Add c_release_binaries job that gathers release binaries from individual jobs
1 parent 0c0ff4f commit 0153822

File tree

2 files changed

+61
-18
lines changed

2 files changed

+61
-18
lines changed

.circleci/config.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,13 @@ defaults:
418418
tags:
419419
only: /.*/
420420

421+
- workflow_trigger_on_releases: &workflow_trigger_on_releases
422+
filters:
423+
tags:
424+
only: /^v.*/
425+
branches:
426+
ignore: /.*/
427+
421428
- workflow_ubuntu2004: &workflow_ubuntu2004
422429
<<: *workflow_trigger_on_tags
423430
requires:
@@ -1416,6 +1423,46 @@ jobs:
14161423
path: all-bytecode-reports.zip
14171424
- gitter_notify_failure_unless_pr
14181425

1426+
c_release_binaries:
1427+
<<: *base_ubuntu2004
1428+
steps:
1429+
- checkout
1430+
- attach_workspace:
1431+
at: workspace
1432+
- run:
1433+
name: Gather and rename binaries from dependent jobs
1434+
command: |
1435+
mkdir github/
1436+
cp workspace/solc/solc github/solc-static-linux
1437+
cp workspace/build/solc/solc github/solc-macos
1438+
cp workspace/solc/Release/solc.exe github/solc-windows.exe
1439+
cp workspace/soljson.js github/soljson.js
1440+
1441+
cd github/
1442+
tar --create --file ../github-binaries.tar *
1443+
- store_artifacts:
1444+
path: github-binaries.tar
1445+
- run:
1446+
name: Rename binaries to solc-bin naming convention
1447+
command: |
1448+
full_version=$(
1449+
github/solc-static-linux --version |
1450+
sed -En 's/^Version: ([0-9.]+.*\+commit\.[0-9a-f]+(\.mod)?).*$/\1/p'
1451+
)
1452+
1453+
mkdir -p solc-bin/{linux-amd64,macosx-amd64,windows-amd64,bin}
1454+
1455+
mv github/solc-static-linux "solc-bin/linux-amd64/solc-linux-amd64-${full_version}"
1456+
mv github/solc-macos "solc-bin/macosx-amd64/solc-macosx-amd64-${full_version}"
1457+
mv github/solc-windows.exe "solc-bin/windows-amd64/solc-windows-amd64-${full_version}.exe"
1458+
mv github/soljson.js "solc-bin/bin/soljson-${full_version}.js"
1459+
1460+
cd solc-bin/
1461+
tar --create --file ../solc-bin-binaries.tar *
1462+
- store_artifacts:
1463+
path: solc-bin-binaries.tar
1464+
- gitter_notify_failure_unless_pr
1465+
14191466
workflows:
14201467
version: 2
14211468

@@ -1536,6 +1583,15 @@ workflows:
15361583
- b_bytecode_osx
15371584
- b_bytecode_ems
15381585

1586+
# Final artifacts
1587+
- c_release_binaries:
1588+
<<: *workflow_trigger_on_releases
1589+
requires:
1590+
- b_ubu_static
1591+
- b_osx
1592+
- b_win_release
1593+
- b_ems
1594+
15391595
nightly:
15401596

15411597
triggers:

ReleaseChecklist.md

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,29 +26,16 @@
2626
- [ ] Click the `PUBLISH RELEASE` button on the release page, creating the tag.
2727
- [ ] Wait for the CI runs on the tag itself.
2828

29-
### Upload Release Artifacts
29+
### Upload Release Artifacts and Publish Binaries
3030
- [ ] Switch to the tag that archives have to be created for.
3131
- [ ] Create the ``prerelease.txt`` file: (``echo -n > prerelease.txt``).
3232
- [ ] 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``.
3333
- [ ] 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.
34-
- [ ] 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``.
35-
- [ ] 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``.
36-
- [ ] 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``.
37-
- [ ] 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``.
38-
39-
### Update [solc-bin](https://github.com/ethereum/solc-bin/)
40-
- [ ] Copy files to solc-bin:
41-
```bash
42-
VERSION=0.8.4
43-
COMMIT="c7e474f2"
44-
SOLC_BIN="/home/me/solc-bin"
45-
chmod +x solc-static-linux solc-macos
46-
cp soljson.js $SOLC_BIN/bin/soljson-v$VERSION+commit.$COMMIT.js
47-
cp solc-static-linux $SOLC_BIN/linux-amd64/solc-linux-amd64-v$VERSION+commit.$COMMIT
48-
cp solc-macos $SOLC_BIN/macosx-amd64/solc-macosx-amd64-v$VERSION+commit.$COMMIT
49-
cp solc-windows.exe $SOLC_BIN/windows-amd64/solc-windows-amd64-v$VERSION+commit.$COMMIT.exe
34+
- [ ] 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.
35+
Make sure it contains four binaries: ``solc-windows.exe``, ``solc-macos``, ``solc-static-linux`` and ``soljson.js``.
36+
- [ ] 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.
5037
- [ ] 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/``.
51-
- [ ] Create a pull request and merge.
38+
- [ ] Create a pull request in solc-bin and merge.
5239

5340
### Homebrew and MacOS
5441
- [ ] Update the version and the hash (``sha256sum solidity_$VERSION.tar.gz``) in https://github.com/Homebrew/homebrew-core/blob/master/Formula/solidity.rb

0 commit comments

Comments
 (0)