-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Bytecode comparison on CircleCI #10039
Changes from all commits
9726ed8
30d990f
8075d6c
9d873b1
a7b8ad3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,13 +27,6 @@ | |
|
||
set -e | ||
|
||
if [[ "${TRAVIS_PULL_REQUEST_BRANCH}" != "" ]]; then | ||
# Variable is set to the branch's name iff current job is a pull request, | ||
# or is set to empty string if it is a push build. | ||
echo "Skipping bytecode comparison." | ||
exit 0 | ||
fi | ||
|
||
REPO_ROOT="$(dirname "$0")"/../.. | ||
|
||
if test -z "$1"; then | ||
|
@@ -120,34 +113,7 @@ EOF | |
$REPO_ROOT/scripts/bytecodecompare/prepare_report.py $REPO_ROOT/$BUILD_DIR/solc/solc | ||
fi | ||
|
||
if [ "$TRAVIS_SECURE_ENV_VARS" = "true" ] | ||
then | ||
openssl aes-256-cbc -K $encrypted_60701c962b9c_key -iv $encrypted_60701c962b9c_iv -in "$REPO_ROOT"/scripts/bytecodecompare/deploy_key.enc -out deploy_key -d | ||
chmod 600 deploy_key | ||
eval `ssh-agent -s` | ||
ssh-add deploy_key | ||
|
||
git clone --depth 2 [email protected]:ethereum/solidity-test-bytecode.git | ||
cd solidity-test-bytecode | ||
git config user.name "travis" | ||
git config user.email "[email protected]" | ||
git clean -f -d -x | ||
|
||
DIRNAME=$(cd "$REPO_ROOT" && git show -s --format="%cd-%H" --date="format:%Y-%m-%d-%H-%M") | ||
mkdir -p "$DIRNAME" | ||
REPORT="$DIRNAME/$ZIP_SUFFIX.txt" | ||
cp ../report.txt "$REPORT" | ||
# Only push if adding actually worked, i.e. there were changes. | ||
if git add "$REPORT" && git commit -a -m "Added report $REPORT" | ||
then | ||
git pull --rebase | ||
git push origin | ||
else | ||
echo "Adding report failed, it might already exist in the repository." | ||
fi | ||
else | ||
echo "Not storing bytecode because the keys are not available." | ||
fi | ||
cp report.txt $REPO_ROOT | ||
) | ||
rm -rf "$TMPDIR" | ||
echo "Storebytecode finished." | ||
echo "Storebytecode finished." |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ ROOTDIR="$(dirname "$0")/../.." | |
cd "${ROOTDIR}" | ||
|
||
# shellcheck disable=SC2166 | ||
if [ "$CIRCLE_BRANCH" = release -o -n "$CIRCLE_TAG" -o -n "$FORCE_RELEASE" ]; then echo -n >prerelease.txt; else date -u +"nightly.%Y.%-m.%-d" >prerelease.txt; fi | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where do we make sure that this is called "nightly" for the actual emscripten build? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Those are built in solc-bin from this github action https://github.com/ethereum/solc-bin/blob/gh-pages/.github/workflows/nightly-emscripten.yml There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hm... which just calls back There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we actually don't :-) - I'll have a look and make sure - in any case, they won't involve this script, so they're unaffected by the change here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, we don't - they are called |
||
if [ "$CIRCLE_BRANCH" = release -o -n "$CIRCLE_TAG" -o -n "$FORCE_RELEASE" ]; then echo -n >prerelease.txt; fi | ||
if [ -n "$CIRCLE_SHA1" ] | ||
then | ||
echo -n "$CIRCLE_SHA1" >commit_hash.txt | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the main workaround. osx moves these files in a subdirectory
build
, while the rest has one directory level less.