Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 67 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,25 @@ parameters:
default: "ghcr.io/argotorg/solidity-buildpack-deps@sha256:1f387a77be889f65a2a25986a5c5eccc88cec23fabe6aeaf351790751145c81e"
ubuntu-2404-docker-image:
type: string
# ghcr.io/argotorg/solidity-buildpack-deps:ubuntu2404-6
default: "ghcr.io/argotorg/solidity-buildpack-deps@sha256:c0412c53e59ce0c96bde4c08e7332ea12e4cadba9bbac829621947897fa21272"
# ghcr.io/argotorg/solidity-buildpack-deps:ubuntu2404-7
default: "ghcr.io/argotorg/solidity-buildpack-deps@sha256:bf3c7dac5f613d220757d9e32ee6855648b98bdb460a984ade214f8fe6920d63"
ubuntu-2404-arm-docker-image:
type: string
# ghcr.io/argotorg/solidity-buildpack-deps:ubuntu2404.arm-2
default: "ghcr.io/argotorg/solidity-buildpack-deps@sha256:27b03c1c4688e5d69b10e0539460346a3dee3b10b0e04fb406b9707c6f0dd95e"
# ghcr.io/argotorg/solidity-buildpack-deps:ubuntu2404.arm-3
default: "ghcr.io/argotorg/solidity-buildpack-deps@sha256:c4f7da98bc922e8ff2e58d5cfc0216b698ca1ee3ed84f1a0561bbf3641905b4a"
ubuntu-2404-clang-docker-image:
type: string
# ghcr.io/argotorg/solidity-buildpack-deps:ubuntu2404.clang-7
default: "ghcr.io/argotorg/solidity-buildpack-deps@sha256:7466ed23590cf14e60da884894723bcdab064742f017dcfcce015999b4f9143b"
# ghcr.io/argotorg/solidity-buildpack-deps:ubuntu2404.clang-8
default: "ghcr.io/argotorg/solidity-buildpack-deps@sha256:4c936d31b0eaebb770ea72e6fb8af002dfbdb920604858afa0c8cd055aa49664"
ubuntu-clang-ossfuzz-docker-image:
type: string
# ghcr.io/argotorg/solidity-buildpack-deps:ubuntu.clang.ossfuzz-12
default: "ghcr.io/argotorg/solidity-buildpack-deps@sha256:c7088af5082bf764244a6251ecf3dd29d280d2cd2cd071f011f7f32e0326f426"
# ghcr.io/argotorg/solidity-buildpack-deps:ubuntu.clang.ossfuzz-13
default: "ghcr.io/argotorg/solidity-buildpack-deps@sha256:ed197b3d083aa05526ec40d6d3d1f2bc3e8856bd23c1a7037becb4d3a15b3529"
emscripten-docker-image:
type: string
# NOTE: Please remember to update the `scripts/build_emscripten.sh` whenever the hash of this image changes.
# ghcr.io/argotorg/solidity-buildpack-deps:emscripten-21
default: "ghcr.io/argotorg/solidity-buildpack-deps@sha256:fc53d68a4680ffa7d5f70164e13a903478964f15bcc07434d74833a05f4fbc19"
# ghcr.io/argotorg/solidity-buildpack-deps:emscripten-22
default: "ghcr.io/argotorg/solidity-buildpack-deps@sha256:e7ca70baa048d4307124f22670f38db4205d57689661feb8e92ea50a31d8fdbe"
evm-version:
type: string
default: osaka
Expand Down Expand Up @@ -208,9 +208,62 @@ commands:

run_build:
steps:
- run:
name: Build
command: scripts/ci/build.sh
# TODO: remove the line below
# Before merging this PR we need to use an alternative develop branch to test the functionality, `develop-cache-test`

# On `develop-cache-test` and `breaking` we intentionally do NOT restore any ccache, so every run starts from scratch.
# Tags always skip ccache. Other branches restore the most recent cache produced on `develop-cache-test`.
- when:
condition:
and:
- equal: ["", << pipeline.git.tag >>]
- not:
or:
- equal: ["develop-cache-test", << pipeline.git.branch >>]
- equal: ["breaking", << pipeline.git.branch >>]
steps:
- restore_cache:
keys:
# Reuse cache produced on develop-cache-test (prefix match; restores the most recent).
- v1-{{ .Environment.CCACHE_KEY }}-ccache-{{ arch }}-develop-cache-test-
# WARNING! If you edit anything between here and save_cache, remember to bump version or invalidate the cache manually.
- when:
condition:
and:
- equal: ["", << pipeline.git.tag >>]
steps:
- run:
name: Build (ccache)
command: |
export CCACHE_DIR="$HOME/.ccache"
export CCACHE_BASEDIR="$(pwd)"
export CCACHE_NOHASHDIR=1
mkdir -p "$CCACHE_DIR"
export CMAKE_OPTIONS="${CMAKE_OPTIONS:-} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
ccache -z

scripts/ci/build.sh

ccache -s
- when:
condition:
or:
- not:
equal: ["", << pipeline.git.tag >>]
steps:
- run:
name: Build (no ccache)
command: scripts/ci/build.sh

# On `develop-cache-test` we always generate a fresh cache by never restoring and by saving under a unique key.
- when:
condition:
equal: ["develop-cache-test", << pipeline.git.branch >>]
steps:
- save_cache:
key: v1-{{ .Environment.CCACHE_KEY }}-ccache-{{ arch }}-develop-cache-test-{{ .Revision }}
paths:
- ~/.ccache

run_build_ossfuzz:
steps:
Expand Down Expand Up @@ -1197,7 +1250,7 @@ jobs:
- run:
name: Install build dependencies
command: |
pacman --noconfirm -Syu --noprogressbar --needed base-devel boost cmake git openssh tar
pacman --noconfirm -Syu --noprogressbar --needed base-devel boost cmake ccache git openssh tar
- checkout
- run_build
- store_artifacts_solc
Expand Down
1 change: 1 addition & 0 deletions .circleci/osx_install_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ then
brew update
brew upgrade
brew install cmake
brew install ccache
brew install wget
brew install coreutils
brew install diffutils
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/docker_upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ docker run \
--rm \
--volume "${PWD}:/project" \
-u "$(id -u "${USER}"):$(id -g "${USER}")" \
-e CCACHE_DIR=/tmp/ccache \
"${IMAGE_NAME}" \
bash -c "/project/scripts/ci/${IMAGE_NAME}_test_${IMAGE_VARIANT}.sh"

Expand Down
3 changes: 2 additions & 1 deletion scripts/docker/buildpack-deps/Dockerfile.emscripten
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,15 @@
# Using $(em-config CACHE)/sysroot/usr seems to work, though, and still has cmake find the
# dependencies automatically.
FROM emscripten/emsdk:3.1.19 AS base
LABEL version="21"
LABEL version="22"

ADD emscripten.jam /usr/src
RUN <<-EOF
set -ex
apt-get update
apt-get install -qqy --no-install-recommends \
lsof \
ccache \
lz4 \
python3 \
python3-pip \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# (c) 2016-2021 solidity contributors.
#------------------------------------------------------------------------------
FROM gcr.io/oss-fuzz-base/base-builder AS base
LABEL version="12"
LABEL version="13"

ARG DEBIAN_FRONTEND=noninteractive

Expand All @@ -31,6 +31,7 @@ RUN apt-get update; \
automake \
bison \
build-essential \
ccache \
curl \
git \
jq \
Expand Down
3 changes: 2 additions & 1 deletion scripts/docker/buildpack-deps/Dockerfile.ubuntu2404
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# (c) 2016-2024 solidity contributors.
#------------------------------------------------------------------------------
FROM buildpack-deps:noble AS base
LABEL version="6"
LABEL version="7"

ARG DEBIAN_FRONTEND=noninteractive

Expand All @@ -39,6 +39,7 @@ RUN set -ex; \
apt-get install -qqy --no-install-recommends \
build-essential \
cmake \
ccache \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a special workflow for updating buildpack images and this needs to be done in two steps (separate PRs). See buildpack-deps/README.md.

jq \
libboost-filesystem-dev \
libboost-program-options-dev \
Expand Down
3 changes: 2 additions & 1 deletion scripts/docker/buildpack-deps/Dockerfile.ubuntu2404.arm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# (c) 2016-2025 solidity contributors.
#------------------------------------------------------------------------------
FROM --platform=linux/arm64 buildpack-deps:noble AS base
LABEL version="2"
LABEL version="3"

ARG DEBIAN_FRONTEND=noninteractive

Expand All @@ -40,6 +40,7 @@ RUN <<-EOF
apt-get install --quiet=2 --no-install-recommends \
build-essential \
cmake \
ccache \
jq \
libboost-filesystem-dev \
libboost-program-options-dev \
Expand Down
3 changes: 2 additions & 1 deletion scripts/docker/buildpack-deps/Dockerfile.ubuntu2404.clang
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# (c) 2016-2024 solidity contributors.
#------------------------------------------------------------------------------
FROM buildpack-deps:noble AS base
LABEL version="7"
LABEL version="8"

ARG DEBIAN_FRONTEND=noninteractive

Expand All @@ -40,6 +40,7 @@ RUN set -ex; \
build-essential \
clang \
cmake \
ccache \
jq \
libboost-filesystem-dev \
libboost-program-options-dev \
Expand Down
Loading