Skip to content

Bump uuid from 1.13.1 to 1.14.0 #128

Bump uuid from 1.13.1 to 1.14.0

Bump uuid from 1.13.1 to 1.14.0 #128

Workflow file for this run

name: CI
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
env:
TOOLCHAIN: nightly
CARGO_TERM_COLOR: always
ANDROID_API: 33
ANDROID_NDK_VERSION: 25.2.9519653
ANDROID_SYSTEM_IMAGE_PACKAGE: system-images;android-33;google_apis_playstore;arm64-v8a
OPENSSL_VERSION: 1.1.1s
HOMEBREW_NO_AUTO_UPDATE: 1
jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Cargo fmt
run: cargo fmt --all -- --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Cargo fmt
run: cargo clippy -- -Dwarnings
typos:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@v2
with:
tool: typos-cli
- name: run typos
run: typos
- name: Typos info
if: failure()
run: |
echo 'To fix typos, please run `typos -w`'
echo 'To check for a diff, run `typos`'
echo 'You can find typos here: https://crates.io/crates/typos'
apple_simulator_integration_tests:
runs-on: macos-15
strategy:
fail-fast: false
matrix:
rust-target: ["aarch64-apple-ios-sim"]
apple-target-os: ["iOS"]
build-std: [""]
include:
- rust-target: "aarch64-apple-tvos-sim"
apple-target-os: "tvOS"
build-std: "-Zbuild-std"
- rust-target: "aarch64-apple-watchos-sim"
apple-target-os: "watchOS"
build-std: "-Zbuild-std"
steps:
- uses: actions/checkout@v4
- uses: ./tests/support/test_server/
# needs nightly for now as some ios targets require -Zbuild-std
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "nightly"
components: rust-src
targets: aarch64-apple-ios-sim
- name: Cache Cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/bin
~/.cargo/git
~/.cargo/registry
key: cargo-${{ github.workflow }}-${{ github.job}}-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/Cargo.lock') }}
- uses: taiki-e/install-action@v2
with:
tool: [email protected]
- name: Start Simulator
uses: futureware-tech/simulator-action@v4
with:
os: ${{ matrix.apple-target-os }}
- name: Build tests for ${{ matrix.rust-target }}
run: cargo ${{ matrix.build-std }} test --target ${{ matrix.rust-target }} --no-run
- name: Dinghy devices and platforms for ${{ matrix.rust-target }}
env:
DINGHY_LOG: debug
run: |
cargo dinghy all-platforms
cargo dinghy all-devices
- name: Test for for ${{ matrix.rust-target }}
env:
DINGHY_LOG: debug
SIMCTL_CHILD_RUST_LOG: trace
SIMCTL_CHILD_RUST_BACKTRACE: full
timeout-minutes: 30
run: |
cargo ${{ matrix.build-std }} test --target ${{ matrix.rust-target }} -- -- --test-threads 1
- name: Build phoenix_channel_clients with tls
run: cargo build ${{ matrix.build-std }} --target ${{ matrix.rust-target }} --features native-tls
- name: Phx server logs
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}-${{ matrix.rust-target }}
path: |
tests/support/test_server/server.stdout.txt
tests/support/test_server/server.stderr.txt
/Users/runner/Library/Developer/CoreSimulator/Devices/*/data/Containers/Bundle/Application/*/Dinghy.app/stdout
uniffi-check:
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Cache Cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/bin
~/.cargo/git
~/.cargo/registry
key: cargo-${{ github.workflow }}-${{ github.job}}-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/Cargo.lock') }}
- name: Build static library
run: cargo build --lib --release # For some unclear reason, the release build has better errors.
- name: Generate swift bindings
run: |
cargo run --bin uniffi-bindgen -- generate --library ./target/release/libphoenix_channels_client.dylib --out-dir ./binding-swift/ --language swift
- name: Generate kotlin bindings
run: |
cargo run --bin uniffi-bindgen -- generate --library ./target/release/libphoenix_channels_client.dylib --out-dir ./binding-kotlin/ --language kotlin
integration_tests:
# rust cross-compilation
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- uses: ./tests/support/test_server/
- uses: dtolnay/rust-toolchain@stable
- name: Cache Cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/bin
~/.cargo/git
~/.cargo/registry
key: cargo-${{ github.workflow }}-${{ github.job}}-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/Cargo.lock') }}
- name: Build phoenix_channels_client
run: cargo build --all-targets
- name: Generate docs for phoenix_channel_clients
run: cargo doc
- name: Get JNA jar
run: wget 'https://repo1.maven.org/maven2/net/java/dev/jna/jna/5.14.0/jna-5.14.0.jar'
- name: Set up Elixir, kotlin and ktlint
if: ${{ runner.os == 'macOS' }}
run: brew install ktlint
- name: Test phoenix_channel_clients
env:
# This is required for the kotlin uniffi tests
CLASSPATH: "/opt/homebrew/opt/kotlin/libexec/lib/kotlinx-coroutines-core-jvm.jar:./jna-5.14.0.jar"
run: cargo test
android_simulator_integration_tests:
# rust cross-compilation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./tests/support/test_server/
- name: Install Rust Nightly
uses: dtolnay/rust-toolchain@stable
with:
target: x86_64-linux-android
- name: Cache Cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/bin
~/.cargo/git
~/.cargo/registry
key: cargo-${{ github.workflow }}-${{ github.job }}-${{runner.os}}-${{runner.arch}}-${{ hashFiles('**/Cargo.lock') }}
- uses: taiki-e/install-action@v2
with:
tool: [email protected]
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: "temurin"
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Gradle cache
uses: gradle/actions/setup-gradle@v4
- name: AVD cache
uses: actions/cache@v4
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-${{ env.ANDROID_API }}-${{ github.workflow }}-${{ github.job }}-${{ runner.os }}-${{runner.arch}}
- name: Create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ env.ANDROID_API }}
ndk: ${{ env.ANDROID_NDK_VERSION }}
force-avd-creation: false
target: google_apis
arch: x86_64
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
script: echo "Generated AVD snapshot for caching."
- name: Run tests in android emulator
uses: reactivecircus/android-emulator-runner@v2
env:
RANLIB: "${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib"
with:
api-level: ${{ env.ANDROID_API }}
ndk: ${{ env.ANDROID_NDK_VERSION }}
target: google_apis
arch: x86_64
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: |
cargo dinghy all-platforms
cargo dinghy all-devices
export RUSTFLAGS="--cfg tokio_unstable"
cargo dinghy -p auto-android-x86_64-api${ANDROID_API} test