|
1 | 1 | name: "ZXC: Build Library" |
2 | 2 | on: |
| 3 | + |
3 | 4 | workflow_call: |
4 | 5 | inputs: |
5 | 6 | run-windows-builds: |
|
12 | 13 | description: "Select this option when you want to run the MacOS builds." |
13 | 14 | type: boolean |
14 | 15 | 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 |
16 | 23 |
|
17 | 24 | upload-artifacts: |
18 | 25 | description: "Select this option when you want to upload the artifacts." |
19 | 26 | type: boolean |
20 | 27 | required: false |
21 | | - default: true |
| 28 | + default: true |
| 29 | + |
22 | 30 |
|
23 | 31 | workflow_dispatch: |
24 | 32 | inputs: |
|
32 | 40 | description: "Select this option when you want to run the MacOS builds." |
33 | 41 | type: boolean |
34 | 42 | 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 |
36 | 50 |
|
37 | 51 | upload-artifacts: |
38 | 52 | description: "Select this option when you want to upload the artifacts." |
@@ -336,3 +350,61 @@ jobs: |
336 | 350 | name: hapi-library-${{ runner.os }}-${{ steps.sha.outputs.short }} |
337 | 351 | path: package/ |
338 | 352 | 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