Build-Native-LZ4 #286
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build-Native-LZ4 | |
| # Follow LZ4 latest release by cron update | |
| # 1. Check for LZ4 updates - compare submodule commit ID with latest release commit | |
| # 2. If no changes, checkout in each build job, build and upload artifacts. | |
| # 2". If changes exist, update submodule after checkout in each build job, build and upload artifacts | |
| # 3. Upload packages to GitHub Actions summary | |
| # 4. If changes exist, Create a branch and PR. Separate PRs for each LZ4 release are preferred (avoid updating in a single PR) | |
| # PR includes following changes. | |
| # - Commit that updates the submodule | |
| # - Commit that lz4 dynamic lib artifacts placed in src/NativeCompressions.LZ4.Runtime/runtimes/{platform_name}/native/{lib} | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 3 * * *" # Every day at 3:00 AM (UTC) | |
| jobs: | |
| check_new_release: | |
| permissions: | |
| contents: read | |
| uses: ./.github/workflows/check-new-release.yaml | |
| with: | |
| repository: lz4/lz4 | |
| submodule_path: lz4 | |
| build-windows: | |
| needs: [check_new_release] | |
| if: ${{ needs.check_new_release.outputs.needs_update == 'true' || github.event_name == 'workflow_dispatch' }} | |
| strategy: | |
| matrix: | |
| arch: [x64] | |
| include: | |
| - arch: x64 | |
| platform: x64 | |
| msys_env: MINGW64 | |
| permissions: | |
| contents: read | |
| runs-on: windows-2025 | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: Cysharp/Actions/.github/actions/checkout@main | |
| with: | |
| submodules: recursive | |
| fetch-depth: 1 | |
| - name: Update submodule to latest release | |
| if: ${{ needs.check_new_release.outputs.needs_update == 'true' }} | |
| run: | | |
| cd lz4 | |
| git fetch --tags | |
| git checkout ${{ needs.check_new_release.outputs.latest_tag }} | |
| cd .. | |
| echo "Updated lz4 submodule to ${{ needs.check_new_release.outputs.latest_tag }}" | |
| - name: Setup MSYS2 | |
| uses: msys2/setup-msys2@4f806de0a5a7294ffabaff804b38a9b435a73bda # v2.30.0 | |
| with: | |
| msystem: ${{ matrix.msys_env }} | |
| update: true | |
| install: >- | |
| ${{ matrix.arch == 'x64' && 'mingw-w64-x86_64-gcc mingw-w64-x86_64-make' || 'mingw-w64-clang-aarch64-gcc mingw-w64-clang-aarch64-make' }} | |
| make | |
| - name: Build DLL | |
| shell: msys2 {0} | |
| run: | | |
| cd lz4/lib | |
| make BUILD_STATIC=no BUILD_SHARED=yes SRCFILES="lz4.c lz4hc.c lz4frame.c xxhash.c" -j "$(nproc)" | |
| ls -la *.dll | |
| file *.dll | |
| - name: Prepare artifacts | |
| shell: bash | |
| run: | | |
| mkdir -p artifacts/win-${{ matrix.arch }} | |
| cp lz4/lib/liblz4.dll artifacts/win-${{ matrix.arch }}/lz4.dll | |
| - name: Upload Windows artifacts | |
| uses: Cysharp/Actions/.github/actions/upload-artifact@main | |
| with: | |
| name: lz4-win-${{ matrix.arch }} | |
| path: artifacts/win-${{ matrix.arch }}/* | |
| build-windows-arm64: | |
| needs: [check_new_release] | |
| if: ${{ needs.check_new_release.outputs.needs_update == 'true' || github.event_name == 'workflow_dispatch' }} | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: Cysharp/Actions/.github/actions/checkout@main | |
| with: | |
| submodules: recursive | |
| - name: Update submodule to latest release | |
| if: ${{ needs.check_new_release.outputs.needs_update == 'true' }} | |
| run: | | |
| cd lz4 | |
| git fetch --tags | |
| git checkout ${{ needs.check_new_release.outputs.latest_tag }} | |
| cd .. | |
| echo "Updated lz4 submodule to ${{ needs.check_new_release.outputs.latest_tag }}" | |
| - name: Build using Docker | |
| run: | | |
| docker run --rm -v "$PWD:/work" \ | |
| mstorsjo/llvm-mingw:latest \ | |
| bash -c "cd /work/lz4/lib && \ | |
| make BUILD_STATIC=no BUILD_SHARED=yes \ | |
| TARGET_OS=Windows_NT LIBLZ4_NAME=lz4 \ | |
| CC=aarch64-w64-mingw32-gcc WINDRES=aarch64-w64-mingw32-windres \ | |
| SRCFILES='lz4.c lz4hc.c lz4frame.c xxhash.c'" | |
| file lz4/lib/lz4.dll | |
| - name: Prepare artifacts | |
| run: | | |
| mkdir -p artifacts/win-arm64 | |
| cp lz4/lib/lz4.dll artifacts/win-arm64/ | |
| - name: Upload artifacts | |
| uses: Cysharp/Actions/.github/actions/upload-artifact@main | |
| with: | |
| name: lz4-win-arm64 | |
| path: artifacts/win-arm64/* | |
| build-linux: | |
| needs: [check_new_release] | |
| if: ${{ needs.check_new_release.outputs.needs_update == 'true' || github.event_name == 'workflow_dispatch' }} | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 5 | |
| strategy: | |
| matrix: | |
| arch: [x64, arm64] | |
| include: | |
| - arch: x64 | |
| cc: gcc | |
| - arch: arm64 | |
| cc: aarch64-linux-gnu-gcc | |
| packages: gcc-aarch64-linux-gnu | |
| steps: | |
| - uses: Cysharp/Actions/.github/actions/checkout@main | |
| with: | |
| submodules: recursive | |
| fetch-depth: 1 | |
| - name: Update submodule to latest release | |
| if: ${{ needs.check_new_release.outputs.needs_update == 'true' }} | |
| run: | | |
| cd lz4 | |
| git fetch --tags | |
| git checkout ${{ needs.check_new_release.outputs.latest_tag }} | |
| cd .. | |
| echo "Updated lz4 submodule to ${{ needs.check_new_release.outputs.latest_tag }}" | |
| - name: Install ARM64 cross-compiler | |
| if: matrix.arch == 'arm64' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ${{ matrix.packages }} | |
| - name: Build shared library | |
| run: | | |
| cd lz4/lib | |
| make BUILD_STATIC=no BUILD_SHARED=yes CC="${{ matrix.cc }}" SRCFILES="lz4.c lz4hc.c lz4frame.c xxhash.c" -j "$(nproc)" | |
| ls -la ./*.so* | |
| file liblz4.so* | |
| - name: Prepare artifacts | |
| run: | | |
| mkdir -p artifacts/linux-${{ matrix.arch }} | |
| cp -L lz4/lib/liblz4.so artifacts/linux-${{ matrix.arch }}/ | |
| - name: Upload Linux artifacts | |
| uses: Cysharp/Actions/.github/actions/upload-artifact@main | |
| with: | |
| name: lz4-linux-${{ matrix.arch }} | |
| path: artifacts/linux-${{ matrix.arch }}/* | |
| build-macos: | |
| needs: [check_new_release] | |
| if: ${{ needs.check_new_release.outputs.needs_update == 'true' || github.event_name == 'workflow_dispatch' }} | |
| permissions: | |
| contents: read | |
| strategy: | |
| matrix: | |
| arch: [x64, arm64] | |
| include: | |
| - arch: x64 | |
| flags: "-arch x86_64" | |
| - arch: arm64 | |
| flags: "-arch arm64" | |
| runs-on: macos-15 | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: Cysharp/Actions/.github/actions/checkout@main | |
| with: | |
| submodules: recursive | |
| - name: Update submodule to latest release | |
| if: ${{ needs.check_new_release.outputs.needs_update == 'true' }} | |
| run: | | |
| cd lz4 | |
| git fetch --tags | |
| git checkout ${{ needs.check_new_release.outputs.latest_tag }} | |
| cd .. | |
| echo "Updated lz4 submodule to ${{ needs.check_new_release.outputs.latest_tag }}" | |
| - name: Build dynamic library | |
| run: | | |
| cd lz4/lib | |
| make BUILD_STATIC=no BUILD_SHARED=yes CFLAGS="${{ matrix.flags }} -O3" SRCFILES="lz4.c lz4hc.c lz4frame.c xxhash.c" -j "$(sysctl -n hw.ncpu)" | |
| ls -la | |
| lipo -info liblz4.dylib | |
| file -L liblz4.dylib | |
| - name: Prepare artifacts | |
| run: | | |
| mkdir -p artifacts/osx-${{ matrix.arch }} | |
| cp -L lz4/lib/liblz4.dylib artifacts/osx-${{ matrix.arch }}/ | |
| - name: Upload artifacts | |
| uses: Cysharp/Actions/.github/actions/upload-artifact@main | |
| with: | |
| name: lz4-osx-${{ matrix.arch }} | |
| path: artifacts/osx-${{ matrix.arch }}/* | |
| build-ios: | |
| needs: [check_new_release] | |
| if: ${{ needs.check_new_release.outputs.needs_update == 'true' || github.event_name == 'workflow_dispatch' }} | |
| permissions: | |
| contents: read | |
| runs-on: macos-15 | |
| timeout-minutes: 10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| arch: [arm64, x86_64] | |
| include: | |
| - arch: arm64 | |
| sdk: iphoneos | |
| target: aarch64-apple-ios11.0 | |
| cflags: "-arch arm64 -mios-version-min=11.0" | |
| - arch: x86_64 | |
| sdk: iphonesimulator | |
| target: x86_64-apple-ios11.0-simulator | |
| cflags: "-arch x86_64 -mios-simulator-version-min=11.0" | |
| steps: | |
| - uses: Cysharp/Actions/.github/actions/checkout@main | |
| with: | |
| submodules: recursive | |
| fetch-depth: 1 | |
| - name: Update submodule to latest release | |
| if: ${{ needs.check_new_release.outputs.needs_update == 'true' }} | |
| run: | | |
| cd lz4 | |
| git fetch --tags | |
| git checkout ${{ needs.check_new_release.outputs.latest_tag }} | |
| cd .. | |
| echo "Updated lz4 submodule to ${{ needs.check_new_release.outputs.latest_tag }}" | |
| - name: Build static library for iOS | |
| run: | | |
| SDK_PATH=$(xcrun --sdk ${{ matrix.sdk }} --show-sdk-path) | |
| # Build static library (iOS App Store requires static linking) | |
| cd lz4/lib | |
| make BUILD_STATIC=yes BUILD_SHARED=no CC="clang" CFLAGS="${{ matrix.cflags }} -O3 -isysroot $SDK_PATH -DXXH_NAMESPACE=LZ4_" SRCFILES="lz4.c lz4hc.c lz4frame.c xxhash.c" -j "$(sysctl -n hw.ncpu)" | |
| ls -la liblz4.a | |
| file liblz4.a | |
| lipo -info liblz4.a | |
| - name: Prepare artifacts | |
| run: | | |
| mkdir -p artifacts/ios-${{ matrix.arch }} | |
| cp lz4/lib/liblz4.a artifacts/ios-${{ matrix.arch }}/ | |
| - name: Upload iOS artifacts | |
| uses: Cysharp/Actions/.github/actions/upload-artifact@main | |
| with: | |
| name: lz4-ios-${{ matrix.arch }} | |
| path: artifacts/ios-${{ matrix.arch }}/* | |
| build-android: | |
| needs: [check_new_release] | |
| if: ${{ needs.check_new_release.outputs.needs_update == 'true' || github.event_name == 'workflow_dispatch' }} | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 10 | |
| strategy: | |
| matrix: | |
| abi: [armeabi-v7a, arm64-v8a, x86_64] | |
| include: | |
| - abi: armeabi-v7a | |
| arch: arm # Unity require this for mobile app | |
| target: armv7a-linux-androideabi21 | |
| cc: armv7a-linux-androideabi21-clang | |
| - abi: arm64-v8a | |
| arch: arm64 # Most mobile app | |
| target: aarch64-linux-android21 | |
| cc: aarch64-linux-android21-clang | |
| - abi: x86_64 | |
| arch: x86_64 # Chromebook and Google Play for PC (not emulation) | |
| target: x86_64-linux-android21 | |
| cc: x86_64-linux-android21-clang | |
| steps: | |
| - uses: Cysharp/Actions/.github/actions/checkout@main | |
| with: | |
| submodules: recursive | |
| fetch-depth: 1 | |
| - name: Update submodule to latest release | |
| if: ${{ needs.check_new_release.outputs.needs_update == 'true' }} | |
| run: | | |
| cd lz4 | |
| git fetch --tags | |
| git checkout ${{ needs.check_new_release.outputs.latest_tag }} | |
| cd .. | |
| echo "Updated lz4 submodule to ${{ needs.check_new_release.outputs.latest_tag }}" | |
| - name: Setup Android NDK | |
| uses: nttld/setup-ndk@afb4c9964b521afb97c864b7d40b11e6911bd410 # v1.5.0 | |
| id: setup-ndk | |
| with: | |
| ndk-version: r26d | |
| add-to-path: false | |
| - name: Build shared library for Android | |
| run: | | |
| export PATH="${{ steps.setup-ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH" | |
| cd lz4/lib | |
| make BUILD_STATIC=no BUILD_SHARED=yes CC="${{ matrix.cc }}" CFLAGS="-O3 -fPIC -DXXH_NAMESPACE=LZ4_" SRCFILES="lz4.c lz4hc.c lz4frame.c xxhash.c" -j "$(nproc)" | |
| ls -la liblz4.so* | |
| file liblz4.so* | |
| - name: Prepare artifacts | |
| run: | | |
| mkdir -p artifacts/android-${{ matrix.arch }} | |
| cp lz4/lib/liblz4.so artifacts/android-${{ matrix.arch }}/ | |
| - name: Upload Android artifacts | |
| uses: Cysharp/Actions/.github/actions/upload-artifact@main | |
| with: | |
| name: lz4-android-${{ matrix.arch }} | |
| path: artifacts/android-${{ matrix.arch }}/* | |
| package-all: | |
| needs: | |
| [ | |
| check_new_release, | |
| build-windows, | |
| build-windows-arm64, | |
| build-linux, | |
| build-macos, | |
| build-ios, | |
| build-android, | |
| ] | |
| if: ${{ needs.check_new_release.outputs.needs_update == 'true' || github.event_name == 'workflow_dispatch' }} | |
| permissions: | |
| contents: write | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Download all artifacts | |
| uses: Cysharp/Actions/.github/actions/download-artifact@main | |
| with: | |
| path: artifacts | |
| - name: Create .NET runtime structure | |
| run: | | |
| mkdir -p release/runtimes/{win-x64,win-arm64}/native | |
| mkdir -p release/runtimes/{linux-x64,linux-arm64}/native | |
| mkdir -p release/runtimes/{osx-x64,osx-arm64}/native | |
| mkdir -p release/runtimes/{android-arm,android-arm64,android-x64}/native | |
| mkdir -p release/runtimes/{ios-arm64,ios-x64}/native | |
| # Windows | |
| if [ -f artifacts/lz4-win-x64/lz4.dll ]; then | |
| cp -f artifacts/lz4-win-x64/lz4.dll release/runtimes/win-x64/native/lz4.dll | |
| fi | |
| if [ -f artifacts/lz4-win-arm64/lz4.dll ]; then | |
| cp -f artifacts/lz4-win-arm64/lz4.dll release/runtimes/win-arm64/native/lz4.dll | |
| fi | |
| # Linux | |
| if [ -f artifacts/lz4-linux-x64/liblz4.so ]; then | |
| cp artifacts/lz4-linux-x64/liblz4.so release/runtimes/linux-x64/native/ | |
| fi | |
| if [ -f artifacts/lz4-linux-arm64/liblz4.so ]; then | |
| cp artifacts/lz4-linux-arm64/liblz4.so release/runtimes/linux-arm64/native/ | |
| fi | |
| # macOS | |
| for file in artifacts/lz4-osx-x64/*.dylib; do | |
| [ -f "$file" ] && cp "$file" release/runtimes/osx-x64/native/liblz4.dylib && break | |
| done | |
| for file in artifacts/lz4-osx-arm64/*.dylib; do | |
| [ -f "$file" ] && cp "$file" release/runtimes/osx-arm64/native/liblz4.dylib && break | |
| done | |
| # iOS | |
| if [ -f artifacts/lz4-ios-arm64/liblz4.a ]; then | |
| cp artifacts/lz4-ios-arm64/liblz4.a release/runtimes/ios-arm64/native/ | |
| fi | |
| if [ -f artifacts/lz4-ios-x86_64/liblz4.a ]; then | |
| cp artifacts/lz4-ios-x86_64/liblz4.a release/runtimes/ios-x64/native/ | |
| fi | |
| # Android | |
| if [ -f artifacts/lz4-android-arm/liblz4.so ]; then | |
| cp artifacts/lz4-android-arm/liblz4.so release/runtimes/android-arm/native/ | |
| fi | |
| if [ -f artifacts/lz4-android-arm64/liblz4.so ]; then | |
| cp artifacts/lz4-android-arm64/liblz4.so release/runtimes/android-arm64/native/ | |
| fi | |
| if [ -f artifacts/lz4-android-x86_64/liblz4.so ]; then | |
| cp artifacts/lz4-android-x86_64/liblz4.so release/runtimes/android-x64/native/ | |
| fi | |
| - name: Create archives | |
| run: | | |
| cd release | |
| tar czf ../lz4-native-libraries.tar.gz . | |
| zip -r ../lz4-native-libraries.zip . | |
| - name: Upload package | |
| uses: Cysharp/Actions/.github/actions/upload-artifact@main | |
| with: | |
| name: lz4-native-package | |
| path: | | |
| lz4-native-libraries.tar.gz | |
| create-pr: | |
| needs: [check_new_release, package-all] | |
| if: ${{ needs.check_new_release.outputs.needs_update == 'true' }} | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| env: | |
| NEW_BRANCH_NAME: "automate/lz4-${{ needs.check_new_release.outputs.latest_tag }}" | |
| LATEST_TAG: ${{ needs.check_new_release.outputs.latest_tag }} | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: Cysharp/Actions/.github/actions/checkout@main | |
| with: | |
| submodules: recursive | |
| - name: Configure Git | |
| run: | | |
| git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git config --local user.name "github-actions[bot]" | |
| - name: Create new branch | |
| run: git checkout -b "${NEW_BRANCH_NAME}" | |
| # update submodule | |
| - name: Update submodule to latest release | |
| if: ${{ needs.check_new_release.outputs.needs_update == 'true' }} | |
| run: | | |
| echo "Updated lz4 submodule to ${LATEST_TAG}" | |
| cd lz4 | |
| git fetch --tags | |
| git checkout "${LATEST_TAG}" | |
| cd .. | |
| git add lz4 | |
| git commit -m "automate: Update LZ4 submodule to ${LATEST_TAG}" | |
| # update runtimes | |
| - name: Download all artifacts | |
| uses: Cysharp/Actions/.github/actions/download-artifact@main | |
| with: | |
| path: artifacts | |
| - name: Place new runtimes | |
| env: | |
| DEST_BASE_PATH: src/NativeCompressions.LZ4.Runtime/runtimes | |
| run: | | |
| echo "Updated lz4 runtimes to ${LATEST_TAG}" | |
| for arch in linux-x64 linux-arm64 osx-x64 osx-arm64 win-x64 win-arm64 ios-arm64 ios-x64 android-arm android-arm64 android-x64; do | |
| mkdir -p "${DEST_BASE_PATH}/${arch}/native" | |
| done | |
| # Show current | |
| echo "::group::Show artifacts/" | |
| ls -lR artifacts/ | |
| echo "::endgroup::" | |
| echo "::group::Show ${DEST_BASE_PATH}/" | |
| ls -lR "${DEST_BASE_PATH}/" | |
| echo "::endgroup::" | |
| echo "::group::Copy new files" | |
| # Windows | |
| if [ -f artifacts/lz4-win-x64/lz4.dll ]; then | |
| cp -f artifacts/lz4-win-x64/lz4.dll "${DEST_BASE_PATH}/win-x64/native/lz4.dll" | |
| fi | |
| if [ -f artifacts/lz4-win-arm64/lz4.dll ]; then | |
| cp -f artifacts/lz4-win-arm64/lz4.dll "${DEST_BASE_PATH}/win-arm64/native/lz4.dll" | |
| fi | |
| # Linux | |
| if [ -f artifacts/lz4-linux-x64/liblz4.so ]; then | |
| cp -f artifacts/lz4-linux-x64/liblz4.so "${DEST_BASE_PATH}/linux-x64/native/liblz4.so" | |
| fi | |
| if [ -f artifacts/lz4-linux-arm64/liblz4.so ]; then | |
| cp -f artifacts/lz4-linux-arm64/liblz4.so "${DEST_BASE_PATH}/linux-arm64/native/liblz4.so" | |
| fi | |
| # macOS | |
| if [ -f artifacts/lz4-osx-x64/liblz4.dylib ]; then | |
| cp -f artifacts/lz4-osx-x64/liblz4.dylib "${DEST_BASE_PATH}/osx-x64/native/liblz4.dylib" | |
| fi | |
| if [ -f artifacts/lz4-osx-arm64/liblz4.dylib ]; then | |
| cp -f artifacts/lz4-osx-arm64/liblz4.dylib "${DEST_BASE_PATH}/osx-arm64/native/liblz4.dylib" | |
| fi | |
| # iOS | |
| if [ -f artifacts/lz4-ios-arm64/liblz4.a ]; then | |
| cp -f artifacts/lz4-ios-arm64/liblz4.a "${DEST_BASE_PATH}/ios-arm64/native/liblz4.a" | |
| fi | |
| if [ -f artifacts/lz4-ios-x86_64/liblz4.a ]; then | |
| cp -f artifacts/lz4-ios-x86_64/liblz4.a "${DEST_BASE_PATH}/ios-x64/native/liblz4.a" | |
| fi | |
| # Android | |
| if [ -f artifacts/lz4-android-arm/liblz4.so ]; then | |
| cp -f artifacts/lz4-android-arm/liblz4.so "${DEST_BASE_PATH}/android-arm/native/liblz4.so" | |
| fi | |
| if [ -f artifacts/lz4-android-arm64/liblz4.so ]; then | |
| cp -f artifacts/lz4-android-arm64/liblz4.so "${DEST_BASE_PATH}/android-arm64/native/liblz4.so" | |
| fi | |
| if [ -f artifacts/lz4-android-x86_64/liblz4.so ]; then | |
| cp -f artifacts/lz4-android-x86_64/liblz4.so "${DEST_BASE_PATH}/android-x64/native/liblz4.so" | |
| fi | |
| echo "::endgroup::" | |
| echo "::group::git commit" | |
| # Commit runtime updates | |
| git add "${DEST_BASE_PATH}" | |
| git commit -m "automate: Update LZ4 native libraries to ${LATEST_TAG}" | |
| echo "::endgroup::" | |
| # create PR | |
| - name: Push branch and create PR | |
| id: create_pr | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| # Push the branch | |
| git push origin "${NEW_BRANCH_NAME}" | |
| cat <<'EOF' > artifacts/pr_body.txt | |
| This PR updates LZ4 to the latest release `${{ needs.check_new_release.outputs.latest_tag }}` ([${{ needs.check_new_release.outputs.latest_commit }}](https://github.com/lz4/lz4/commit/${{ needs.check_new_release.outputs.latest_commit }})) | |
| ## Changes | |
| - Updated LZ4 submodule to ${{ needs.check_new_release.outputs.latest_tag }} | |
| - Updated native libraries for all platforms: | |
| - Windows x64/ARM64 | |
| - Linux x64/ARM64 | |
| - macOS x64/ARM64 | |
| - Android ARM/ARM64/x64 | |
| - iOS ARM64/x64 (device/simulator) | |
| ## Build artifacts | |
| All native libraries have been built and tested in CI. | |
| @neuecc | |
| EOF | |
| # Create PR and capture PR number | |
| PR_URL=$(gh pr create --title "automate: Update LZ4 to ${LATEST_TAG}" --base main --head "${NEW_BRANCH_NAME}" --body-file artifacts/pr_body.txt) | |
| PR_NUMBER=$(echo "$PR_URL" | grep -o '[0-9]\+$') | |
| echo "pr_number=$PR_NUMBER" | tee -a "$GITHUB_OUTPUT" | |
| echo "Created PR #$PR_NUMBER: $PR_URL" | |
| build: | |
| needs: [check_new_release, create-pr] | |
| if: ${{ needs.create-pr.result == 'success' }} | |
| permissions: | |
| contents: read | |
| uses: ./.github/workflows/build-debug.yaml | |
| with: | |
| git-ref: "automate/lz4-${{ needs.check_new_release.outputs.latest_tag }}" |