weblocks: Add broadcast channel APIs #5
Workflow file for this run
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: Release package:weblocks | |
| on: | |
| push: | |
| tags: | |
| - 'release/weblocks/[0-9]+.[0-9]+.[0-9]+*' | |
| jobs: | |
| # Note: Keep the compile_ jobs in sync with release_weblocks.yaml | |
| compile_native_linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: aarch64-unknown-linux-gnu,x86_64-unknown-linux-gnu,riscv64gc-unknown-linux-gnu,armv7-unknown-linux-gnueabihf,aarch64-linux-android,armv7-linux-androideabi,x86_64-linux-android | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: "weblocks/native" | |
| - run: cargo install cargo-ndk | |
| - name: Install cross-compiling GCC | |
| run: | | |
| sudo apt install -y gcc-aarch64-linux-gnu gcc-riscv64-linux-gnu gcc-arm-linux-gnueabihf | |
| - name: Build x64 | |
| working-directory: weblocks/native | |
| run: cargo build --release --target x86_64-unknown-linux-gnu | |
| - name: Build aarch64 | |
| working-directory: weblocks/native | |
| run: cargo build --release --target aarch64-unknown-linux-gnu | |
| - name: Build armv7 | |
| working-directory: weblocks/native | |
| run: cargo build --release --target armv7-unknown-linux-gnueabihf | |
| - name: Build riscv64gc | |
| working-directory: weblocks/native | |
| run: cargo build --release --target riscv64gc-unknown-linux-gnu | |
| - name: Build Android libs | |
| working-directory: weblocks/native | |
| run: cargo ndk -t armeabi-v7a -t arm64-v8a -t x86_64 -o target/android build --release | |
| - name: Copy libraries | |
| working-directory: weblocks/native | |
| run: | | |
| mkdir out | |
| cp target/x86_64-unknown-linux-gnu/release/libdart_locks.so out/libdart_locks.linux_x64.so | |
| cp target/aarch64-unknown-linux-gnu/release/libdart_locks.so out/libdart_locks.linux_aarch64.so | |
| cp target/armv7-unknown-linux-gnueabihf/release/libdart_locks.so out/libdart_locks.linux_arm7.so | |
| cp target/riscv64gc-unknown-linux-gnu/release/libdart_locks.so out/libdart_locks.linux_riscv.so | |
| cp target/android/x86_64/libdart_locks.so out/libdart_locks.android_x86_64.so | |
| cp target/android/armeabi-v7a/libdart_locks.so out/libdart_locks.android_v7a.so | |
| cp target/android/arm64-v8a/libdart_locks.so out/libdart_locks.android_v8a.so | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: locks-linux | |
| retention-days: 1 | |
| path: weblocks/native/out | |
| compile_native_macos: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: x86_64-apple-darwin,aarch64-apple-darwin,aarch64-apple-ios,aarch64-apple-ios-sim,x86_64-apple-ios | |
| - name: Build macOS | |
| working-directory: weblocks/native | |
| run: | | |
| cargo build --release --target x86_64-apple-darwin | |
| cargo build --release --target aarch64-apple-darwin | |
| - name: Build iOS | |
| working-directory: weblocks/native | |
| run: | | |
| cargo build --release --target aarch64-apple-ios | |
| cargo build --release --target aarch64-apple-ios-sim | |
| cargo build --release --target x86_64-apple-ios | |
| - name: Copy libraries | |
| working-directory: weblocks/native | |
| run: | | |
| mkdir out | |
| cp target/x86_64-apple-darwin/release/libdart_locks.dylib out/libdart_locks.macos_x64.dylib | |
| cp target/aarch64-apple-darwin/release/libdart_locks.dylib out/libdart_locks.macos_aarch64.dylib | |
| cp target/aarch64-apple-ios/release/libdart_locks.dylib out/libdart_locks.ios_aarch64.dylib | |
| cp target/aarch64-apple-ios-sim/release/libdart_locks.dylib out/libdart_locks.ios_sim_aarch64.dylib | |
| cp target/x86_64-apple-ios/release/libdart_locks.dylib out/libdart_locks.ios_sim_x64.dylib | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: locks-apple | |
| retention-days: 1 | |
| path: weblocks/native/out | |
| compile_native_windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: x86_64-pc-windows-msvc,aarch64-pc-windows-msvc | |
| - name: Build Windows | |
| working-directory: weblocks/native | |
| run: | | |
| cargo build --release --target x86_64-pc-windows-msvc | |
| cargo build --release --target aarch64-pc-windows-msvc | |
| - name: Copy libraries | |
| working-directory: weblocks/native | |
| run: | | |
| mkdir out | |
| cp target/x86_64-pc-windows-msvc/release/dart_locks.dll out/dart_locks.win_x64.dll | |
| cp target/aarch64-pc-windows-msvc/release/dart_locks.dll out/dart_locks.win_aarch64.dll | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: locks-windows | |
| retention-days: 1 | |
| path: weblocks/native/out | |
| publish: | |
| permissions: | |
| id-token: write # Required for authentication using OIDC | |
| runs-on: ubuntu-latest | |
| needs: [compile_native_linux, compile_native_macos, compile_native_windows] | |
| environment: pub.dev | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dart-lang/setup-dart@v1 | |
| id: setup-dart | |
| with: | |
| sdk: beta | |
| - name: Download libs | |
| uses: actions/download-artifact@v5 | |
| with: | |
| merge-multiple: true | |
| path: weblocks/assets | |
| - run: dart pub get | |
| working-directory: weblocks | |
| - run: dart pub publish --dry-run | |
| working-directory: weblocks | |
| - run: dart pub publish -f | |
| working-directory: weblocks |