Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
Full flow
Browse files Browse the repository at this point in the history
  • Loading branch information
KendallWeihe committed Jul 22, 2024
1 parent d792039 commit fe985a6
Show file tree
Hide file tree
Showing 8 changed files with 69 additions and 198 deletions.
75 changes: 0 additions & 75 deletions .github/workflows/bound-kt-ci.yml

This file was deleted.

48 changes: 0 additions & 48 deletions .github/workflows/gh-mvn.yml

This file was deleted.

142 changes: 68 additions & 74 deletions .github/workflows/gh-mvn-2.yml → .github/workflows/publish-kt.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Shared Libraries
name: Publish Kotlin Library

on:
push:
Expand All @@ -12,12 +12,12 @@ jobs:
name: Build aarch64-apple-darwin target
steps:
- uses: actions/checkout@v2
# - name: Install Rust
# run: rustup toolchain install stable
# - name: Run Build Script
# run: |
# cd bindings/tbdex_uniffi/libtargets/aarch64_apple_darwin
# ./build
- name: Install Rust
run: rustup toolchain install stable
- name: Run Build Script
run: |
cd bindings/tbdex_uniffi/libtargets/aarch64_apple_darwin
./build
- name: Upload .dylib
uses: actions/upload-artifact@v3
with:
Expand All @@ -29,12 +29,12 @@ jobs:
name: Build x86_64-apple-darwin target
steps:
- uses: actions/checkout@v2
# - name: Install Rust
# run: rustup toolchain install stable
# - name: Run Build Script
# run: |
# cd bindings/tbdex_uniffi/libtargets/x86_64_apple_darwin
# ./build
- name: Install Rust
run: rustup toolchain install stable
- name: Run Build Script
run: |
cd bindings/tbdex_uniffi/libtargets/x86_64_apple_darwin
./build
- name: Upload .dylib
uses: actions/upload-artifact@v3
with:
Expand All @@ -46,10 +46,10 @@ jobs:
name: Build x86_64-unknown-linux-gnu target
steps:
- uses: actions/checkout@v2
# - name: Run Build Script
# run: |
# cd bindings/tbdex_uniffi/libtargets/x86_64_unknown_linux_gnu
# ./build
- name: Run Build Script
run: |
cd bindings/tbdex_uniffi/libtargets/x86_64_unknown_linux_gnu
./build
- name: Upload .so
uses: actions/upload-artifact@v3
with:
Expand All @@ -61,10 +61,10 @@ jobs:
name: Build x86_64-unknown-linux-musl target
steps:
- uses: actions/checkout@v2
# - name: Run Build Script
# run: |
# cd bindings/tbdex_uniffi/libtargets/x86_64_unknown_linux_musl
# ./build
- name: Run Build Script
run: |
cd bindings/tbdex_uniffi/libtargets/x86_64_unknown_linux_musl
./build
- name: Upload .so
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -111,57 +111,56 @@ jobs:
name: maven-artifact
path: bound/kt/target/

# test_shared_libraries:
# needs: package_artifact
# strategy:
# matrix:
# include:
# - target: aarch64_apple_darwin
# os: macos-latest
# - target: x86_64_apple_darwin
# os: macos-12
# - target: x86_64_unknown_linux_gnu
# os: ubuntu-latest
# - target: x86_64_unknown_linux_musl
# os: ubuntu-latest
# name: Test on ${{ matrix.target }}
# runs-on: ${{ matrix.os }}
# steps:
# - uses: actions/checkout@v2
# - name: Download Maven artifact
# uses: actions/download-artifact@v3
# with:
# name: maven-artifact
# path: bound/kt/target/
# - name: Set up JDK 11
# uses: actions/setup-java@v3
# with:
# distribution: "adopt"
# java-version: "11"
# - name: Run tests on macOS and Ubuntu
# if: ${{ matrix.target != 'x86_64_unknown_linux_musl' }}
# run: |
# cd bound/kt
# mvn '-Dtest=SystemArchitectureTest#can load shared library' test
# - name: Run tests on Alpine for x86_64_unknown_linux_musl
# if: ${{ matrix.target == 'x86_64_unknown_linux_musl' }}
# run: |
# sudo apt-get update
# sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
# sudo apt-get update
# sudo apt-get install -y docker-ce docker-ce-cli containerd.io
# docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace \
# alpine:latest /bin/sh -c "\
# apk update && apk add openjdk11 && apk add maven && \
# cd bound/kt && \
# mvn '-Dtest=SystemArchitectureTest#can load shared library' test"
test_shared_libraries:
needs: package_artifact
strategy:
matrix:
include:
- target: aarch64_apple_darwin
os: macos-latest
- target: x86_64_apple_darwin
os: macos-12
- target: x86_64_unknown_linux_gnu
os: ubuntu-latest
- target: x86_64_unknown_linux_musl
os: ubuntu-latest
name: Test on ${{ matrix.target }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Download Maven artifact
uses: actions/download-artifact@v3
with:
name: maven-artifact
path: bound/kt/target/
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: "adopt"
java-version: "11"
- name: Run tests on macOS and Ubuntu
if: ${{ matrix.target != 'x86_64_unknown_linux_musl' }}
run: |
cd bound/kt
mvn '-Dtest=SystemArchitectureTest#can load shared library' test
- name: Run tests on Alpine for x86_64_unknown_linux_musl
if: ${{ matrix.target == 'x86_64_unknown_linux_musl' }}
run: |
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace \
alpine:latest /bin/sh -c "\
apk update && apk add openjdk11 && apk add maven && \
cd bound/kt && \
mvn '-Dtest=SystemArchitectureTest#can load shared library' test"
publish_artifact:
runs-on: ubuntu-latest
# needs: test_shared_libraries
needs: package_artifact
needs: test_shared_libraries
name: Publish Maven Artifact
steps:
- name: Checkout repository
Expand Down Expand Up @@ -195,11 +194,6 @@ jobs:
run: |
cd bound/kt
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "Derived version: $VERSION"
ls target/
echo "Deploying artifact: target/tbdex-core-${VERSION}.jar"
mvn deploy:deploy-file \
-Dfile=target/tbdex-core-${VERSION}.jar \
-DpomFile=pom.xml \
Expand Down
2 changes: 1 addition & 1 deletion bound/kt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>tbdex.sdk</groupId>
<artifactId>tbdex-core</artifactId>
<version>0.0.4</version>
<version>0.0.5</version>
<packaging>jar</packaging>

<distributionManagement>
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit fe985a6

Please sign in to comment.