Skip to content

Commit 5e722e7

Browse files
authored
Merge pull request #16271 from argotorg/add_arm_binaries
ci: build linux arm static binaries
2 parents 8cb16a1 + be37565 commit 5e722e7

File tree

4 files changed

+91
-11
lines changed

4 files changed

+91
-11
lines changed

.circleci/compare_bytecode_reports.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ no_cli_platforms=(
2828
)
2929
native_platforms=(
3030
ubuntu2004-static
31+
ubuntu_arm
3132
ubuntu
3233
osx
3334
osx_intel

.circleci/config.yml

Lines changed: 87 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ parameters:
1515
type: string
1616
# ghcr.io/argotorg/solidity-buildpack-deps:ubuntu2404-6
1717
default: "ghcr.io/argotorg/solidity-buildpack-deps@sha256:c0412c53e59ce0c96bde4c08e7332ea12e4cadba9bbac829621947897fa21272"
18+
ubuntu-2404-arm-docker-image:
19+
type: string
20+
# ghcr.io/argotorg/solidity-buildpack-deps:ubuntu2404.arm-1
21+
default: "ghcr.io/argotorg/solidity-buildpack-deps@sha256:6cdb928fa8743d0b5d515c2c489b8d545c541f2370af28d5d3a71532056a0f22"
1822
ubuntu-2404-clang-docker-image:
1923
type: string
2024
# ghcr.io/argotorg/solidity-buildpack-deps:ubuntu2404.clang-7
@@ -280,6 +284,16 @@ commands:
280284
- test/soltest
281285
- test/tools/solfuzzer
282286

287+
persist_executables_to_workspace_arm:
288+
description: Persist compiled target executables to workspace on Linux arm64
289+
steps:
290+
- persist_to_workspace:
291+
root: build
292+
paths:
293+
- solc/solc-static-linux-arm
294+
- test/soltest-linux-arm
295+
- test/tools/solfuzzer-linux-arm
296+
283297
persist_executables_to_workspace_osx:
284298
description: Persist compiled target executables to workspace on macOS
285299
steps:
@@ -606,6 +620,24 @@ defaults:
606620
MAKEFLAGS: -j 5
607621
CPUs: 5
608622

623+
- base_ubuntu2404_arm_medium: &base_ubuntu2404_arm_medium
624+
docker:
625+
- image: << pipeline.parameters.ubuntu-2404-arm-docker-image >>
626+
resource_class: arm.medium
627+
environment: &base_ubuntu2404_arm_medium_env
628+
TERM: xterm
629+
MAKEFLAGS: -j 2
630+
CPUs: 2
631+
632+
- base_ubuntu2404_arm_large: &base_ubuntu2404_arm_large
633+
docker:
634+
- image: << pipeline.parameters.ubuntu-2404-arm-docker-image >>
635+
resource_class: arm.large
636+
environment: &base_ubuntu2404_arm_large_env
637+
TERM: xterm
638+
MAKEFLAGS: -j 7
639+
CPUs: 7
640+
609641
- base_ubuntu2404_xlarge: &base_ubuntu2404_xlarge
610642
<<: *base_ubuntu2404
611643
resource_class: xlarge
@@ -1072,6 +1104,26 @@ jobs:
10721104
- solc/solc-static-linux
10731105
- matrix_notify_failure_unless_pr
10741106

1107+
b_ubu_static_arm:
1108+
<<: *base_ubuntu2404_arm_large
1109+
environment:
1110+
<<: *base_ubuntu2404_arm_large_env
1111+
CMAKE_OPTIONS: -DCMAKE_BUILD_TYPE=Release -DSOLC_LINK_STATIC=ON
1112+
steps:
1113+
- checkout
1114+
- run_build
1115+
- run:
1116+
name: strip binary
1117+
command: strip build/solc/solc
1118+
- store_artifacts:
1119+
path: build/solc/solc
1120+
destination: solc-static-linux-arm
1121+
- run: mv build/solc/solc build/solc/solc-static-linux-arm
1122+
- run: mv build/test/soltest build/test/soltest-linux-arm
1123+
- run: mv build/test/tools/solfuzzer build/test/tools/solfuzzer-linux-arm
1124+
- persist_executables_to_workspace_arm
1125+
- matrix_notify_failure_unless_pr
1126+
10751127
b_ubu_min_req:
10761128
<<: *base_ubuntu2404_large
10771129
steps:
@@ -1770,6 +1822,22 @@ jobs:
17701822
binary_path: "build/solc/Release/solc.exe"
17711823
preset: "<< parameters.preset >>"
17721824

1825+
b_bytecode_ubu_arm:
1826+
parameters:
1827+
preset:
1828+
type: string
1829+
<<: *base_ubuntu2404_arm_medium
1830+
parallelism: 2 # For prepare_bytecode_report
1831+
steps:
1832+
- checkout
1833+
- attach_workspace:
1834+
at: build
1835+
- prepare_bytecode_report:
1836+
label: "ubuntu_arm"
1837+
binary_type: native
1838+
binary_path: "build/solc/solc-static-linux-arm"
1839+
preset: "<< parameters.preset >>"
1840+
17731841
b_bytecode_ems:
17741842
parameters:
17751843
preset:
@@ -1811,10 +1879,11 @@ jobs:
18111879
name: Gather and rename binaries from dependent jobs
18121880
command: |
18131881
mkdir github/
1814-
cp workspace/solc/solc-static-linux github/solc-static-linux
1815-
cp workspace/build/solc/solc github/solc-macos
1816-
cp workspace/solc/Release/solc.exe github/solc-windows.exe
1817-
cp workspace/soljson.js github/soljson.js
1882+
cp workspace/solc/solc-static-linux github/solc-static-linux
1883+
cp workspace/solc/solc-static-linux-arm github/solc-static-linux-arm
1884+
cp workspace/build/solc/solc github/solc-macos
1885+
cp workspace/solc/Release/solc.exe github/solc-windows.exe
1886+
cp workspace/soljson.js github/soljson.js
18181887
18191888
cd github/
18201889
tar --create --file ../github-binaries.tar *
@@ -1828,12 +1897,13 @@ jobs:
18281897
sed -En 's/^Version: ([0-9.]+.*\+commit\.[0-9a-f]+(\.mod)?).*$/\1/p'
18291898
)
18301899
1831-
mkdir -p solc-bin/{linux-amd64,macosx-amd64,windows-amd64,bin}
1900+
mkdir -p solc-bin/{linux-amd64,linux-arm64,macosx-amd64,windows-amd64,bin}
18321901
1833-
mv github/solc-static-linux "solc-bin/linux-amd64/solc-linux-amd64-v${full_version}"
1834-
mv github/solc-macos "solc-bin/macosx-amd64/solc-macosx-amd64-v${full_version}"
1835-
mv github/solc-windows.exe "solc-bin/windows-amd64/solc-windows-amd64-v${full_version}.exe"
1836-
mv github/soljson.js "solc-bin/bin/soljson-v${full_version}.js"
1902+
mv github/solc-static-linux-arm "solc-bin/linux-arm64/solc-linux-arm64-v${full_version}"
1903+
mv github/solc-static-linux "solc-bin/linux-amd64/solc-linux-amd64-v${full_version}"
1904+
mv github/solc-macos "solc-bin/macosx-amd64/solc-macosx-amd64-v${full_version}"
1905+
mv github/solc-windows.exe "solc-bin/windows-amd64/solc-windows-amd64-v${full_version}.exe"
1906+
mv github/soljson.js "solc-bin/bin/soljson-v${full_version}.js"
18371907
18381908
cd solc-bin/
18391909
tar --create --file ../solc-bin-binaries.tar *
@@ -1910,6 +1980,7 @@ workflows:
19101980

19111981
# Static build
19121982
- b_ubu_static: *requires_nothing
1983+
- b_ubu_static_arm: *requires_nothing
19131984

19141985
# Ubuntu build and tests
19151986
- b_ubu: *requires_nothing
@@ -1990,6 +2061,11 @@ workflows:
19902061
matrix: *bytecode_compare_preset_matrix
19912062
requires:
19922063
- b_ubu
2064+
- b_bytecode_ubu_arm:
2065+
<<: *on_all_tags_and_branches
2066+
matrix: *bytecode_compare_preset_matrix
2067+
requires:
2068+
- b_ubu_static_arm
19932069
- b_bytecode_win:
19942070
<<: *on_all_tags_and_branches
19952071
matrix: *bytecode_compare_preset_matrix
@@ -2015,6 +2091,7 @@ workflows:
20152091
requires:
20162092
- b_bytecode_ubu_static
20172093
- b_bytecode_ubu
2094+
- b_bytecode_ubu_arm
20182095
- b_bytecode_win
20192096
- b_bytecode_osx
20202097
- b_bytecode_osx_intel
@@ -2024,6 +2101,7 @@ workflows:
20242101
- c_release_binaries:
20252102
<<: *on_version_tags
20262103
requires:
2104+
- b_ubu_static_arm
20272105
- b_ubu_static
20282106
- b_osx
20292107
- b_win

Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Bugfixes:
1111
* Yul Optimizer: Fix edge case in which invalid Yul code is produced by ExpressionSimplifier due to expressions being substituted that contain out-of-scope variables.
1212

1313
Build System:
14+
* Enable Linux arm64 binaries for testing and releases.
1415
* Update minimum version requirements of Boost to 1.83.0 for non-windows builds and of GCC and Clang to 13.3 and 18.1.3, respectively. Fixes infinite recursion on `boost::rational` comparison affecting compiler binaries built with GCC<14.0 and Boost<1.75.
1516

1617
### 0.8.30 (2025-05-07)

ReleaseChecklist.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ At least a day before the release:
6969
### Upload Release Artifacts and Publish Binaries
7070
- [ ] Take the source tarball (`solidity_x.x.x.tar.gz`) from `c_source_tarball` run of the tagged commit on Circle CI and upload it to the release page.
7171
- [ ] Take the `github-binaries.tar` tarball from `c_release_binaries` run of the tagged commit on Circle CI and add all binaries from it to the release page.
72-
Make sure it contains four binaries: `solc-windows.exe`, `solc-macos`, `solc-static-linux` and `soljson.js`.
72+
Make sure it contains five binaries: `solc-windows.exe`, `solc-macos`, `solc-static-linux`, `solc-static-linux-arm`, and `soljson.js`.
7373
- [ ] Take the `solc-bin-binaries.tar` tarball from `c_release_binaries` run of the tagged commit on Circle CI and add all binaries from it to solc-bin.
7474
- [ ] Run `npm install` if you've got a clean checkout of the solc-bin repo.
7575
- [ ] Run `npm run update -- --reuse-hashes` in `solc-bin` and verify that the script has updated `list.js`, `list.txt` and `list.json` files correctly and that symlinks to the new release have been added in `solc-bin/wasm/` and `solc-bin/emscripten-wasm32/`.
@@ -134,7 +134,7 @@ At least a day before the release:
134134
- [ ] Wait for the CI runs on the tag itself.
135135
- [ ] Take the source tarball (`solidity_x.x.x-pre.N.tar.gz`) from `c_source_tarball` run of the tagged commit on Circle CI and upload it to the release page.
136136
- [ ] Take the `github-binaries.tar` tarball from `c_release_binaries` run of the tagged commit on Circle CI and add all binaries from it to the release page.
137-
Make sure it contains four binaries: `solc-windows.exe`, `solc-macos`, `solc-static-linux` and `soljson.js`.
137+
Make sure it contains five binaries: `solc-windows.exe`, `solc-macos`, `solc-static-linux`, `solc-static-linux-arm` and `soljson.js`.
138138
- [ ] Take the `solc-bin-binaries.tar` tarball from `c_release_binaries` run of the tagged commit on Circle CI and add all binaries from it to solc-bin.
139139
- [ ] Run `npm install` if you've got a clean checkout of the solc-bin repo.
140140
- [ ] Run `npm run update -- --reuse-hashes` in `solc-bin` and verify that the script has updated `list.js`, `list.txt` and `list.json` files correctly and that symlinks to the new release have been added in `solc-bin/wasm/` and `solc-bin/emscripten-wasm32/`.

0 commit comments

Comments
 (0)