Skip to content

Commit 63e499d

Browse files
committed
feat: add Linux Clang+libc++ build configuration
Signed-off-by: hk2166 <9610hemant@gmail.com>
1 parent 48a3873 commit 63e499d

6 files changed

Lines changed: 237 additions & 89 deletions

File tree

.github/workflows/on-schedule-builds.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ jobs:
1414
with:
1515
run-windows-builds: true
1616
run-macos-builds: true
17+
run-clang-libcxx-build: true
1718
upload-artifacts: false

.github/workflows/zxc-build-library.yaml

Lines changed: 75 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: "ZXC: Build Library"
22
on:
3+
34
workflow_call:
45
inputs:
56
run-windows-builds:
@@ -12,13 +13,20 @@ on:
1213
description: "Select this option when you want to run the MacOS builds."
1314
type: boolean
1415
required: false
15-
default: false
16+
default: false
17+
18+
run-clang-libcxx-build:
19+
description: "Run the Linux Clang+libc++ build"
20+
required: false
21+
type: boolean
22+
default: false
1623

1724
upload-artifacts:
1825
description: "Select this option when you want to upload the artifacts."
1926
type: boolean
2027
required: false
21-
default: true
28+
default: true
29+
2230

2331
workflow_dispatch:
2432
inputs:
@@ -32,7 +40,13 @@ on:
3240
description: "Select this option when you want to run the MacOS builds."
3341
type: boolean
3442
required: false
35-
default: false
43+
default: false
44+
45+
run-clang-libcxx-build:
46+
description: "Run the Linux Clang+libc++ build"
47+
required: false
48+
type: boolean
49+
default: false
3650

3751
upload-artifacts:
3852
description: "Select this option when you want to upload the artifacts."
@@ -336,3 +350,61 @@ jobs:
336350
name: hapi-library-${{ runner.os }}-${{ steps.sha.outputs.short }}
337351
path: package/
338352
if-no-files-found: warn
353+
354+
build-linux-clang-libcxx:
355+
name: "Build (Linux, clang+libc++)"
356+
if: ${{ (inputs.run-clang-libcxx-build) && !cancelled() }}
357+
runs-on: hiero-client-sdk-linux-large
358+
359+
env:
360+
HIERO_NETWORK: localhost
361+
362+
steps:
363+
- name: Harden Runner
364+
uses: step-security/harden-runner@a5ad31d6a139d249332a2605b85202e8c0b78450 # v2.19.1
365+
with:
366+
egress-policy: audit
367+
368+
- name: Checkout Code
369+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
370+
with:
371+
submodules: recursive
372+
373+
- name: Install libc++ and libc++abi
374+
run: |
375+
sudo apt-get update
376+
sudo apt-get install -y libc++-dev libc++abi-dev
377+
378+
- name: Install CMake & Ninja
379+
uses: step-security/get-cmake@082f0e11945209d5c8d8476a791e39d4d041005d # v4.3.1
380+
with:
381+
useCloudCache: true
382+
383+
- name: Setup VCPkg
384+
uses: step-security/run-vcpkg@48490398616947b0df92dc1b24aab5339a66f9f0 # v11.5.2
385+
with:
386+
binaryCachePath: ${{ github.workspace }}/b/vcpkg_cache
387+
388+
- name: Convert VCPkg to Full Clone
389+
working-directory: vcpkg
390+
run: git fetch --unshallow --prune
391+
392+
- name: Configure CMake (Debug)
393+
run: cmake --preset linux-x64-clang-libcxx-debug -DBUILD_TESTS=ON
394+
395+
- name: Build (Debug)
396+
run: cmake --build --preset linux-x64-clang-libcxx-debug -j 6
397+
398+
- name: Run Unit Tests (Debug)
399+
run: ctest -j 6 -C Debug --test-dir build/linux-x64-clang-libcxx-debug --output-on-failure
400+
continue-on-error: false
401+
402+
- name: Configure CMake (Release)
403+
run: cmake --preset linux-x64-clang-libcxx-release -DBUILD_TESTS=ON
404+
405+
- name: Build (Release)
406+
run: cmake --build --preset linux-x64-clang-libcxx-release -j 6
407+
408+
- name: Run Unit Tests (Release)
409+
run: ctest -j 6 -C Release --test-dir build/linux-x64-clang-libcxx-release --output-on-failure
410+
continue-on-error: false

0 commit comments

Comments
 (0)