Skip to content

Commit 43ecb69

Browse files
committed
ci: build linux arm static binaries
1 parent 8cb16a1 commit 43ecb69

File tree

2 files changed

+71
-0
lines changed

2 files changed

+71
-0
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: 70 additions & 0 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
@@ -606,6 +610,24 @@ defaults:
606610
MAKEFLAGS: -j 5
607611
CPUs: 5
608612

613+
- base_ubuntu2404_arm_medium: &base_ubuntu2404_arm_medium
614+
docker:
615+
- image: << pipeline.parameters.ubuntu-2404-arm-docker-image >>
616+
resource_class: arm.medium
617+
environment: &base_ubuntu2404_arm_medium_env
618+
TERM: xterm
619+
MAKEFLAGS: -j 2
620+
CPUs: 2
621+
622+
- base_ubuntu2404_arm_large: &base_ubuntu2404_arm_large
623+
docker:
624+
- image: << pipeline.parameters.ubuntu-2404-arm-docker-image >>
625+
resource_class: arm.large
626+
environment: &base_ubuntu2404_arm_large_env
627+
TERM: xterm
628+
MAKEFLAGS: -j 7
629+
CPUs: 7
630+
609631
- base_ubuntu2404_xlarge: &base_ubuntu2404_xlarge
610632
<<: *base_ubuntu2404
611633
resource_class: xlarge
@@ -1072,6 +1094,31 @@ jobs:
10721094
- solc/solc-static-linux
10731095
- matrix_notify_failure_unless_pr
10741096

1097+
b_ubu_static_arm:
1098+
<<: *base_ubuntu2404_arm_large
1099+
environment:
1100+
<<: *base_ubuntu2404_arm_large_env
1101+
CMAKE_OPTIONS: -DCMAKE_BUILD_TYPE=Release -DSOLC_LINK_STATIC=ON
1102+
steps:
1103+
- checkout
1104+
- run_build
1105+
- run:
1106+
name: strip binary
1107+
command: strip build/solc/solc
1108+
- store_artifacts:
1109+
path: build/solc/solc
1110+
destination: solc-static-linux-arm
1111+
- run: mv build/solc/solc build/solc/solc-static-linux-arm
1112+
- run: mv build/solc/soltest build/solc/soltest-linux-arm
1113+
- run: mv build/solc/solfuzzer build/solc/solfuzzer-linux-arm
1114+
- persist_to_workspace:
1115+
root: build
1116+
paths:
1117+
- solc/solc-static-linux-arm
1118+
- test/soltest-linux-arm
1119+
- test/tools/solfuzzer-linux-arm
1120+
- matrix_notify_failure_unless_pr
1121+
10751122
b_ubu_min_req:
10761123
<<: *base_ubuntu2404_large
10771124
steps:
@@ -1770,6 +1817,22 @@ jobs:
17701817
binary_path: "build/solc/Release/solc.exe"
17711818
preset: "<< parameters.preset >>"
17721819

1820+
b_bytecode_ubu_arm:
1821+
parameters:
1822+
preset:
1823+
type: string
1824+
<<: *base_ubuntu2404_arm_medium
1825+
parallelism: 2 # For prepare_bytecode_report
1826+
steps:
1827+
- checkout
1828+
- attach_workspace:
1829+
at: build
1830+
- prepare_bytecode_report:
1831+
label: "ubuntu_arm"
1832+
binary_type: native
1833+
binary_path: "build/solc/solc-static-linux-arm"
1834+
preset: "<< parameters.preset >>"
1835+
17731836
b_bytecode_ems:
17741837
parameters:
17751838
preset:
@@ -1910,6 +1973,7 @@ workflows:
19101973

19111974
# Static build
19121975
- b_ubu_static: *requires_nothing
1976+
- b_ubu_static_arm: *requires_nothing
19131977

19141978
# Ubuntu build and tests
19151979
- b_ubu: *requires_nothing
@@ -1990,6 +2054,11 @@ workflows:
19902054
matrix: *bytecode_compare_preset_matrix
19912055
requires:
19922056
- b_ubu
2057+
- b_bytecode_ubu_arm:
2058+
<<: *on_all_tags_and_branches
2059+
matrix: *bytecode_compare_preset_matrix
2060+
requires:
2061+
- b_ubu_static_arm
19932062
- b_bytecode_win:
19942063
<<: *on_all_tags_and_branches
19952064
matrix: *bytecode_compare_preset_matrix
@@ -2015,6 +2084,7 @@ workflows:
20152084
requires:
20162085
- b_bytecode_ubu_static
20172086
- b_bytecode_ubu
2087+
- b_bytecode_ubu_arm
20182088
- b_bytecode_win
20192089
- b_bytecode_osx
20202090
- b_bytecode_osx_intel

0 commit comments

Comments
 (0)