ci: Test bindings generation
@@ -16,8 +16,38 @@ env:
CARGO_TERM_COLOR: always
MATRIX_SDK_CRYPTO_NODEJS_PATH: bindings/matrix-sdk-crypto-nodejs
MATRIX_SDK_CRYPTO_JS_PATH: bindings/matrix-sdk-crypto-js
+ # keep in sync with uniffi dependency in root Cargo.toml
+ UNIFFI_REV: 89b9dd835b470abb339b1bd492c19f7a08ad872f
jobs:
+ test-uniffi-codegen:
+ name: Test UniFFI bindings generation
+ if: github.event_name == 'push' || !github.event.pull_request.draft
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v1
+
+ - name: Install Rust
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: nightly
+ profile: minimal
+ override: true
+
+ - name: Load cache
+ uses: Swatinem/rust-cache@v1
+
+ - name: Install Uniffi
+ uses: actions-rs/cargo@v1
+ with:
+ command: install
+ args: uniffi_bindgen --git https://github.com/mozilla/uniffi-rs --rev ${{ env.UNIFFI_REV }}
+
+ - name: Build library & generate bindings
+ run: cargo xtask ci bindings
+
test-matrix-sdk-crypto-nodejs:
name: ${{ matrix.os-name }} [m]-crypto-nodejs, v${{ matrix.node-version }}
if: github.event_name == 'push' || !github.event.pull_request.draft
@@ -156,8 +186,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: install
- # keep in sync with uniffi dependency in root Cargo.toml
- args: uniffi_bindgen --git https://github.com/mozilla/uniffi-rs --rev 89b9dd835b470abb339b1bd492c19f7a08ad872f
+ args: uniffi_bindgen --git https://github.com/mozilla/uniffi-rs --rev ${{ env.UNIFFI_REV }}
- name: Build library & bindings
run: cargo xtask swift build-library
