Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Automate preparation of release binaries for publishing (via workspace) #12929

Merged
merged 2 commits into from
May 19, 2022

Conversation

cameel
Copy link
Member

@cameel cameel commented Apr 12, 2022

Replaces #12181.
Closes #9933.

This is a simplified version of #12181 (as discussed in #12181 (review)). Turns out it's possible to do it via workspace after all.

It's not complete automation of the publishing process as stated in #9933 but it at least takes care of the most tedious and error prone part of the process so I think it's good enough.

The PR adds a CI job that gathers release binaries from other jobs and attaches them as artifacts, under two naming conventions - for github release page and for solc-bin.

@cameel cameel self-assigned this Apr 12, 2022
@cameel cameel force-pushed the circleci-release-binaries-via-workspace branch from cb61e6b to 35c69d0 Compare April 12, 2022 12:50
Comment on lines 1439 to 1469
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/macosx-amd64 "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"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is something I could also put in a script (see rename-circleci-binaries-for-solc-bin.sh in #12181), which would allow running it locally instead of renaming manually (this workflow will become obsolete after this PR though). It also fits better with the idea of not keeping bigger pieces bash code outside of CI config.

The way it's done here is much simpler though.

@cameel cameel force-pushed the circleci-release-binaries-via-workspace branch 2 times, most recently from eaec31a to 1535fc6 Compare April 12, 2022 13:51
@cameel
Copy link
Member Author

cameel commented Apr 12, 2022

Looks like it works. Removing the debug commit.

For reference, here's a successful run: 1040499

@cameel cameel force-pushed the circleci-release-binaries-via-workspace branch from 1535fc6 to d7cb939 Compare April 12, 2022 14:34
@cameel cameel marked this pull request as ready for review April 12, 2022 14:34
@cameel cameel requested a review from Marenz May 9, 2022 12:26
@cameel cameel dismissed a stale review via 15be7f3 May 12, 2022 12:47
@cameel cameel force-pushed the circleci-release-binaries-via-workspace branch from d7cb939 to 15be7f3 Compare May 12, 2022 12:47
Marenz
Marenz previously approved these changes May 12, 2022
@cameel
Copy link
Member Author

cameel commented May 12, 2022

I switched to creating a tarball so that the executable flag is preserved. Here are the artifacts from a successful run: 1058937/artifacts. Now I'm removing the debug commit that enables this job outside of releases.

@cameel cameel force-pushed the circleci-release-binaries-via-workspace branch from dda98dc to dbcffb7 Compare May 12, 2022 19:42
@cameel cameel merged commit 0cb9590 into develop May 19, 2022
@cameel cameel deleted the circleci-release-binaries-via-workspace branch May 19, 2022 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automate publishing of release binaries
3 participants