Skip to content

Commit 1425c99

Browse files
Merge pull request #66 from yanghang8612/release_v0.8.21
Release v0.8.21
2 parents 5f1834b + 400f5aa commit 1425c99

File tree

1,760 files changed

+16769
-15872
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,760 files changed

+16769
-15872
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
#------------------------------------------------------------------------------
5+
# Compares bytecode reports generated by prepare_report.py/.js.
6+
#
7+
# ------------------------------------------------------------------------------
8+
# This file is part of solidity.
9+
#
10+
# solidity is free software: you can redistribute it and/or modify
11+
# it under the terms of the GNU General Public License as published by
12+
# the Free Software Foundation, either version 3 of the License, or
13+
# (at your option) any later version.
14+
#
15+
# solidity is distributed in the hope that it will be useful,
16+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18+
# GNU General Public License for more details.
19+
#
20+
# You should have received a copy of the GNU General Public License
21+
# along with solidity. If not, see <http://www.gnu.org/licenses/>
22+
#
23+
# (c) 2023 solidity contributors.
24+
#------------------------------------------------------------------------------
25+
26+
no_cli_platforms=(
27+
emscripten
28+
)
29+
native_platforms=(
30+
ubuntu2004-static
31+
ubuntu
32+
osx
33+
osx_intel
34+
windows
35+
)
36+
interfaces=(
37+
cli
38+
standard-json
39+
)
40+
41+
for preset in "$@"; do
42+
report_files=()
43+
for platform in "${no_cli_platforms[@]}"; do
44+
report_files+=("bytecode-report-${platform}-${preset}.txt")
45+
done
46+
for platform in "${native_platforms[@]}"; do
47+
for interface in "${interfaces[@]}"; do
48+
report_files+=("bytecode-report-${platform}-${interface}-${preset}.txt")
49+
done
50+
done
51+
52+
echo "Reports to compare:"
53+
printf -- "- %s\n" "${report_files[@]}"
54+
55+
if ! diff --brief --report-identical-files --from-file "${report_files[@]}"; then
56+
diff --unified=0 --report-identical-files --from-file "${report_files[@]}" | head --lines 50
57+
zip "bytecode-reports-${preset}.zip" "${report_files[@]}"
58+
exit 1
59+
fi
60+
done

0 commit comments

Comments
 (0)