-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fragment-generator
- Loading branch information
Showing
230 changed files
with
15,777 additions
and
1,144 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,186 @@ | ||
name: Release cordova extension package | ||
|
||
on: | ||
push: | ||
tags: | ||
- cordova-* | ||
|
||
env: | ||
RUST_LATEST_STABLE_VERSION: 1.67 | ||
|
||
jobs: | ||
initial_release: | ||
name: Publish cordova extension package | ||
runs-on: ubuntu-latest | ||
outputs: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
version: ${{ steps.create_release.outputs.id }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
draft: true | ||
prerelease: false | ||
|
||
build_uniffi: | ||
name: Build uniffi jni shared libs for android with cross | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
config: | ||
- { target: aarch64-linux-android } | ||
- { target: armv7-linux-androideabi } | ||
- { target: i686-linux-android } | ||
- { target: x86_64-linux-android } | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v1 | ||
with: | ||
submodules: true | ||
|
||
- name: Install rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{env.RUST_LATEST_STABLE_VERSION}} | ||
override: true | ||
default: true | ||
|
||
- name: Install cross | ||
run: cargo install cross | ||
|
||
- name: Build library (release) | ||
env: | ||
RUSTFLAGS: "-C embed-bitcode" | ||
run: | | ||
cross rustc --release --target ${{ matrix.config.target }} -p wallet-uniffi --features builtin-bindgen -- -C lto | ||
- name: Prepare package | ||
run: mkdir -p jniLibs/${{ matrix.config.target }} | ||
|
||
- name: copy binary | ||
run: cp ./target/${{ matrix.config.target }}/release/libuniffi_jormungandr_wallet.so ./jniLibs/${{ matrix.config.target }}/; | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: jniLibs | ||
path: ./jniLibs | ||
retention-days: 1 | ||
|
||
build_lipo_asset: | ||
name: Build universal lib for cordova plugin | ||
runs-on: macos-latest | ||
strategy: | ||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{env.RUST_LATEST_STABLE_VERSION}} | ||
override: true | ||
default: true | ||
|
||
- run: rustup target add x86_64-apple-ios | ||
- run: rustup target add aarch64-apple-ios | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v1 | ||
with: | ||
submodules: true | ||
|
||
- name: build universal lib | ||
env: | ||
RUSTFLAGS: "-C embed-bitcode" | ||
working-directory: ./src/chain-wallet-libs/bindings/wallet-cordova/scripts | ||
run: python3 ./build_ios.py | ||
|
||
- uses: actions/upload-artifact@v1 | ||
with: | ||
name: iosLibs | ||
path: ./src/chain-wallet-libs/bindings/wallet-cordova/src/ios | ||
|
||
package_cordova_plugin: | ||
runs-on: ubuntu-latest | ||
needs: [initial_release, build_uniffi, build_lipo_asset] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v1 | ||
with: | ||
submodules: true | ||
|
||
- name: Download jni libs | ||
uses: actions/download-artifact@v1 | ||
with: | ||
name: jniLibs | ||
|
||
- name: make libs directory | ||
run: mkdir -p src/chain-wallet-libs/bindings/wallet-cordova/src/android/libs | ||
|
||
- name: Copy libs | ||
run: cp -r jniLibs/* src/chain-wallet-libs/bindings/wallet-cordova/src/android/libs | ||
|
||
- name: rename arm64-v8a | ||
working-directory: ./src/chain-wallet-libs/bindings/wallet-cordova/src/android/libs | ||
run: mv aarch64-linux-android arm64-v8a | ||
|
||
- name: rename armv7-linux-androideabi | ||
working-directory: ./src/chain-wallet-libs/bindings/wallet-cordova/src/android/libs | ||
run: mv armv7-linux-androideabi armeabi-v7a | ||
|
||
- name: rename i686-linux-android | ||
working-directory: ./src/chain-wallet-libs/bindings/wallet-cordova/src/android/libs | ||
run: mv i686-linux-android x86 | ||
|
||
- name: rename x86_64 | ||
working-directory: ./src/chain-wallet-libs/bindings/wallet-cordova/src/android/libs | ||
run: mv x86_64-linux-android x86_64 | ||
|
||
- name: Install uniffi | ||
uses: actions-rs/[email protected] | ||
with: | ||
crate: uniffi_bindgen | ||
version: 0.21.1 | ||
use-tool-cache: true | ||
|
||
- name: copy java definitions from jni | ||
run: python3 ./src/chain-wallet-libs/bindings/wallet-cordova/scripts/copy_jni_definitions.py | ||
|
||
- name: Download artifact with universal lib | ||
uses: actions/download-artifact@v1 | ||
with: | ||
name: iosLibs | ||
|
||
- name: Copy universal lib to plugin's directory | ||
run: cp -r iosLibs/* src/chain-wallet-libs/bindings/wallet-cordova/src/ios | ||
|
||
- name: setup node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.x | ||
|
||
- name: package module | ||
run: npm pack ./src/chain-wallet-libs/bindings/wallet-cordova | ||
|
||
- name: rename-tarball | ||
run: | | ||
find ./src/chain-wallet-libs -name wallet-cordova-plugin*.tgz -exec mv {} {} \; | ||
mv wallet-cordova-plugin*.tgz wallet-cordova-plugin-${{ needs.initial_release.outputs.version }}.tgz | ||
ls | ||
- name: Upload binaries to release | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.initial_release.outputs.upload_url }} | ||
asset_path: ./wallet-cordova-plugin-${{ needs.initial_release.outputs.version }}.tgz | ||
asset_name: wallet-cordova-plugin-${{ needs.initial_release.outputs.version }}.tgz | ||
asset_content_type: application/gzip |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -127,7 +127,7 @@ jobs: | |
|
||
# We are excluding cat-dat-service and event-db because we are already running it with Earthly | ||
- name: Build and archive tests | ||
run: | | ||
run: | | ||
cargo nextest archive \ | ||
--workspace \ | ||
--exclude vitup \ | ||
|
@@ -138,8 +138,13 @@ jobs: | |
--exclude vit-servicing-station-server \ | ||
--exclude vit-servicing-station-tests \ | ||
--exclude vit-servicing-station-lib \ | ||
--exclude vit-servicing-station-cli-f10 \ | ||
--exclude vit-servicing-station-server-f10 \ | ||
--exclude vit-servicing-station-tests-f10 \ | ||
--exclude vit-servicing-station-lib-f10 \ | ||
--exclude cat-data-service \ | ||
--exclude event-db \ | ||
--exclude wallet-uniffi \ | ||
--archive-file nextest-archive.tar.zst | ||
- name: Save test archive | ||
|
@@ -210,6 +215,8 @@ jobs: | |
path: | | ||
target/debug/vit-servicing-station-cli | ||
target/debug/vit-servicing-station-server | ||
target/debug/vit-servicing-station-cli-f10 | ||
target/debug/vit-servicing-station-server-f10 | ||
target/debug/jcli | ||
target/debug/jormungandr | ||
target/debug/explorer | ||
|
@@ -220,7 +227,7 @@ jobs: | |
|
||
- name: Install cargo-make | ||
run: cargo install --force cargo-make | ||
|
||
- name: Install refinery | ||
run: cargo install refinery_cli | ||
|
||
|
@@ -231,7 +238,7 @@ jobs: | |
- name: Build external dependencies | ||
if: steps.deps-cache.outputs.cache-hit != 'true' | ||
run: | ||
cargo build -p vit-servicing-station-cli -p vit-servicing-station-server -p jcli -p jormungandr -p explorer | ||
cargo build -p vit-servicing-station-cli -p vit-servicing-station-server -p vit-servicing-station-cli-f10 -p vit-servicing-station-server-f10 -p jcli -p jormungandr -p explorer | ||
|
||
- name: Setup Event DB | ||
env: | ||
|
@@ -241,7 +248,7 @@ jobs: | |
# We are excluding cat-dat-service and event-db because we are already running it with Earthly | ||
- name: Build and archive tests | ||
if: steps.archive-cache.outputs.cache-hit != 'true' | ||
run: | | ||
run: | | ||
cargo nextest archive \ | ||
--workspace \ | ||
--exclude vitup \ | ||
|
@@ -252,8 +259,13 @@ jobs: | |
--exclude vit-servicing-station-server \ | ||
--exclude vit-servicing-station-tests \ | ||
--exclude vit-servicing-station-lib \ | ||
--exclude vit-servicing-station-cli-f10 \ | ||
--exclude vit-servicing-station-server-f10 \ | ||
--exclude vit-servicing-station-tests-f10 \ | ||
--exclude vit-servicing-station-lib-f10 \ | ||
--exclude cat-data-service \ | ||
--exclude event-db \ | ||
--exclude wallet-uniffi \ | ||
--archive-file nextest-archive.tar.zst | ||
- name: Run Catalyst Core tests | ||
|
@@ -374,11 +386,18 @@ jobs: | |
run: | ||
sudo apt install -y protobuf-compiler libssl-dev libpq-dev libsqlite3-dev pkg-config | ||
|
||
- name: Install uniffi | ||
uses: actions-rs/[email protected] | ||
with: | ||
crate: uniffi_bindgen | ||
version: 0.21.1 | ||
use-tool-cache: true | ||
|
||
- name: Clippy and fmt | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{env.RUST_LATEST_STABLE_VERSION}} | ||
components: rustfmt, clippy | ||
|
||
- run: rustup component add clippy | ||
- run: scripts/check-fmt.sh |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,6 +107,7 @@ result* | |
.vscode | ||
**/.idea/ | ||
.temp/ | ||
tests/tmp/ | ||
|
||
# std | ||
.std | ||
|
Oops, something went wrong.