Skip to content
Closed
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
3 changes: 2 additions & 1 deletion .github/workflows/on-schedule-builds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ jobs:
with:
run-windows-builds: true
run-macos-builds: true
upload-artifacts: false
run-clang-libcxx-build: true
upload-artifacts: false
80 changes: 75 additions & 5 deletions .github/workflows/zxc-build-library.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,14 @@ on:
description: "Select this option when you want to run the MacOS builds."
type: boolean
required: false
default: false

default: false

run-clang-libcxx-build:
description: "Run the Linux Clang+libc++ build"
required: false
type: boolean
default: false

upload-artifacts:
description: "Select this option when you want to upload the artifacts."
type: boolean
Expand All @@ -32,11 +38,17 @@ on:
description: "Select this option when you want to run the MacOS builds."
type: boolean
required: false
default: false

default: false

run-clang-libcxx-build:
description: "Run the Linux Clang+libc++ build"
required: false
type: boolean
default: false

upload-artifacts:
description: "Select this option when you want to upload the artifacts."
type: boolean
type: boolean
required: false
default: true

Expand Down Expand Up @@ -336,3 +348,61 @@ jobs:
name: hapi-library-${{ runner.os }}-${{ steps.sha.outputs.short }}
path: package/
if-no-files-found: warn

build-linux-clang-libcxx:
name: "Build (Linux, clang+libc++)"
if: ${{ (inputs.run-clang-libcxx-build) && !cancelled() }}
runs-on: hiero-client-sdk-linux-large

env:
HIERO_NETWORK: localhost

steps:
- name: Harden Runner
uses: step-security/harden-runner@a5ad31d6a139d249332a2605b85202e8c0b78450 # v2.19.1
with:
egress-policy: audit

- name: Checkout Code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: recursive

- name: Install libc++ and libc++abi
run: |
sudo apt-get update
sudo apt-get install -y libc++-dev libc++abi-dev

- name: Install CMake & Ninja
uses: step-security/get-cmake@082f0e11945209d5c8d8476a791e39d4d041005d # v4.3.1
with:
useCloudCache: true

- name: Setup VCPkg
uses: step-security/run-vcpkg@48490398616947b0df92dc1b24aab5339a66f9f0 # v11.5.2
with:
binaryCachePath: ${{ github.workspace }}/b/vcpkg_cache

- name: Convert VCPkg to Full Clone
working-directory: vcpkg
run: git fetch --unshallow --prune

- name: Configure CMake (Debug)
run: cmake --preset linux-x64-clang-libcxx-debug -DBUILD_TESTS=ON

- name: Build (Debug)
run: cmake --build --preset linux-x64-clang-libcxx-debug -j 6

- name: Run Unit Tests (Debug)
run: ctest -j 6 -C Debug --test-dir build/linux-x64-clang-libcxx-debug -R "TestVectors|UnitTests" --output-on-failure
continue-on-error: false

- name: Configure CMake (Release)
run: cmake --preset linux-x64-clang-libcxx-release -DBUILD_TESTS=ON

- name: Build (Release)
run: cmake --build --preset linux-x64-clang-libcxx-release -j 6

- name: Run Unit Tests (Release)
run: ctest -j 6 -C Release --test-dir build/linux-x64-clang-libcxx-release -R "TestVectors|UnitTests" --output-on-failure
continue-on-error: false
Comment on lines +396 to +408

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

issue (blocking): The step is named "Run Unit Tests" but the ctest invocation here runs every test discovered for the preset - both unit and integration tests. Integration tests require a live Hiero network (see config/local_node.json and the Prepare Hiero Solo step in the existing build job above at zxc-build-library.yaml:211). Since this new job doesn't stand up Solo, the integration tests will fail on every nightly run as soon as the cache warms up.

The repo's README.md already shows the right pattern for unit-only runs:

ctest -j 6 -C <CONFIG> --test-dir build/<PRESET> -R "TestVectors|UnitTests" --output-on-failure

You have two reasonable options:

  1. (Recommended for now) Restrict the new job to unit tests by adding -R "TestVectors|UnitTests" to both ctest invocations. This matches the spirit of [Intermediate]: Add linux-x64-clang-libcxx preset and run it as a nightly build #1620 - the goal is libc++ stdlib portability for the SDK, and unit tests exercise that surface area without needing a network.
  2. Wire in a Prepare Hiero Solo step before the test runs (matching the existing Linux job at lines 197-205) and use -E NodeUpdateTransactionIntegrationTests like the existing job does. This is a heavier nightly run but gives full coverage.

If you go with option 1, also rename the steps from "Run Unit Tests" to something accurate (the name is already correct in that case 🙂 - just keep it consistent).

182 changes: 98 additions & 84 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{
"name": "vcpkg-base",
"hidden": true,
"displayName": "VCPkg Base Build",
"displayName": "VCPkg Base",
"description": "Configured via the vcpkg toolchain",
"binaryDir": "${sourceDir}/build/${presetName}",
"installDir": "${sourceDir}/package",
Expand Down Expand Up @@ -39,183 +39,197 @@
{
"name": "linux-x64-release",
"inherits": ["vcpkg-base"],
"displayName": "Linux x64 Release",
"description": "Linux x64 Release build",
"cacheVariables": {
"VCPKG_TARGET_TRIPLET": {
"type": "STRING",
"value": "x64-linux"
},
"CMAKE_BUILD_TYPE": {
"type": "STRING",
"value": "Release"
}
"VCPKG_TARGET_TRIPLET": "x64-linux",
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "linux-x64-debug",
"inherits": ["vcpkg-base"],
"displayName": "Linux x64 Debug",
"description": "Linux x64 Debug build",
"cacheVariables": {
"VCPKG_TARGET_TRIPLET": {
"type": "STRING",
"value": "x64-linux"
},
"CMAKE_BUILD_TYPE": {
"type": "STRING",
"value": "Debug"
}
"VCPKG_TARGET_TRIPLET": "x64-linux",
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "linux-x64-clang-libcxx-debug",
"displayName": "Linux x64 Clang libc++ Debug",
"description": "Linux x64 build with Clang and libc++ (Debug)",
"inherits": "vcpkg-base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_C_COMPILER": "clang",
"CMAKE_CXX_COMPILER": "clang++",
"CMAKE_CXX_FLAGS_INIT": "-stdlib=libc++",
"CMAKE_EXE_LINKER_FLAGS_INIT": "-stdlib=libc++ -lc++abi",
"CMAKE_SHARED_LINKER_FLAGS_INIT": "-stdlib=libc++ -lc++abi",
"VCPKG_TARGET_TRIPLET": "x64-linux-clang-libcxx",
"VCPKG_OVERLAY_TRIPLETS": "${sourceDir}/vcpkg-triplets"
},
"binaryDir": "${sourceDir}/build/linux-x64-clang-libcxx-debug"
},
{
"name": "linux-x64-clang-libcxx-release",
"displayName": "Linux x64 Clang libc++ Release",
"description": "Linux x64 build with Clang and libc++ (Release)",
"inherits": "vcpkg-base",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_C_COMPILER": "clang",
"CMAKE_CXX_COMPILER": "clang++",
"CMAKE_CXX_FLAGS_INIT": "-stdlib=libc++",
"CMAKE_EXE_LINKER_FLAGS_INIT": "-stdlib=libc++ -lc++abi",
"CMAKE_SHARED_LINKER_FLAGS_INIT": "-stdlib=libc++ -lc++abi",
"VCPKG_TARGET_TRIPLET": "x64-linux-clang-libcxx",
"VCPKG_OVERLAY_TRIPLETS": "${sourceDir}/vcpkg-triplets"
},
"binaryDir": "${sourceDir}/build/linux-x64-clang-libcxx-release"
},
{
"name": "macos-x64-release",
"inherits": ["vcpkg-base"],
"displayName": "macOS x64 Release",
"description": "macOS x64 Release build",
"cacheVariables": {
"VCPKG_TARGET_TRIPLET": {
"type": "STRING",
"value": "x64-osx"
},
"CMAKE_BUILD_TYPE": {
"type": "STRING",
"value": "Release"
}
"VCPKG_TARGET_TRIPLET": "x64-osx",
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "macos-x64-debug",
"inherits": ["vcpkg-base"],
"displayName": "macOS x64 Debug",
"description": "macOS x64 Debug build",
"cacheVariables": {
"VCPKG_TARGET_TRIPLET": {
"type": "STRING",
"value": "x64-osx"
},
"CMAKE_BUILD_TYPE": {
"type": "STRING",
"value": "Debug"
}
"VCPKG_TARGET_TRIPLET": "x64-osx",
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "macos-arm64-release",
"inherits": ["vcpkg-base"],
"displayName": "macOS ARM64 Release",
"description": "macOS ARM64 Release build",
"cacheVariables": {
"VCPKG_TARGET_TRIPLET": {
"type": "STRING",
"value": "arm64-osx"
},
"CMAKE_BUILD_TYPE": {
"type": "STRING",
"value": "Release"
}
"VCPKG_TARGET_TRIPLET": "arm64-osx",
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "macos-arm64-debug",
"inherits": ["vcpkg-base"],
"displayName": "macOS ARM64 Debug",
"description": "macOS ARM64 Debug build",
"cacheVariables": {
"VCPKG_TARGET_TRIPLET": {
"type": "STRING",
"value": "arm64-osx"
},
"CMAKE_BUILD_TYPE": {
"type": "STRING",
"value": "Debug"
}
"VCPKG_TARGET_TRIPLET": "arm64-osx",
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "windows-x64-release",
"inherits": ["vcpkg-msbuild-base"],
"displayName": "Windows x64 Release",
"description": "Windows x64 Release build",
"cacheVariables": {
"VCPKG_TARGET_TRIPLET": {
"type": "STRING",
"value": "x64-windows"
},
"CMAKE_BUILD_TYPE": {
"type": "STRING",
"value": "Release"
}
"VCPKG_TARGET_TRIPLET": "x64-windows",
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "windows-x64-debug",
"inherits": ["vcpkg-msbuild-base"],
"displayName": "Windows x64 Debug",
"description": "Windows x64 Debug build",
"cacheVariables": {
"VCPKG_TARGET_TRIPLET": {
"type": "STRING",
"value": "x64-windows"
},
"CMAKE_BUILD_TYPE": {
"type": "STRING",
"value": "Debug"
}
"VCPKG_TARGET_TRIPLET": "x64-windows",
"CMAKE_BUILD_TYPE": "Debug"
}
}
],
"buildPresets": [
{
"name": "linux-x64-release",
"configurePreset": "linux-x64-release",
"displayName": "Build ninja-multi-vcpkg",
"description": "Build ninja-multi-vcpkg Configurations",
"displayName": "Linux x64 Release",
"description": "Build Linux x64 Release",
"configuration": "Release",
"targets": ["install"]
},
{
"name": "linux-x64-debug",
"configurePreset": "linux-x64-debug",
"displayName": "Build ninja-multi-vcpkg",
"description": "Build ninja-multi-vcpkg Configurations",
"displayName": "Linux x64 Debug",
"description": "Build Linux x64 Debug",
"configuration": "Debug",
"targets": ["install"]
},
{
"name": "linux-x64-clang-libcxx-debug",
"displayName": "Linux x64 Clang libc++ Debug",
"description": "Linux x64 build with Clang and libc++ (Debug)",
"configurePreset": "linux-x64-clang-libcxx-debug",
"configuration": "Debug"
},
{
"name": "linux-x64-clang-libcxx-release",
"displayName": "Linux x64 Clang libc++ Release",
"description": "Linux x64 build with Clang and libc++ (Release)",
"configurePreset": "linux-x64-clang-libcxx-release",
"configuration": "Release"
},
{
"name": "macos-x64-release",
"configurePreset": "macos-x64-release",
"displayName": "Build ninja-multi-vcpkg",
"description": "Build ninja-multi-vcpkg Configurations",
"displayName": "macOS x64 Release",
"description": "Build macOS x64 Release",
"configuration": "Release",
"targets": ["install"]
},
{
"name": "macos-x64-debug",
"configurePreset": "macos-x64-debug",
"displayName": "Build ninja-multi-vcpkg",
"description": "Build ninja-multi-vcpkg Configurations",
"displayName": "macOS x64 Debug",
"description": "Build macOS x64 Debug",
"configuration": "Debug",
"targets": ["install"]
},
{
"name": "macos-arm64-release",
"configurePreset": "macos-arm64-release",
"displayName": "Build ninja-multi-vcpkg",
"description": "Build ninja-multi-vcpkg Configurations",
"displayName": "macOS ARM64 Release",
"description": "Build macOS ARM64 Release",
"configuration": "Release",
"targets": ["install"]
},
{
"name": "macos-arm64-debug",
"configurePreset": "macos-arm64-debug",
"displayName": "Build ninja-multi-vcpkg",
"description": "Build ninja-multi-vcpkg Configurations",
"displayName": "macOS ARM64 Debug",
"description": "Build macOS ARM64 Debug",
"configuration": "Debug",
"targets": ["install"]
},
{
"name": "windows-x64-release",
"configurePreset": "windows-x64-release",
"displayName": "MSVC Release (x64)",
"description": "Build MSVC Configurations",
"displayName": "Windows x64 Release",
"description": "Build Windows x64 Release",
"configuration": "Release",
"targets": ["install"]
},
{
"name": "windows-x64-debug",
"configurePreset": "windows-x64-debug",
"displayName": "MSVC Debug (x64)",
"description": "Build MSVC Configurations",
"displayName": "Windows x64 Debug",
"description": "Build Windows x64 Debug",
"configuration": "Debug",
"targets": ["install"]
}
],
"testPresets": [

]
"testPresets": []
}
Loading