generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 17
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 kendall/bind-wasm-starter
* main: Revert Revert Remove reqwest dependency (#366) Revert "Remove reqwest dependency (#354)" (#365) Remove reqwest dependency (#354) [TBD Release Manager 🚀] Setting next development version after 0.0.5 to: 0.0.0-main-SNAPSHOT [TBD Release Manager 🚀] Setting version to: 0.0.5 Update release workflow (#362) [TBD Release Manager 🚀] Setting next development version after 0.0.1 to: 0.0.0-main-SNAPSHOT [TBD Release Manager 🚀] Setting version to: 0.0.1 remove circular dependency (#360) Artifact Publishing (#358)
- Loading branch information
Showing
10 changed files
with
1,289 additions
and
166 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 |
---|---|---|
|
@@ -4,59 +4,26 @@ on: | |
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Version of Kotlin binary to publish to TBD Artifactory. For example "1.0.0" will result in "1.0.0-SNAPSHOT". If not supplied, will default to "commit-$shortSHA-SNAPSHOT" where $shortSHA is the shortform commit SHA.' | ||
description: 'Version of Kotlin binary to publish to TBD Artifactory. For example "1.0.0-SNAPSHOT". If not supplied, will default to "commit-$shortSHA-SNAPSHOT" where $shortSHA is the shortform commit SHA. Must end in "-SNAPSHOT".' | ||
required: false | ||
default: "0.0.0-SNAPSHOT" | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_call: | ||
inputs: | ||
version: | ||
description: 'Version of Kotlin binary to publish to TBD Artifactory. For example "1.0.0" will result in "1.0.0-SNAPSHOT". If not supplied, will default to "commit-$shortSHA-SNAPSHOT" where $shortSHA is the shortform commit SHA.' | ||
description: 'Version of Kotlin binary to publish to TBD Artifactory. For example "1.0.0-SNAPSHOT". If not supplied, will default to "commit-$shortSHA-SNAPSHOT" where $shortSHA is the shortform commit SHA. Must end in "-SNAPSHOT".' | ||
required: true | ||
type: string | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
# Make sure CI fails on all warnings, including Clippy lints | ||
RUSTFLAGS: "-Dwarnings" | ||
WEB5_SDK_LOG_LEVEL: debug | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Init Hermit | ||
uses: cashapp/activate-hermit@v1 | ||
with: | ||
cache: true | ||
- name: Lint | ||
run: just lint | ||
|
||
msrv: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
rust: [stable] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- name: Init Hermit | ||
uses: cashapp/activate-hermit@v1 | ||
with: | ||
cache: true | ||
- name: Setup | ||
run: just setup | ||
- name: Install MSRV | ||
run: cargo install cargo-msrv | ||
- name: MSRV | ||
run: cargo msrv --path crates/web5/ verify | ||
|
||
test: | ||
permissions: | ||
id-token: write | ||
|
@@ -193,84 +160,47 @@ jobs: | |
- name: Build the library | ||
run: | | ||
cargo build --target x86_64-pc-windows-msvc --release --package web5_uniffi | ||
mkdir -p bound/kt/src/main/resources/ | ||
mkdir -p bound/kt/src/main/resources | ||
cp target/x86_64-pc-windows-msvc/release/web5_uniffi.dll bound/kt/src/main/resources/web5_uniffi_x86_64_pc_windows_msvc.dll | ||
- name: Upload .dll | ||
uses: actions/[email protected] | ||
with: | ||
name: x86_64-pc-windows-msvc-dll | ||
path: bound/kt/src/main/resources/web5_uniffi_x86_64_pc_windows_msvc.dll | ||
|
||
kotlin-acceptance-testing: | ||
permissions: | ||
id-token: write | ||
needs: | ||
- build_aarch64_apple_darwin | ||
- build_x86_64_apple_darwin | ||
- build_x86_64_unknown_linux_gnu | ||
- build_x86_64_unknown_linux_musl | ||
- build_x86_64_pc_windows_msvc | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, macos-12, windows-latest] | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Init Hermit | ||
uses: cashapp/activate-hermit@v1 | ||
with: | ||
submodules: true | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: "adopt" | ||
java-version: "11" | ||
# Cache Maven repo | ||
- uses: actions/cache@v3 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
# Package up the native binaries | ||
#TODO Centralize this block as we re-use it via copy/paste right now | ||
- name: Download MacOS aarch64 Native Library | ||
uses: actions/[email protected] | ||
with: | ||
name: aarch64-apple-darwin-dylib | ||
path: bound/kt/src/main/resources/ | ||
- name: Download MacOS x86_64 Native Library | ||
uses: actions/[email protected] | ||
with: | ||
name: x86_64-apple-darwin-dylib | ||
path: bound/kt/src/main/resources/ | ||
- name: Download Linux x86_64 GNU Native Library | ||
uses: actions/[email protected] | ||
with: | ||
name: x86_64-unknown-linux-gnu-so | ||
path: bound/kt/src/main/resources/ | ||
- name: Download Linux x86_64 MUSL Native Library | ||
uses: actions/[email protected] | ||
with: | ||
name: x86_64-unknown-linux-musl-so | ||
path: bound/kt/src/main/resources/ | ||
- name: Download Windows x86_64 MSVC Native Library | ||
uses: actions/[email protected] | ||
with: | ||
name: x86_64-pc-windows-msvc-dll | ||
path: bound/kt/src/main/resources/ | ||
- name: Run Maven Tests | ||
run: | | ||
cd bound/kt/ | ||
mvn test --batch-mode | ||
- name: Upload test coverage to Codecov | ||
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 #v4.5.0 | ||
cache: true | ||
- name: Setup | ||
run: just setup | ||
- name: Lint | ||
run: just lint | ||
|
||
rust-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Init Hermit | ||
uses: cashapp/activate-hermit@v1 | ||
with: | ||
use_oidc: true | ||
working-directory: bound/kt | ||
files: target/kover/test.ic | ||
cache: true | ||
- name: Setup | ||
run: just setup | ||
- name: Test | ||
run: just test | ||
|
||
kotlin-deploy-snapshot: | ||
kotlin-build-test-deploy-snapshot: | ||
needs: | ||
- kotlin-acceptance-testing | ||
- build_aarch64_apple_darwin | ||
- build_x86_64_apple_darwin | ||
- build_x86_64_unknown_linux_gnu | ||
- build_x86_64_unknown_linux_musl | ||
- build_x86_64_pc_windows_msvc | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -366,22 +296,69 @@ jobs: | |
SIGN_KEY_PASS: ${{ secrets.GPG_SECRET_PASSPHRASE }} | ||
SIGN_KEY: ${{ secrets.GPG_SECRET_KEY }} | ||
|
||
- name: Upload Kotlin Test Vector Results | ||
- name: Upload Kotlin Test Results | ||
uses: actions/[email protected] | ||
with: | ||
name: kotlin-test-results | ||
path: bound/kt/target/surefire-reports/*.xml | ||
|
||
- name: Upload web5 w/ Dependencies JAR | ||
uses: actions/[email protected] | ||
with: | ||
name: web5-with-dependencies-jar | ||
path: bound/kt/target/*-with-dependencies.jar | ||
|
||
kotlin-acceptance-test: | ||
needs: kotlin-build-test-deploy-snapshot | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-latest, macos-latest, macos-12, windows-latest ] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: "adopt" | ||
java-version: "11" | ||
- name: Download web5 w/ Dependencies JAR | ||
uses: actions/[email protected] | ||
with: | ||
name: web5-with-dependencies-jar | ||
path: tests/jvm | ||
- name: Run Acceptance Tests (Non-Windows) | ||
if: matrix.os != 'windows-latest' | ||
shell: bash | ||
run: | | ||
cd tests/jvm | ||
mv *-with-dependencies.jar web5-with-dependencies.jar | ||
javac Web5AcceptanceTest.java -cp web5-with-dependencies.jar | ||
java -classpath web5-with-dependencies.jar:. Web5AcceptanceTest | ||
- name: Run Acceptance Tests (Windows) | ||
if: matrix.os == 'windows-latest' | ||
shell: cmd | ||
run: | | ||
cd tests/jvm | ||
ren *-with-dependencies.jar web5-with-dependencies.jar | ||
javac Web5AcceptanceTest.java -cp web5-with-dependencies.jar | ||
java -classpath web5-with-dependencies.jar;. Web5AcceptanceTest | ||
rust-test-vectors: | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- name: Install Rust 1.75.0 | ||
run: rustup toolchain install 1.75.0 | ||
- name: Set Rust 1.75.0 as default | ||
run: rustup default 1.75.0 | ||
- name: Init Hermit | ||
uses: cashapp/activate-hermit@v1 | ||
with: | ||
cache: true | ||
- name: Setup | ||
run: just setup | ||
- name: Install latest stable Rust | ||
run: rustup install stable && rustup default stable | ||
- name: Install Nextest | ||
run: cargo install cargo-nextest | ||
- name: Create nextest.toml | ||
|
Oops, something went wrong.