Skip to content

Commit

Permalink
Merge pull request #1 from ethereum/develop
Browse files Browse the repository at this point in the history
Variable Packeting in Solidity
  • Loading branch information
chamitro authored Dec 12, 2024
2 parents 6df702a + 9ad6660 commit e0edba6
Show file tree
Hide file tree
Showing 10,011 changed files with 311,640 additions and 81,905 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
12 changes: 6 additions & 6 deletions .circleci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@

### Docker images

The docker images are build locally on the developer machine:
The docker images are built locally on the developer machine:

```sh
cd .circleci/docker/

docker build -t ethereum/solidity-buildpack-deps:ubuntu2004-<revision> -f Dockerfile.ubuntu2004 .
docker push ethereum/solidity-buildpack-deps:ubuntu2004-<revision>
docker build -t ethereum/solidity-buildpack-deps:ubuntu2404-<revision> -f Dockerfile.ubuntu2404 .
docker push ethereum/solidity-buildpack-deps:ubuntu2404-<revision>
```

The current revisions per docker image are stored in [circle ci pipeline parameters](https://github.com/CircleCI-Public/api-preview-docs/blob/master/docs/pipeline-parameters.md#pipeline-parameters) called `<image-desc>-docker-image-rev` (e.g., `ubuntu-2004-docker-image-rev`). Please update the value assigned to the parameter(s) corresponding to the docker image(s) being updated at the time of the update. Please verify that the value assigned to the parameter matches the revision part of the docker image tag (`<revision>` in the docker build/push snippet shown above). Otherwise, the docker image used by circle ci and the one actually pushed to docker hub will differ.
The current revisions per docker image are stored in [circle ci pipeline parameters](https://github.com/CircleCI-Public/api-preview-docs/blob/master/docs/pipeline-parameters.md#pipeline-parameters) called `<image-desc>-docker-image-rev` (e.g., `ubuntu-2404-docker-image-rev`). Please update the value assigned to the parameter(s) corresponding to the docker image(s) being updated at the time of the update. Please verify that the value assigned to the parameter matches the revision part of the docker image tag (`<revision>` in the docker build/push snippet shown above). Otherwise, the docker image used by circle ci and the one actually pushed to docker hub will differ.

Once the docker image has been built and pushed to Dockerhub, you can find it at:

https://hub.docker.com/r/ethereum/solidity-buildpack-deps:ubuntu2004-<revision>
https://hub.docker.com/r/ethereum/solidity-buildpack-deps:ubuntu2404-<revision>

where the image tag reflects the target OS and revision to build Solidity and run its tests on.

Expand All @@ -24,7 +24,7 @@ where the image tag reflects the target OS and revision to build Solidity and ru
```sh
cd solidity
# Mounts your local solidity directory in docker container for testing
docker run -v `pwd`:/src/solidity -ti ethereum/solidity-buildpack-deps:ubuntu2004-<revision> /bin/bash
docker run -v `pwd`:/src/solidity -ti ethereum/solidity-buildpack-deps:ubuntu2404-<revision> /bin/bash
cd /src/solidity
<commands_to_test_build_with_new_docker_image>
```
26 changes: 26 additions & 0 deletions .circleci/build_win.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
$ErrorActionPreference = "Stop"

cd "$PSScriptRoot\.."

if ("$Env:FORCE_RELEASE" -Or "$Env:CIRCLE_TAG") {
New-Item prerelease.txt -type file
Write-Host "Building release version."
}
else {
# Use last commit date rather than build date to avoid ending up with builds for
# different platforms having different version strings (and therefore producing different bytecode)
# if the CI is triggered just before midnight.
$last_commit_timestamp = git log -1 --date=unix --format=%cd HEAD
$last_commit_date = (Get-Date -Date "1970-01-01 00:00:00Z").toUniversalTime().addSeconds($last_commit_timestamp).ToString("yyyy.M.d")
-join("ci.", $last_commit_date) | out-file -encoding ascii prerelease.txt
}

mkdir build
cd build
$boost_dir=(Resolve-Path $PSScriptRoot\..\deps\boost\lib\cmake\Boost-*)
..\deps\cmake\bin\cmake -G "Visual Studio 16 2019" -DBoost_DIR="$boost_dir\" -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DCMAKE_INSTALL_PREFIX="$PSScriptRoot\..\upload" ..
if ( -not $? ) { throw "CMake configure failed." }
msbuild solidity.sln /p:Configuration=Release /m:10 /v:minimal
if ( -not $? ) { throw "Build failed." }
..\deps\cmake\bin\cmake --build . -j 10 --target install --config Release
if ( -not $? ) { throw "Install target failed." }
1 change: 1 addition & 0 deletions .circleci/cln-asan.supp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
leak:*libcln*
60 changes: 60 additions & 0 deletions .circleci/compare_bytecode_reports.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#!/usr/bin/env bash
set -euo pipefail

#------------------------------------------------------------------------------
# Compares bytecode reports generated by prepare_report.py/.js.
#
# ------------------------------------------------------------------------------
# This file is part of solidity.
#
# solidity is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# solidity is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with solidity. If not, see <http://www.gnu.org/licenses/>
#
# (c) 2023 solidity contributors.
#------------------------------------------------------------------------------

no_cli_platforms=(
emscripten
)
native_platforms=(
ubuntu2004-static
ubuntu
osx
osx_intel
windows
)
interfaces=(
cli
standard-json
)

for preset in "$@"; do
report_files=()
for platform in "${no_cli_platforms[@]}"; do
report_files+=("bytecode-report-${platform}-${preset}.txt")
done
for platform in "${native_platforms[@]}"; do
for interface in "${interfaces[@]}"; do
report_files+=("bytecode-report-${platform}-${interface}-${preset}.txt")
done
done

echo "Reports to compare:"
printf -- "- %s\n" "${report_files[@]}"

if ! diff --brief --report-identical-files --from-file "${report_files[@]}"; then
diff --unified=0 --report-identical-files --from-file "${report_files[@]}" | head --lines 50
zip "bytecode-reports-${preset}.zip" "${report_files[@]}"
exit 1
fi
done
Loading

0 comments on commit e0edba6

Please sign in to comment.