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

Commit

Permalink
Attempt to publish artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
KendallWeihe committed Jul 22, 2024
1 parent 3bcde1c commit fae89f8
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 43 deletions.
111 changes: 71 additions & 40 deletions .github/workflows/gh-mvn-2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,55 +112,86 @@ 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 }}
# 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
name: Publish Maven Artifact
steps:
- uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
- name: Download Maven artifact
uses: actions/download-artifact@v3
with:
name: maven-artifact
path: bound/kt/target/
- name: Set up JDK 11
- name: Set up Java
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' }}
- name: Set up Maven settings
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' }}
mkdir -p ~/.m2
echo "<settings xmlns=\"http://maven.apache.org/SETTINGS/1.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd\">
<servers>
<server>
<id>github</id>
<username>${{ github.actor }}</username>
<password>${{ secrets.GITHUB_TOKEN }}</password>
</server>
</servers>
</settings>" > ~/.m2/settings.xml
- name: Build and deploy
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
name: Publish Maven Artifact
steps:
- run: echo "hello world"
cd bound/kt
mvn deploy -DskipTests=true
6 changes: 3 additions & 3 deletions bound/kt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>tbdex.sdk.core</groupId>
<artifactId>tbdex-core-kt</artifactId>
<version>0.0.1</version>
<groupId>tbdex.sdk</groupId>
<artifactId>tbdex-core</artifactId>
<version>0.0.2</version>
<packaging>jar</packaging>

<distributionManagement>
Expand Down

0 comments on commit fae89f8

Please sign in to comment.