name: Build ARM64 lsfg-vk layer on: workflow_dispatch: pull_request: paths: - .github/workflows/build-arm64-layer.yml permissions: contents: read env: SOURCE_REPOSITORY: https://github.com/FrankBarretta/lsfg-vk-android.git SOURCE_COMMIT: 3e89e5439a98f55d5acb003d20039426ab24e69c jobs: build: name: Native AArch64 release build runs-on: ubuntu-24.04-arm steps: - name: Install build dependencies run: | sudo apt-get update sudo apt-get install --yes --no-install-recommends \ clang cmake g++ git libvulkan-dev ninja-build - name: Check out the pinned layer source run: | git init lsfg-vk-android cd lsfg-vk-android git remote add origin "${SOURCE_REPOSITORY}" git fetch --depth=1 origin "${SOURCE_COMMIT}" git checkout --detach FETCH_HEAD git submodule update --init --recursive --depth=1 test "$(git rev-parse HEAD)" = "${SOURCE_COMMIT}" - name: Build with static C++ runtimes run: | cmake -S lsfg-vk-android -B build -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_C_COMPILER=clang \ -DCMAKE_CXX_COMPILER=clang++ \ -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF \ -DCMAKE_SHARED_LINKER_FLAGS="-static-libstdc++ -static-libgcc -Wl,--exclude-libs,ALL" cmake --build build --parallel 4 strip --strip-unneeded build/liblsfg-vk.so - name: Verify and document the artifact run: | mkdir -p artifact install -m 0755 build/liblsfg-vk.so artifact/liblsfg-vk-arm64.so readelf -h artifact/liblsfg-vk-arm64.so | grep -q 'Machine:.*AArch64' readelf -d artifact/liblsfg-vk-arm64.so | tee artifact/ELF-DYNAMIC.txt ! grep -Eq 'libstdc\+\+\.so|libgcc_s\.so' artifact/ELF-DYNAMIC.txt sha256sum artifact/liblsfg-vk-arm64.so | tee artifact/SHA256SUMS { echo "Source repository: ${SOURCE_REPOSITORY}" echo "Source commit: ${SOURCE_COMMIT}" echo "Runner: ubuntu-24.04-arm" echo "Compiler: $(clang++ --version | head -n1)" echo "CMake: $(cmake --version | head -n1)" echo "Static runtimes: libstdc++ and libgcc" } > artifact/SOURCE.txt - name: Upload ARM64 layer uses: actions/upload-artifact@v4 with: name: lsfg-vk-arm64-${{ env.SOURCE_COMMIT }} path: artifact/ if-no-files-found: error retention-days: 90