Skip to content

build: bump sha3 from 0.10.8 to 0.11.0 (#325) #2005

build: bump sha3 from 0.10.8 to 0.11.0 (#325)

build: bump sha3 from 0.10.8 to 0.11.0 (#325) #2005

Workflow file for this run

name: Tests
# Execute workflow for each PR and with each merge to the trunk
on:
pull_request:
types: [opened, synchronize, reopened]
merge_group:
push:
branches:
- main
permissions:
contents: read
packages: read
# Cancel the workflow if any new changes pushed to a feature branch or the trunk
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
# Detect whether code (non-doc) files changed
changes:
runs-on: ubuntu-24.04
permissions:
contents: read
pull-requests: read
outputs:
code: ${{ steps.filter.outputs.code }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
id: filter
with:
predicate-quantifier: 'every'
filters: |
code:
- '**'
- '!docs/**'
- '!**/*.md'
- '!**/*.mdx'
- '!**/LICENSE*'
# Check for cargo issues
cargo-checks:
needs: changes
if: needs.changes.outputs.code == 'true'
runs-on: ubuntu-24.04
container:
image: ghcr.io/nomicfoundation/solx-ci-runner@sha256:c2b03000a1074d2cc3e6cf25a1c4fdc6eb0a61d23e63bef59205050249fa1d6e
steps:
- name: Checkout source
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: true
# This step is required to checkout submodules
# that are disabled in .gitmodules config
- name: Checkout submodules
run: |
git config --global --add safe.directory '*'
git submodule update --force --depth=1 --recursive --checkout
- name: Setup SFW
uses: ./.github/actions/setup-sfw
- name: Build LLVM
uses: ./.github/actions/build-llvm
with:
build-type: RelWithDebInfo
enable-assertions: 'true'
enable-mlir: 'true'
- name: Cargo checks
uses: ./.github/actions/cargo-check
cooldown-check:
name: Cargo cooldown check
runs-on: ubuntu-24.04
needs: changes
if: needs.changes.outputs.code == 'true'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: ./.github/actions/cooldown-check
# Build and run regression tests
build-and-test:
needs: changes
if: needs.changes.outputs.code == 'true'
env:
CARGO_INCREMENTAL: "0"
permissions:
contents: read
checks: write
packages: read
strategy:
fail-fast: false # finalize testing of all targets even if one failed
matrix:
include:
- name: "MacOS x86"
runner: macos-15-intel
- name: "MacOS arm64"
runner: macos-15
- name: "Linux x86 gnu"
runner: ubuntu-24.04
image: ghcr.io/nomicfoundation/solx-ci-runner@sha256:c2b03000a1074d2cc3e6cf25a1c4fdc6eb0a61d23e63bef59205050249fa1d6e
target: "x86_64-unknown-linux-gnu"
- name: "Linux ARM64 gnu"
runner: ubuntu-24.04-arm
image: ghcr.io/nomicfoundation/solx-ci-runner@sha256:c2b03000a1074d2cc3e6cf25a1c4fdc6eb0a61d23e63bef59205050249fa1d6e
target: "aarch64-unknown-linux-gnu"
- name: "Windows"
runner: windows-2025
target: "x86_64-pc-windows-gnu"
runs-on: ${{ matrix.runner }}
container:
image: ${{ matrix.image || '' }} # Special workaround to allow matrix builds with optional container
name: ${{ matrix.name }}
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: true
persist-credentials: false
# This step is required to checkout submodules
# that are disabled in .gitmodules config
- name: Checkout submodules
run: |
git config --global --add safe.directory '*'
git submodule update --force --depth=1 --recursive --checkout
- name: Setup SFW
uses: ./.github/actions/setup-sfw
- name: Prepare Windows env
if: runner.os == 'Windows'
uses: ./.github/actions/prepare-msys
- name: Free disk space (macOS)
if: runner.os == 'macOS'
shell: bash
run: |
set -euo pipefail
echo "=== Before macOS cleanup ===" && df -h .
# 1. Simulator runtimes — stored on read-only APFS snapshot volumes,
# so plain `rm` fails. `simctl runtime delete all` unmounts them.
# May warn on already-deleted runtimes; that is harmless.
echo "--- Removing simulator runtimes ---"
xcrun simctl delete all 2>&1 || true
xcrun simctl runtime delete all 2>&1 || true
# 2. Xcode — remove every versioned copy EXCEPT the one that
# xcode-select points to (we need its toolchain for C/C++ builds).
# Active Xcode path looks like /Applications/Xcode_16.2.app/Contents/Developer.
echo "--- Removing inactive Xcode versions ---"
ACTIVE_XCODE="$(xcode-select -p 2>/dev/null | sed 's|/Contents/Developer/*$||' || true)"
ACTIVE_XCODE="${ACTIVE_XCODE%/}"
removed=0
if [ -z "${ACTIVE_XCODE}" ] || [[ "${ACTIVE_XCODE}" != /Applications/Xcode*.app ]]; then
echo " warning: active Xcode path '${ACTIVE_XCODE}' is not an Xcode app; skipping Xcode removal"
else
echo "Active Xcode (keeping): ${ACTIVE_XCODE}"
for app in /Applications/Xcode_*.app; do
[ -d "$app" ] || continue
if [ "$app" = "$ACTIVE_XCODE" ]; then
echo " skip (active): $app"
else
echo " removing: $app"
if sudo rm -rf "$app"; then
removed=$((removed + 1))
else
echo " warning: failed to remove $app"
fi
fi
done
fi
echo "Removed ${removed} inactive Xcode version(s)"
# 3. Remaining large packages that this project never uses.
# Each path is removed individually so a missing path doesn't
# mask a real permission error on another.
echo "--- Removing unused SDKs and caches ---"
for dir in \
/Library/Developer/CoreSimulator \
/usr/local/lib/android \
"${RUNNER_TOOL_CACHE:-/Users/runner/hostedtoolcache}"; do
if [ -d "$dir" ]; then
echo " removing: $dir"
sudo rm -rf "$dir" || echo " warning: failed to remove $dir"
else
echo " not found (skipped): $dir"
fi
done
echo "=== After macOS cleanup ===" && df -h .
- name: Cache cargo artifacts
if: ${{ !matrix.image }}
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
with:
prefix-key: build-and-test-v2
cache-on-failure: true
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Build LLVM
uses: ./.github/actions/build-llvm
with:
build-type: RelWithDebInfo
enable-assertions: 'true'
enable-mlir: 'true'
- name: Building solc
uses: ./.github/actions/build-solc
with:
cmake-build-type: RelWithDebInfo
working-dir: 'solx-solidity'
- name: Free disk space (remove LLVM source and build artifacts)
shell: bash
run: |
echo "Before cleanup:" && df -h .
rm -rf solx-llvm target-llvm/build-final
# Remove solx-solidity source, keeping build/ and boost/ for tests
find solx-solidity -mindepth 1 -maxdepth 1 ! -name build ! -name boost -exec rm -rf {} +
rm -rf .git/modules
echo "After cleanup:" && df -h .
- name: Run tests
uses: ./.github/actions/rust-unit-tests
env:
BOOST_PREFIX: ${{ github.workspace }}/solx-solidity/boost/lib
SOLC_PREFIX: ${{ github.workspace }}/solx-solidity/build
with:
target: ${{ matrix.target || '' }}
# Special job that allows some of the jobs to be skipped or failed
# requiring others to be successful
pr-checks:
name: PR Checks (Tests)
runs-on: ubuntu-24.04
if: always()
needs:
- changes
- cargo-checks
- build-and-test
- cooldown-check
steps:
- name: Decide on PR checks
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # release/v1
with:
jobs: ${{ toJSON(needs) }}
allowed-skips: >-
${{ needs.changes.outputs.code != 'true' && 'cargo-checks, build-and-test, cooldown-check' || '' }}