Binaries for 0.8.23 #145
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release bytecode | |
on: pull_request | |
jobs: | |
generate: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- platform: emscripten-wasm32 | |
os: ubuntu-latest | |
- platform: emscripten-asmjs | |
os: ubuntu-latest | |
- platform: linux-amd64 | |
os: ubuntu-latest | |
- platform: macosx-amd64 | |
os: macos-latest | |
# TODO: Run checks on Windows binaries too | |
env: | |
PLATFORM: ${{ matrix.platform }} | |
steps: | |
# TODO: remove when https://github.com/axic/keccakjs/issues/13 got fixed | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Remove unused software to free up space | |
# macOS runners apparently have > 70 GB free so it's only needed on Ubuntu | |
if: "env.PLATFORM != 'macosx-amd64'" | |
run: | | |
# These are quick to delete and large enough to make a difference | |
rm -rf /usr/share/swift/ # 1.3 GB in 80 subdirs | |
rm -rf /usr/local/lib/android/sdk/build-tools/ # 2.1 GB in 450 subdirs | |
rm -rf /usr/share/dotnet/shared/ # 5.3 GB in 350 subdirs | |
rm -rf /usr/local/lib/android/sdk/ndk/ # 7.6 GB in 1500 subdirs | |
- uses: actions/setup-python@v3 | |
with: | |
# Use the latest minor release of Python 3. prepare_report.py requires Python >= 3.7 | |
python-version: '3.x' | |
- uses: actions/checkout@v3 | |
with: | |
repository: 'ethereum/solidity' | |
path: 'solidity/' | |
# bytecode_reports_for_modified_binaries.sh requires access to a working copy with full history | |
fetch-depth: 0 | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ env.GITHUB_REF }} | |
path: 'solc-bin/' | |
# We need more than just a single revision to be able to use diff | |
fetch-depth: 0 | |
- name: Generate reports from matching release binaries | |
run: | | |
base_dir="$PWD" | |
mkdir reports/ | |
cd reports/ | |
"${base_dir}/solidity/scripts/solc-bin/bytecode_reports_for_modified_binaries.sh" \ | |
"$PLATFORM" \ | |
"origin/${{ github.base_ref }}" \ | |
"origin/${GITHUB_HEAD_REF}" \ | |
"$base_dir/solc-bin" \ | |
"$base_dir/solidity" | |
- name: Upload reports | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.platform }} | |
path: reports/* | |
compare: | |
runs-on: ubuntu-latest | |
needs: generate | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
repository: 'ethereum/solidity' | |
path: 'solidity/' | |
- name: Download all artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
path: reports/ | |
- name: Compare | |
run: | | |
# This can happen if the PR does not touch any release binaries. | |
[[ -d reports/ ]] || { echo "No reports found."; exit 0; } | |
cd reports/ | |
../solidity/scripts/solc-bin/compare_bytecode_reports.sh |