From 9116030aaba4739b942e6db5a91ffa62d8a83fdd Mon Sep 17 00:00:00 2001 From: Neal Date: Wed, 18 Sep 2024 13:26:21 -0700 Subject: [PATCH] updates to version --- .github/workflows/build-cli.yml | 12 ++-- .github/workflows/ci.yml | 107 ++++++++++++++++++-------------- .github/workflows/release.yaml | 12 ++-- 3 files changed, 75 insertions(+), 56 deletions(-) diff --git a/.github/workflows/build-cli.yml b/.github/workflows/build-cli.yml index 76e8d317..fa0d1a02 100644 --- a/.github/workflows/build-cli.yml +++ b/.github/workflows/build-cli.yml @@ -12,8 +12,10 @@ jobs: name: Build aarch64-apple-darwin target steps: - uses: actions/checkout@v2 - - name: Install Rust - run: rustup toolchain install stable + - name: Install Rust 1.74.0 + run: rustup toolchain install 1.74.0 + - name: Set Rust 1.74.0 as default + run: rustup default 1.74.0 - name: Run Build Script run: | cd crates/web5_cli/build/aarch64_apple_darwin @@ -29,8 +31,10 @@ jobs: name: Build x86_64-apple-darwin target steps: - uses: actions/checkout@v2 - - name: Install Rust - run: rustup toolchain install stable + - name: Install Rust 1.74.0 + run: rustup toolchain install 1.74.0 + - name: Set Rust 1.74.0 as default + run: rustup default 1.74.0 - name: Run Build Script run: | cd crates/web5_cli/build/x86_64_apple_darwin diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 66764e4b..636a090b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,8 +67,10 @@ jobs: name: Build aarch64-apple-darwin target steps: - uses: actions/checkout@v2 - - name: Install Rust - run: rustup toolchain install stable + - name: Install Rust 1.74.0 + run: rustup toolchain install 1.74.0 + - name: Set Rust 1.74.0 as default + run: rustup default 1.74.0 - name: Run Build Script run: | cd bindings/web5_uniffi/libtargets/aarch64_apple_darwin @@ -88,8 +90,10 @@ jobs: name: Build x86_64-apple-darwin target steps: - uses: actions/checkout@v2 - - name: Install Rust - run: rustup toolchain install stable + - name: Install Rust 1.74.0 + run: rustup toolchain install 1.74.0 + - name: Set Rust 1.74.0 as default + run: rustup default 1.74.0 - name: Run Build Script run: | cd bindings/web5_uniffi/libtargets/x86_64_apple_darwin @@ -147,8 +151,10 @@ jobs: name: Build x86_64-pc-windows-msvc target steps: - uses: actions/checkout@v2 - - name: Install Rust - run: rustup toolchain install stable + - name: Install Rust 1.74.0 + run: rustup toolchain install 1.74.0 + - name: Set Rust 1.74.0 as default + run: rustup default 1.74.0 - name: Add MSVC target run: rustup target add x86_64-pc-windows-msvc - name: Build the library @@ -188,6 +194,43 @@ jobs: - name: Test run: just test + 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/download-artifact@v4.1.7 + 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 + kotlin-build-test-deploy-snapshot: needs: - build_aarch64_apple_darwin @@ -195,6 +238,7 @@ jobs: - build_x86_64_unknown_linux_gnu - build_x86_64_unknown_linux_musl - build_x86_64_pc_windows_msvc + - kotlin-acceptance-test runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -219,7 +263,11 @@ jobs: run: | # Version resolution: use provided if [ -n "${{ github.event.inputs.version }}" ]; then - resolvedVersion=${{ github.event.inputs.version }} + if [[ "${{ github.event.inputs.version }}" != *-SNAPSHOT ]]; then + resolvedVersion="${{ github.event.inputs.version }}-SNAPSHOT" + else + resolvedVersion="${{ github.event.inputs.version }}" + fi # Otherwise, construct a version for deployment in form X.Y.Z-commit-$shortSHA-SNAPSHOT else longSHA=$(git rev-parse --verify HEAD) @@ -298,53 +346,16 @@ jobs: 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/download-artifact@v4.1.7 - 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: Install Rust 1.74.0 + run: rustup toolchain install 1.74.0 + - name: Set Rust 1.74.0 as default + run: rustup default 1.74.0 - name: Install Nextest run: cargo install cargo-nextest - name: Create nextest.toml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 81e5a554..15539a14 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -25,8 +25,10 @@ jobs: name: aarch64-apple-darwin steps: - uses: actions/checkout@v2 - - name: Install Rust - run: rustup toolchain install stable + - name: Install Rust 1.74.0 + run: rustup toolchain install 1.74.0 + - name: Set Rust 1.74.0 as default + run: rustup default 1.74.0 - name: cargo build run: | cargo build --target aarch64-apple-darwin --release --package web5_cli @@ -42,8 +44,10 @@ jobs: name: x86_64-apple-darwin steps: - uses: actions/checkout@v2 - - name: Install Rust - run: rustup toolchain install stable + - name: Install Rust 1.74.0 + run: rustup toolchain install 1.74.0 + - name: Set Rust 1.74.0 as default + run: rustup default 1.74.0 - name: cargo build run: | cargo build --target x86_64-apple-darwin --release --package web5_cli