Skip to content

Relocate application Mach-O identities before bundle audit #118

Relocate application Mach-O identities before bundle audit

Relocate application Mach-O identities before bundle audit #118

name: Linux native SDK
on:
push:
branches: [codex/linux-headless-sdk]
pull_request:
paths:
- 'src/WebScene.NativeWeb/**'
- 'src/WebScene.Sdk/**'
- 'tests/NativeWeb/**'
- 'eng/graphics/**'
- 'eng/sdk/**'
- '.github/workflows/linux-native-sdk.yml'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: linux-native-sdk-${{ github.ref }}
cancel-in-progress: true
jobs:
native:
runs-on: [self-hosted, Linux, X64]
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- name: Record source input
run: |
mkdir -p artifacts/linux-native
git rev-parse HEAD > artifacts/linux-native/source-revision.txt
git archive --format=tar.gz HEAD > artifacts/linux-native/source.tar.gz
- name: Install compiler and native prerequisites
run: |
sudo flock /var/lock/webscene-apt.lock bash -c '
apt-get update
apt-get install -y patchelf ninja-build libfontconfig1-dev libfreetype-dev libvulkan-dev mesa-vulkan-drivers vulkan-tools
'
python3 -m pip install --break-system-packages cmake==3.31.6
- name: Install checksum-pinned LLVM
run: |
llvm_root="$HOME/.cache/webscene/llvm-22.1.1-immutable-v3"
python3 eng/sdk/install-linux-llvm.py "$llvm_root"
echo "WEBSCENE_LLVM_ROOT=$llvm_root" >> "$GITHUB_ENV"
echo "$llvm_root/bin" >> "$GITHUB_PATH"
- name: Archive offline compiler profile
run: python3 eng/sdk/archive-linux-llvm.py "$WEBSCENE_LLVM_ROOT" artifacts/linux-native/llvm.tar.gz
- uses: actions/upload-artifact@v4
with:
name: linux-native-compiler
path: artifacts/linux-native/llvm.tar.gz
compression-level: 0
retention-days: 7
- name: Build native document, shared CSS and UI compiler
run: |
cmake -S src/WebScene.NativeWeb -B artifacts/linux-native/build -G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_TOOLCHAIN_FILE="$PWD/src/WebScene.Sdk/cmake/WebSceneToolchain.cmake"
cmake --build artifacts/linux-native/build --parallel 2
ctest --test-dir artifacts/linux-native/build --output-on-failure
- name: Install native-only SDK without V8
run: |
cmake -S src/WebScene.Sdk -B artifacts/linux-native/sdk-build -G Ninja \
-DCMAKE_BUILD_TYPE=Release -DWEBSCENE_SDK_WEBGPU=OFF \
-DCMAKE_TOOLCHAIN_FILE="$PWD/src/WebScene.Sdk/cmake/WebSceneToolchain.cmake" \
-DCMAKE_INSTALL_PREFIX="$PWD/artifacts/linux-native/sdk"
cmake --build artifacts/linux-native/sdk-build --parallel 2
cmake --install artifacts/linux-native/sdk-build
python3 eng/sdk/stage-linux-runtime.py --llvm "$WEBSCENE_LLVM_ROOT" --sdk artifacts/linux-native/sdk
tar -czf artifacts/linux-native/sdk.tar.gz -C artifacts/linux-native sdk
- uses: actions/upload-artifact@v4
if: always()
with:
name: linux-native-evidence
path: |
artifacts/linux-native/source.tar.gz
artifacts/linux-native/source-revision.txt
artifacts/linux-native/sdk.tar.gz
artifacts/linux-native/build/Testing/Temporary/*.log
if-no-files-found: error
retention-days: 7