Comment out iOS build job and its dependencies in CI workflow #10
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: Go | |
| on: | |
| push: | |
| branches: ["master"] | |
| workflow_dispatch: | |
| inputs: | |
| bump: | |
| description: "Which part of the version to bump?" | |
| required: false | |
| default: "patch" | |
| type: choice | |
| options: | |
| - patch | |
| - minor | |
| - major | |
| permissions: | |
| contents: write | |
| jobs: | |
| determine-version: | |
| if: github.ref == 'refs/heads/master' || github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| outputs: | |
| tag: ${{ steps.next_version.outputs.tag }} | |
| current_tag: ${{ steps.current_tag.outputs.current_tag }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get Current Tag | |
| id: current_tag | |
| run: | | |
| current_tag=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "v0.0.0") | |
| echo "current_tag=$current_tag" >> $GITHUB_ENV | |
| echo "::set-output name=current_tag::$current_tag" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Determine next version | |
| id: next_version | |
| uses: actions/github-script@v6 | |
| env: | |
| BUMP: ${{ github.event.inputs.bump || 'patch' }} | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const { owner, repo } = context.repo; | |
| const bump = process.env.BUMP || 'patch'; | |
| console.log(`Selected bump: ${bump}`); | |
| const latest = await github.rest.repos.getLatestRelease({ owner, repo }).catch(() => null); | |
| const currentVersion = latest ? latest.data.tag_name.replace(/^v/, '') : '0.0.0'; | |
| let [major, minor, patch] = currentVersion.split('.').map(Number); | |
| switch (bump) { | |
| case 'major': | |
| major++; | |
| minor = 0; | |
| patch = 0; | |
| break; | |
| case 'minor': | |
| minor++; | |
| patch = 0; | |
| break; | |
| default: | |
| patch++; | |
| } | |
| const nextVersion = `v${major}.${minor}.${patch}`; | |
| console.log(`Next version: ${nextVersion}`); | |
| core.setOutput('tag', nextVersion); | |
| # build-ios: | |
| # runs-on: macos-latest | |
| # needs: determine-version | |
| # steps: | |
| # - uses: actions/checkout@v4 | |
| # with: | |
| # fetch-depth: 0 | |
| # lfs: true | |
| # submodules: "recursive" | |
| # - name: Install protobuf | |
| # run: brew install protobuf | |
| # - name: Set up Rust | |
| # uses: dtolnay/rust-toolchain@stable | |
| # with: | |
| # targets: aarch64-apple-ios,aarch64-apple-ios-sim,x86_64-apple-ios | |
| # - name: Build IOS | |
| # run: ./build_ios.sh | |
| # - name: Upload build artifact | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: ios-build | |
| # path: | | |
| # rust-sdks/target/aarch64-apple-ios/release/liblivekit_ffi.a | |
| # rust-sdks/target/aarch64-apple-ios/release/liblivekit_ffi.dylib | |
| # rust-sdks/target/aarch64-apple-ios-sim/release/liblivekit_ffi.a | |
| # rust-sdks/target/aarch64-apple-ios-sim/release/liblivekit_ffi.dylib | |
| build-android: | |
| runs-on: ubuntu-latest | |
| needs: determine-version | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| lfs: true | |
| submodules: "recursive" | |
| - name: Install protobuf | |
| run: sudo apt-get update && sudo apt-get install -y protobuf-compiler | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: aarch64-linux-android,armv7-linux-androideabi,i686-linux-android,x86_64-linux-android | |
| - name: Install cargo-ndk | |
| run: cargo install cargo-ndk | |
| - name: Set up JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: "temurin" | |
| java-version: "17" | |
| - name: Setup Android SDK | |
| uses: android-actions/setup-android@v3 | |
| - name: Install NDK | |
| run: | | |
| sdkmanager "ndk;26.1.10909125" | |
| echo "ANDROID_NDK_HOME=$ANDROID_HOME/ndk/26.1.10909125" >> $GITHUB_ENV | |
| echo "ANDROID_NDK_ROOT=$ANDROID_HOME/ndk/26.1.10909125" >> $GITHUB_ENV | |
| - name: Build Android | |
| run: ./build_android.sh | |
| - name: Upload build artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: android-build | |
| path: | | |
| rust-sdks/livekit-ffi/jniLibs/**/*.so | |
| release: | |
| runs-on: ubuntu-latest | |
| needs: | |
| # - build-ios | |
| - build-android | |
| - determine-version | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| - name: Compress static libraries | |
| run: | | |
| cd ios-build/rust-sdks/target | |
| zip -j liblivekit_ffi-aarch64-apple-ios.zip aarch64-apple-ios/release/liblivekit_ffi.a | |
| zip -j liblivekit_ffi-aarch64-apple-ios-sim.zip aarch64-apple-ios-sim/release/liblivekit_ffi.a | |
| ls -lh *.zip | |
| - name: Compress Android libraries | |
| run: | | |
| cd android-build | |
| zip -r liblivekit_ffi-android.zip jniLibs/ | |
| ls -lh *.zip | |
| - name: Create Release | |
| id: create_release | |
| uses: actions/create-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ needs.determine-version.outputs.tag }} | |
| release_name: Release ${{ needs.determine-version.outputs.tag }} | |
| draft: false | |
| body: | | |
| **Full Changelog**: https://github.com/argon-chat/lk_build/compare/${{ needs.determine-version.outputs.current_tag }}...${{ needs.determine-version.outputs.tag }} | |
| prerelease: false | |
| - name: Upload iOS Device Static Library | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: ./ios-build/rust-sdks/target/liblivekit_ffi-aarch64-apple-ios.zip | |
| asset_name: liblivekit_ffi-aarch64-apple-ios.zip | |
| asset_content_type: application/zip | |
| - name: Upload iOS Device Dynamic Library | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: ./ios-build/rust-sdks/target/aarch64-apple-ios/release/liblivekit_ffi.dylib | |
| asset_name: liblivekit_ffi-aarch64-apple-ios.dylib | |
| asset_content_type: application/octet-stream | |
| - name: Upload iOS Simulator Static Library | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: ./ios-build/rust-sdks/target/liblivekit_ffi-aarch64-apple-ios-sim.zip | |
| asset_name: liblivekit_ffi-aarch64-apple-ios-sim.zip | |
| asset_content_type: application/zip | |
| - name: Upload iOS Simulator Dynamic Library | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: ./ios-build/rust-sdks/target/aarch64-apple-ios-sim/release/liblivekit_ffi.dylib | |
| asset_name: liblivekit_ffi-aarch64-apple-ios-sim.dylib | |
| asset_content_type: application/octet-stream | |
| - name: Upload Android Libraries | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: ./android-build/liblivekit_ffi-android.zip | |
| asset_name: liblivekit_ffi-android.zip | |
| asset_content_type: application/zip |