Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
69f24d7
Add macOS arm64 developer support
huangminghuang May 26, 2026
26a667b
Add macOS arm64 parallel test workflow
huangminghuang May 26, 2026
917eb3a
Add macOS native debug support
huangminghuang May 26, 2026
8e0d121
Use release vcpkg triplet for macOS CI
huangminghuang May 26, 2026
a4e1277
Address macOS arm64 review feedback
huangminghuang May 27, 2026
ee2aadc
Rename macOS arm64 workflow
huangminghuang May 28, 2026
b8a4460
Fix macOS arm64 LLVM support linkage
huangminghuang May 28, 2026
f284661
Stabilize macOS arm64 CI tests
huangminghuang May 28, 2026
6bbd4c9
Skip unstable checktime suite on macOS CI
huangminghuang May 28, 2026
fbba343
Address macOS portability review feedback
huangminghuang May 29, 2026
50c7c72
Run macOS checktime test serially
huangminghuang May 29, 2026
c685199
Stabilize macOS checktime interrupt test
huangminghuang May 29, 2026
3d89ad3
Warm checktime interrupt tester before timing
huangminghuang May 29, 2026
b0f04fe
Rename Linux amd64 build workflow
huangminghuang May 29, 2026
57b0011
Update macOS arm64 CI coverage
huangminghuang Jun 3, 2026
027e653
Address macOS arm64 support review notes
huangminghuang Jun 4, 2026
bda1076
Flush snapshot temp file before sys-util validation
huangminghuang Jun 5, 2026
c4a627e
Add macOS 15 to arm64 CI matrix
huangminghuang Jun 9, 2026
e9d22c5
Run full macOS NP LR test sweep
huangminghuang Jun 14, 2026
a87f86a
Fix macOS CI NP LR dependencies
huangminghuang Jun 14, 2026
1b74074
Use venv for macOS CI Python deps
huangminghuang Jun 15, 2026
fc4ef37
Reduce macOS NP LR test contention
huangminghuang Jun 15, 2026
2909019
Run macOS arm64 CI on macos-26 only
huangminghuang Jun 15, 2026
2a3347c
Collect macOS CI failure artifacts
huangminghuang Jun 15, 2026
3f14b58
Stabilize macOS Python integration tests
huangminghuang Jun 15, 2026
6b8fc86
Clean up successful Python test logs
huangminghuang Jun 16, 2026
3c44e71
Merge branch 'codex/port-sharded-np-lr-tests' into feature/macos-arm6…
huangminghuang Jun 16, 2026
c0c0488
Merge remote-tracking branch 'origin/codex/port-sharded-np-lr-tests' …
huangminghuang Jun 17, 2026
231f762
Share CI build script with macOS
huangminghuang Jun 17, 2026
b40a4ed
Use portable softfloat128 type in BE key codec
huangminghuang Jun 17, 2026
708c235
Update Wire vcpkg registry pin
huangminghuang Jun 17, 2026
4df5770
Use Boost 1.89.0 port version 3
huangminghuang Jun 18, 2026
e5aeaa6
Increase read-only transaction read window
huangminghuang Jun 18, 2026
89afe56
Stop dumping archived CI logs inline
huangminghuang Jun 18, 2026
af92f49
Update CI ccache save restore flow
huangminghuang Jun 18, 2026
ea1c99b
Serialize read-only CTest jobs
huangminghuang Jun 18, 2026
d9b4d9f
Merge remote-tracking branch 'origin/master' into feature/macos-arm64…
huangminghuang Jun 18, 2026
fd5a814
Lock basic read-only CTest jobs
huangminghuang Jun 18, 2026
8445773
Merge remote-tracking branch 'origin/master' into feature/macos-arm64…
huangminghuang Jun 19, 2026
ed3811e
Enable sys-vm JIT on macOS arm64
huangminghuang Jun 19, 2026
cd9137d
Pin vcpkg registry to master
huangminghuang Jun 19, 2026
af169f2
Pin vcpkg registry to sys-vm master update
huangminghuang Jun 19, 2026
00a5677
Merge remote-tracking branch 'origin/master' into feature/macos-arm64…
huangminghuang Jun 25, 2026
888ae73
Merge remote-tracking branch 'origin/master' into support/pr-356-merg…
huangminghuang Jun 26, 2026
b58bb61
Merge remote-tracking branch 'origin/master' into support/pr-356-merg…
huangminghuang Jun 29, 2026
c6a2e8f
Tune macOS CI triggers
huangminghuang Jun 30, 2026
57e43f3
Run macOS NP LR tests nightly
huangminghuang Jun 30, 2026
4e61274
Merge remote-tracking branch 'origin/master' into support/pr-356-nigh…
huangminghuang Jun 30, 2026
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
65 changes: 43 additions & 22 deletions .github/scripts/build-sysio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,65 @@
set -euo pipefail

BUILD_JOBS="${1:?usage: build-sysio.sh <build-jobs>}"
GITHUB_WORKSPACE="${GITHUB_WORKSPACE:-$PWD}"
BUILD_DIR="${BUILD_DIR:-build}"
CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE:-Release}"
VCPKG_TARGET_TRIPLET="${VCPKG_TARGET_TRIPLET:-x64-linux-release}"
VCPKG_HOST_TRIPLET="${VCPKG_HOST_TRIPLET:-$VCPKG_TARGET_TRIPLET}"
VCPKG_OVERLAY_TRIPLETS="${VCPKG_OVERLAY_TRIPLETS:-$GITHUB_WORKSPACE/.github/vcpkg-triplets}"

echo "Building for ${SYSIO_PLATFORM_NAME:-unknown platform}"
echo "Build directory: ${BUILD_DIR}"
echo "vcpkg target triplet: ${VCPKG_TARGET_TRIPLET}"

# Use $GITHUB_WORKSPACE (container path /__w/...) so ccache/vcpkg write to
# the mounted volume and persist for actions/cache to save.
export CCACHE_DIR="$GITHUB_WORKSPACE/.ccache"
export VCPKG_BINARY_SOURCES="clear;files,$GITHUB_WORKSPACE/vcpkg-binary-cache,readwrite"
export VCPKG_TARGET_TRIPLET=x64-linux-release
export VCPKG_HOST_TRIPLET=x64-linux-release
export VCPKG_OVERLAY_TRIPLETS="$GITHUB_WORKSPACE/.github/vcpkg-triplets"
export CCACHE_DIR="${CCACHE_DIR:-$GITHUB_WORKSPACE/.ccache}"
export VCPKG_BINARY_SOURCES="${VCPKG_BINARY_SOURCES:-clear;files,$GITHUB_WORKSPACE/vcpkg-binary-cache,readwrite}"
export VCPKG_TARGET_TRIPLET
export VCPKG_HOST_TRIPLET
export VCPKG_OVERLAY_TRIPLETS

# Clean intermediate vcpkg artifacts but preserve binary cache and downloads.
rm -rf vcpkg/buildtrees vcpkg/packages vcpkg/vcpkg_installed \
build/vcpkg_installed ~/.cache/vcpkg ~/.vcpkg
"$BUILD_DIR/vcpkg_installed" ~/.cache/vcpkg ~/.vcpkg

mkdir -p "$GITHUB_WORKSPACE/vcpkg-binary-cache"

./vcpkg/bootstrap-vcpkg.sh

chown -R "$(id -u):$(id -g)" "$PWD"

# Reset ccache stats for this build.
ccache -z || true

cmake -B build -S . -G Ninja ${SYSIO_PLATFORM_HAS_EXTRAS_CMAKE:+-C /extras.cmake} \
-DCMAKE_C_COMPILER="$CC" \
-DCMAKE_CXX_COMPILER="$CXX" \
-DCMAKE_MAKE_PROGRAM="$CMAKE_MAKE_PROGRAM" \
-DCMAKE_TOOLCHAIN_FILE="$PWD/vcpkg/scripts/buildsystems/vcpkg.cmake" \
-DCMAKE_BUILD_TYPE=Release \
-DVCPKG_TARGET_TRIPLET="$VCPKG_TARGET_TRIPLET" \
-DVCPKG_HOST_TRIPLET="$VCPKG_HOST_TRIPLET" \
-DVCPKG_OVERLAY_TRIPLETS="$VCPKG_OVERLAY_TRIPLETS" \
-DENABLE_CCACHE=ON \
-DENABLE_TESTS=ON \
${CMAKE_PREFIX_PATH:+-DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH}

cmake --build build -- -j "$BUILD_JOBS"
cmake_args=(
-B "$BUILD_DIR"
-S .
-G Ninja
-DCMAKE_TOOLCHAIN_FILE="$PWD/vcpkg/scripts/buildsystems/vcpkg.cmake"
-DCMAKE_BUILD_TYPE="$CMAKE_BUILD_TYPE"
-DVCPKG_TARGET_TRIPLET="$VCPKG_TARGET_TRIPLET"
-DVCPKG_HOST_TRIPLET="$VCPKG_HOST_TRIPLET"
-DVCPKG_OVERLAY_TRIPLETS="$VCPKG_OVERLAY_TRIPLETS"
-DENABLE_CCACHE=ON
-DENABLE_TESTS=ON
)

if [[ -n "${SYSIO_PLATFORM_HAS_EXTRAS_CMAKE:-}" ]]; then
cmake_args+=(-C /extras.cmake)
fi
if [[ -n "${CC:-}" ]]; then
cmake_args+=(-DCMAKE_C_COMPILER="$CC")
fi
if [[ -n "${CXX:-}" ]]; then
cmake_args+=(-DCMAKE_CXX_COMPILER="$CXX")
fi
if [[ -n "${CMAKE_PREFIX_PATH:-}" ]]; then
cmake_args+=(-DCMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH")
fi

cmake "${cmake_args[@]}"

cmake --build "$BUILD_DIR" -- -j "$BUILD_JOBS"

echo "=== ccache statistics ==="
ccache -s || true
9 changes: 9 additions & 0 deletions .github/vcpkg-triplets/arm64-osx-release.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
set(VCPKG_TARGET_ARCHITECTURE arm64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
set(VCPKG_BUILD_TYPE release)
set(VCPKG_CMAKE_CONFIGURE_OPTIONS
-DCMAKE_C_COMPILER_LAUNCHER=ccache
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Build & Test(Parallel ctest)"
name: "Linux amd64 build & tests"

on:
push:
Expand Down Expand Up @@ -103,7 +103,8 @@ jobs:
vcpkg-binaries-${{ matrix.platform }}-

- name: Restore ccache
uses: actions/cache@v5
id: restore-ccache
uses: actions/cache/restore@v5
with:
path: ${{ github.workspace }}/.ccache
key: ccache-${{ matrix.platform }}-${{ github.sha }}
Expand All @@ -114,7 +115,10 @@ jobs:
id: build
env:
SYSIO_PLATFORM_NAME: ${{ matrix.platform }}
VCPKG_TARGET_TRIPLET: x64-linux-release
VCPKG_HOST_TRIPLET: x64-linux-release
run: |
chown -R "$(id -u):$(id -g)" "$PWD"
bash .github/scripts/build-sysio.sh "${{ matrix.build_jobs }}"

- name: Show vcpkg logs if failure
Expand All @@ -123,11 +127,6 @@ jobs:
echo "$PWD"
echo "=== vcpkg-manifest-install.log ==="
cat build/vcpkg-manifest-install.log || true
echo "=== Other vcpkg logs ==="
find build -type f -name '*.log' | while read f; do
echo "----- $f -----"
tail -n 40 "$f"
done

- name: Debug environment and workspace
if: ${{ runner.debug == '1' }}
Expand Down Expand Up @@ -225,6 +224,13 @@ jobs:
path: build/Testing/Temporary/CTestCostData.txt
key: ctest-cost-${{ matrix.platform }}-${{ github.run_id }}-${{ github.run_attempt }}

- name: Save ccache
if: ${{ always() && steps.restore-ccache.outputs.cache-hit != 'true' }}
uses: actions/cache/save@v5
with:
path: ${{ github.workspace }}/.ccache
key: ccache-${{ matrix.platform }}-${{ github.sha }}

- name: Upload core files from failed tests
uses: actions/upload-artifact@v6
if: failure()
Expand Down
165 changes: 165 additions & 0 deletions .github/workflows/macos_arm64_build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
name: "macOS arm64 build & tests"

on:
workflow_dispatch:
inputs:
run_sharded_np_lr:
description: "Run macOS nonparallelizable/long-running tests"
type: boolean
default: false
schedule:
# GitHub schedules run from the default branch, providing nightly coverage for origin/master.
- cron: "0 8 * * *"
push:
branches:
- master
paths:
- ".github/workflows/macos_arm64_build.yaml"
- ".github/vcpkg-triplets/**"
- "cmake/**"
- "libraries/**"
- "plugins/**"
- "programs/**"
- "unittests/**"
- "tests/**"
- "CMakeLists.txt"
- "vcpkg.json"
- "vcpkg-configuration.json"
pull_request:
paths:
- ".github/workflows/macos_arm64_build.yaml"
- ".github/vcpkg-triplets/**"
- "cmake/**"
- "libraries/**"
- "plugins/**"
- "programs/**"
- "unittests/**"
- "tests/**"
- "CMakeLists.txt"
- "vcpkg.json"
- "vcpkg-configuration.json"

permissions:
contents: read

defaults:
run:
shell: bash

jobs:
parallel-tests:
name: Build and run parallel tests on Apple Silicon
runs-on: macos-26
timeout-minutes: 300
env:
BUILD_DIR: build/macos-arm64
CCACHE_DIR: ${{ github.workspace }}/.ccache
VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}/vcpkg-binary-cache,readwrite"
steps:
- uses: actions/checkout@v5
with:
submodules: recursive

- name: Install host tools
run: |
brew install ninja ccache pkgconf autoconf automake libtool
python3 -m venv "$RUNNER_TEMP/python-venv"
"$RUNNER_TEMP/python-venv/bin/python" -m pip install --upgrade pip
"$RUNNER_TEMP/python-venv/bin/python" -m pip install numpy
echo "$RUNNER_TEMP/python-venv/bin" >> "$GITHUB_PATH"

- name: Restore vcpkg binary cache
uses: actions/cache@v5
with:
path: ${{ github.workspace }}/vcpkg-binary-cache
key: vcpkg-binaries-macos-arm64-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json', '.github/vcpkg-triplets/arm64-osx-release.cmake') }}
restore-keys: |
vcpkg-binaries-macos-arm64-

- name: Restore ccache
id: restore-ccache
uses: actions/cache/restore@v5
with:
path: ${{ github.workspace }}/.ccache
key: ccache-macos-arm64-${{ github.sha }}
restore-keys: |
ccache-macos-arm64-

- name: Configure and build
env:
SYSIO_PLATFORM_NAME: macos-arm64
VCPKG_TARGET_TRIPLET: arm64-osx-release
VCPKG_HOST_TRIPLET: arm64-osx-release
run: |
bash .github/scripts/build-sysio.sh "$(sysctl -n hw.logicalcpu)"

- name: Enable macOS core dumps
run: |
mkdir -p "$RUNNER_TEMP/cores"
ulimit -c unlimited || true
sudo sysctl -w "kern.corefile=$RUNNER_TEMP/cores/core.%P" || true

- name: Restore CTest cost data
uses: actions/cache/restore@v5
with:
# CTest uses this file to schedule higher-cost tests first when running with -j.
path: ${{ env.BUILD_DIR }}/Testing/Temporary/CTestCostData.txt
key: ctest-cost-macos-arm64-${{ github.sha }}
restore-keys: |
ctest-cost-macos-arm64-

- name: Run parallelizable tests
run: |
cd "$BUILD_DIR"
ctest -j "$(sysctl -n hw.logicalcpu)" \
-LE "(nonparallelizable_tests|long_running_tests)" \
--output-on-failure --timeout 1000 \
2>&1 | tee "$RUNNER_TEMP/macos-arm64-parallel-ctest.log"

- name: Run sharded NP/LR tests
if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && inputs.run_sharded_np_lr) }}
run: |
cd "$BUILD_DIR"
test_jobs="$(sysctl -n hw.logicalcpu)"
echo "Running sharded NP/LR tests with ${test_jobs} jobs"
ctest -j "${test_jobs}" \
-L "(nonparallelizable_tests|long_running_tests)" \
--timeout 2700 \
2>&1 | tee "$RUNNER_TEMP/macos-arm64-np-lr-ctest.log"

- name: Save CTest cost data
if: ${{ always() && hashFiles(format('{0}/Testing/Temporary/CTestCostData.txt', env.BUILD_DIR)) != '' }}
uses: actions/cache/save@v5
with:
# Caches are immutable, so save each run under a unique key and restore by runner prefix.
path: ${{ env.BUILD_DIR }}/Testing/Temporary/CTestCostData.txt
key: ctest-cost-macos-arm64-${{ github.run_id }}-${{ github.run_attempt }}

- name: Save ccache
if: ${{ always() && steps.restore-ccache.outputs.cache-hit != 'true' }}
uses: actions/cache/save@v5
with:
path: ${{ github.workspace }}/.ccache
key: ccache-macos-arm64-${{ github.sha }}

- name: Upload core files from failed tests
uses: actions/upload-artifact@v6
if: failure()
with:
name: macos-arm64-tests-logs
if-no-files-found: warn
path: |
${{ runner.temp }}/cores/
~/Library/Logs/DiagnosticReports/
~/Library/Logs/CrashReporter/
${{ env.BUILD_DIR }}/Testing/Temporary/
${{ env.BUILD_DIR }}/TestLogs/
${{ env.BUILD_DIR }}/PerformanceHarnessScenarioRunnerLogs/

- name: Show diagnostics on failure
if: failure()
run: |
echo "=== vcpkg manifest log ==="
cat "$BUILD_DIR/vcpkg-manifest-install.log" || true
echo "=== ccache statistics ==="
ccache -s || true
45 changes: 45 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,55 @@ Wire Sysio is a C++ implementation of the AntelopeIO protocol (a fork of Spring)
sudo apt-get install -y build-essential binutils ccache cmake curl git ninja-build \
libcurl4-openssl-dev libgmp-dev zlib1g-dev python3 python3-pip clang-18 libclang-18-dev

# Initialize required submodules
git submodule update --init --recursive vcpkg libraries/appbase

# Bootstrap vcpkg
./vcpkg/bootstrap-vcpkg.sh
```

### macOS Apple Silicon phase-one build

Apple Silicon developer builds use vcpkg's `arm64-osx` triplet and the interpreted `sys-vm` runtime only. Contract
rebuilds through CDT, `sys-vm-jit`, `sys-vm-oc`, and `native-module` are out of scope for the phase-one macOS path.

```bash
brew install cmake ninja ccache pkgconf autoconf automake libtool
git submodule update --init --recursive vcpkg libraries/appbase
./vcpkg/bootstrap-vcpkg.sh

export BUILD_DIR=$PWD/build/macos-arm64
export NUM_JOBS=$(sysctl -n hw.logicalcpu)

cmake \
-B $BUILD_DIR \
-S . \
-G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DVCPKG_TARGET_TRIPLET=arm64-osx \
-DBUILD_SYSTEM_CONTRACTS=OFF \
-DBUILD_TEST_CONTRACTS=OFF \
-DENABLE_CCACHE=ON \
-DENABLE_DISTCC=OFF \
-DENABLE_TESTS=ON \
-DENABLE_JEMALLOC=OFF \
-DDISABLE_WASM_SPEC_TESTS=ON \
-DCMAKE_TOOLCHAIN_FILE=$PWD/vcpkg/scripts/buildsystems/vcpkg.cmake

cmake --build $BUILD_DIR --target fc nodeop clio kiod sys-util unit_test plugin_test test_fc -- -j${NUM_JOBS}
```

Smoke-test the phase-one macOS build with:

```bash
$BUILD_DIR/programs/nodeop/nodeop --version
$BUILD_DIR/programs/clio/clio version client
$BUILD_DIR/libraries/libfc/test/test_fc --run_test=traits
$BUILD_DIR/unittests/unit_test --run_test=noop_tests -- --sys-vm
$BUILD_DIR/unittests/unit_test --run_test=wasm_tests -- --sys-vm
$BUILD_DIR/tests/plugin_test --report_level=detailed --color_output
```

### Configure and Build
```bash

Expand Down
Loading
Loading