diff --git a/.github/workflows/release_gh.yaml b/.github/workflows/release_gh.yaml index e4896b1..2147983 100644 --- a/.github/workflows/release_gh.yaml +++ b/.github/workflows/release_gh.yaml @@ -34,122 +34,122 @@ jobs: env: VERSION: ${{ inputs.version }} SHA: ${{ inputs.sha }} - # # The iOS release build builds the xcframework in release mode and uploads it to the artifact store for later use. - # ios-release-build: - # name: Capture.xcframework with artifacts - # needs: ["verify-version"] - # runs-on: macos-14 - # steps: - # - uses: actions/checkout@v4 - # with: - # ref: ${{ inputs.sha }} + # The iOS release build builds the xcframework in release mode and uploads it to the artifact store for later use. + ios-release-build: + name: Capture.xcframework with artifacts + needs: ["verify-version"] + runs-on: macos-14 + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.sha }} - # - name: 'Install dependencies' - # run: ./ci/mac_ci_setup.sh - # - name: Build xcframework + artifacts - # run: | - # ./tools/ios_release.sh Capture "${{ inputs.version }}" - # mv ./dist/Capture.ios.zip ./Capture.ios.zip - # - uses: actions/upload-artifact@v4 - # with: - # name: Capture.ios.zip - # path: ./Capture.ios.zip - # build-ios-example-apps: - # needs: ["verify-version"] - # permissions: - # contents: write - # uses: ./.github/workflows/example_apps_ios.yaml - # with: - # sha: ${{ inputs.sha }} - # secrets: inherit + - name: 'Install dependencies' + run: ./ci/mac_ci_setup.sh + - name: Build xcframework + artifacts + run: | + ./tools/ios_release.sh Capture "${{ inputs.version }}" + mv ./dist/Capture.ios.zip ./Capture.ios.zip + - uses: actions/upload-artifact@v4 + with: + name: Capture.ios.zip + path: ./Capture.ios.zip + build-ios-example-apps: + needs: ["verify-version"] + permissions: + contents: write + uses: ./.github/workflows/example_apps_ios.yaml + with: + sha: ${{ inputs.sha }} + secrets: inherit - # # The Android release build builds capture.aar and accompanying artifacts, like the .pom xml and the symbols corresponding to the .so. - # android-release-build: - # name: Capture.aar with artifacts - # needs: ["verify-version"] - # runs-on: ubuntu-latest - # steps: - # # Checkout repo to Github Actions runner - # - uses: actions/checkout@v4 - # with: - # ref: ${{ inputs.sha }} + # The Android release build builds capture.aar and accompanying artifacts, like the .pom xml and the symbols corresponding to the .so. + android-release-build: + name: Capture.aar with artifacts + needs: ["verify-version"] + runs-on: ubuntu-latest + steps: + # Checkout repo to Github Actions runner + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.sha }} - # - name: Install Clang - # run: sudo apt-get install -y clang - # - name: Build AAR + artifacts - # run: ./tools/android_release.sh "$VERSION" - # env: - # VERSION: ${{ inputs.version }} - # - uses: actions/upload-artifact@v4 - # with: - # name: Capture.android.zip - # path: ./dist/Capture.android.zip - # # Builds libcapture.so targeting Linux, to support instant-android using the .aar on Linux CI machines. - # build-android-linux-so: - # name: Linux x86_64 libcapture.so - # # Running on ubuntu-latest builds againt a glibc that is more modern than what - # # instant-android uses in CI, causing a load error. Use 20.04 to link against a compatible - # # glibc. - # runs-on: ubuntu-latest - # needs: ["verify-version"] - # steps: - # - uses: actions/checkout@v4 - # with: - # ref: ${{ inputs.sha }} - # - name: Install Clang - # run: sudo apt-get install -y clang + - name: Install Clang + run: sudo apt-get install -y clang + - name: Build AAR + artifacts + run: ./tools/android_release.sh "$VERSION" + env: + VERSION: ${{ inputs.version }} + - uses: actions/upload-artifact@v4 + with: + name: Capture.android.zip + path: ./dist/Capture.android.zip + # Builds libcapture.so targeting Linux, to support instant-android using the .aar on Linux CI machines. + build-android-linux-so: + name: Linux x86_64 libcapture.so + # Running on ubuntu-latest builds againt a glibc that is more modern than what + # instant-android uses in CI, causing a load error. Use 20.04 to link against a compatible + # glibc. + runs-on: ubuntu-latest + needs: ["verify-version"] + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.sha }} + - name: Install Clang + run: sudo apt-get install -y clang - # - name: build - # run: ./ci/create_linux_java_so.sh - # - uses: actions/upload-artifact@v4 - # with: - # name: libcapture.so - # path: ./bazel-bin/platform/jvm/libcapture.so - # # Builds libcapture.dylib targeting macos arm64, to support instant-android using the .aar on arm64 Macs. - # build-android-macos-arm64: - # name: arm64 libcapture.dylib - # runs-on: macos-14 - # needs: ["verify-version"] - # steps: - # - uses: actions/checkout@v4 - # with: - # ref: ${{ inputs.sha }} + - name: build + run: ./ci/create_linux_java_so.sh + - uses: actions/upload-artifact@v4 + with: + name: libcapture.so + path: ./bazel-bin/platform/jvm/libcapture.so + # Builds libcapture.dylib targeting macos arm64, to support instant-android using the .aar on arm64 Macs. + build-android-macos-arm64: + name: arm64 libcapture.dylib + runs-on: macos-14 + needs: ["verify-version"] + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.sha }} - # - name: 'Install dependencies' - # run: ./ci/mac_ci_setup.sh - # - name: build - # run: ./bazelw build --announce_rc --config=ci --config=release-common --cpu=darwin_arm64 --platforms @build_bazel_apple_support//platforms:macos_arm64 //platform/jvm:capture && cp bazel-bin/platform/jvm/libcapture.dylib libcapture.dylib.arm64 - # - uses: actions/upload-artifact@v4 - # with: - # name: libcapture.dylib.arm64 - # path: libcapture.dylib.arm64 - # # Builds libcapture.dylib targeting macos x86_64, to support instant-android using the .aar on arm64 Macs. - # build-android-macos-x86_64: - # name: x86_64 libcapture.dylib - # runs-on: macos-14 - # needs: ["verify-version"] - # steps: - # # Checkout repo to Github Actions runner - # - uses: actions/checkout@v4 - # with: - # ref: ${{ inputs.sha }} + - name: 'Install dependencies' + run: ./ci/mac_ci_setup.sh + - name: build + run: ./bazelw build --announce_rc --config=ci --config=release-common --cpu=darwin_arm64 --platforms @build_bazel_apple_support//platforms:macos_arm64 //platform/jvm:capture && cp bazel-bin/platform/jvm/libcapture.dylib libcapture.dylib.arm64 + - uses: actions/upload-artifact@v4 + with: + name: libcapture.dylib.arm64 + path: libcapture.dylib.arm64 + # Builds libcapture.dylib targeting macos x86_64, to support instant-android using the .aar on arm64 Macs. + build-android-macos-x86_64: + name: x86_64 libcapture.dylib + runs-on: macos-14 + needs: ["verify-version"] + steps: + # Checkout repo to Github Actions runner + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.sha }} - # - name: 'Install dependencies' - # run: ./ci/mac_ci_setup.sh - # - name: build - # run: ./bazelw build --announce_rc --config=ci --config=release-common --cpu=darwin_x86_64 //platform/jvm:capture && cp bazel-bin/platform/jvm/libcapture.dylib libcapture.dylib.x86_64 - # - uses: actions/upload-artifact@v4 - # with: - # name: libcapture.dylib.x86_64 - # path: libcapture.dylib.x86_64 - # build-android-example-apps: - # needs: ["verify-version"] - # permissions: - # contents: write - # uses: ./.github/workflows/example_apps_android.yaml - # with: - # sha: ${{ inputs.sha }} - # secrets: inherit + - name: 'Install dependencies' + run: ./ci/mac_ci_setup.sh + - name: build + run: ./bazelw build --announce_rc --config=ci --config=release-common --cpu=darwin_x86_64 //platform/jvm:capture && cp bazel-bin/platform/jvm/libcapture.dylib libcapture.dylib.x86_64 + - uses: actions/upload-artifact@v4 + with: + name: libcapture.dylib.x86_64 + path: libcapture.dylib.x86_64 + build-android-example-apps: + needs: ["verify-version"] + permissions: + contents: write + uses: ./.github/workflows/example_apps_android.yaml + with: + sha: ${{ inputs.sha }} + secrets: inherit build-android-integrations: name: Build Android Integrations needs: ["verify-version"] @@ -164,17 +164,14 @@ jobs: contents: write name: GitHub release runs-on: ubuntu-latest - # needs: [ - # "ios-release-build", - # "build-ios-example-apps", - # "android-release-build", - # "build-android-linux-so", - # "build-android-macos-x86_64", - # "build-android-macos-arm64", - # "build-android-example-apps", - # "build-android-integrations", - # ] needs: [ + "ios-release-build", + "build-ios-example-apps", + "android-release-build", + "build-android-linux-so", + "build-android-macos-x86_64", + "build-android-macos-arm64", + "build-android-example-apps", "build-android-integrations", ] steps: @@ -182,26 +179,26 @@ jobs: with: ref: ${{ inputs.sha }} # Download all artifacts to current working directory - # - name: Download Android Capture artifacts - # uses: actions/download-artifact@v4 - # with: - # name: Capture.android.zip - # - name: Download Android Capture .so - # uses: actions/download-artifact@v4 - # with: - # name: libcapture.so - # - name: Download Android Capture .dylib.arm64 - # uses: actions/download-artifact@v4 - # with: - # name: libcapture.dylib.arm64 - # - name: Download Android Capture .dylib.x86_64 - # uses: actions/download-artifact@v4 - # with: - # name: libcapture.dylib.x86_64 - # - name: Download Android Example Apps - # uses: actions/download-artifact@v4 - # with: - # name: Android Example Apps + - name: Download Android Capture artifacts + uses: actions/download-artifact@v4 + with: + name: Capture.android.zip + - name: Download Android Capture .so + uses: actions/download-artifact@v4 + with: + name: libcapture.so + - name: Download Android Capture .dylib.arm64 + uses: actions/download-artifact@v4 + with: + name: libcapture.dylib.arm64 + - name: Download Android Capture .dylib.x86_64 + uses: actions/download-artifact@v4 + with: + name: libcapture.dylib.x86_64 + - name: Download Android Example Apps + uses: actions/download-artifact@v4 + with: + name: Android Example Apps - name: Download Android Timber Integration uses: actions/download-artifact@v4 with: @@ -223,20 +220,20 @@ jobs: run: ./ci/gh_prepare_android_artifacts.sh "$VERSION" env: VERSION: ${{ inputs.version }} - # - name: Download iOS Capture artifacts - # uses: actions/download-artifact@v4 - # with: - # name: Capture.ios.zip - # - name: Download iOS Example Apps - # uses: actions/download-artifact@v4 - # with: - # name: iOS Example Apps - # - name: Prepare iOS artifacts - # run: ./ci/gh_prepare_ios_artifacts.sh "$VERSION" - # env: - # VERSION: ${{ inputs.version }} - # - name: Display structure of downloaded files - # run: ls -R + - name: Download iOS Capture artifacts + uses: actions/download-artifact@v4 + with: + name: Capture.ios.zip + - name: Download iOS Example Apps + uses: actions/download-artifact@v4 + with: + name: iOS Example Apps + - name: Prepare iOS artifacts + run: ./ci/gh_prepare_ios_artifacts.sh "$VERSION" + env: + VERSION: ${{ inputs.version }} + - name: Display structure of downloaded files + run: ls -R # Upload artifacts to the newly created release. # Prefix release version with "v". - name: Create release