This repository has been archived by the owner on Jun 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(kotlin): rust binding Signed-off-by: Yuhang Shi <[email protected]> * [skip ci] cleanup Signed-off-by: Yuhang Shi <[email protected]> * initial Signed-off-by: Yuhang Shi <[email protected]> * [skip ci] Signed-off-by: Yuhang Shi <[email protected]> * ; publish Signed-off-by: Yuhang Shi <[email protected]> * ; Signed-off-by: Yuhang Shi <[email protected]> * rename Signed-off-by: Yuhang Shi <[email protected]> * [skip ci] Signed-off-by: Yuhang Shi <[email protected]> * bump: flappy Signed-off-by: Yuhang Shi <[email protected]> * fix: server-id Signed-off-by: Yuhang Shi <[email protected]> * ; Signed-off-by: Yuhang Shi <[email protected]> * ;;; Signed-off-by: Yuhang Shi <[email protected]> * [skip ci] fix: last Signed-off-by: Yuhang Shi <[email protected]> * ; Signed-off-by: Yuhang Shi <[email protected]> * refactor Signed-off-by: Yuhang Shi <[email protected]> * sandbox Signed-off-by: Yuhang Shi <[email protected]> * refactor Signed-off-by: Yuhang Shi <[email protected]> * chore: update readme Signed-off-by: Yuhang Shi <[email protected]> * ; deploy Signed-off-by: Yuhang Shi <[email protected]> * ; publish Signed-off-by: Yuhang Shi <[email protected]> * ; javadoc and source Signed-off-by: Yuhang Shi <[email protected]> * ; Signed-off-by: Yuhang Shi <[email protected]> * ; gpg Signed-off-by: Yuhang Shi <[email protected]> * fix: last Signed-off-by: Yuhang Shi <[email protected]> * fix: ci Signed-off-by: Yuhang Shi <[email protected]> * feat: flapp prefix Signed-off-by: Yuhang Shi <[email protected]> * remove path-ignore Signed-off-by: Yuhang Shi <[email protected]> --------- Signed-off-by: Yuhang Shi <[email protected]>
- Loading branch information
Yuhang Shi
authored
Oct 13, 2023
1 parent
45cc1a3
commit 7fd940a
Showing
48 changed files
with
2,605 additions
and
54 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
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,178 @@ | ||
|
||
name: Java Bindings Publish | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [main] | ||
paths: | ||
- 'packages/rust-core/java/pom.xml' | ||
|
||
defaults: | ||
run: | ||
working-directory: packages/rust-core/java | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
check_if_need_release: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
release: ${{ steps.compare_version.outputs.release }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK 8 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '8' | ||
cache: 'maven' | ||
|
||
- name: Compare version | ||
id: compare_version | ||
run: | | ||
new_version=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout) | ||
versions=$(curl https://repo1.maven.org/maven2/com/pleisto/flappy/maven-metadata.xml | awk -F'[><]' '/<version>/{print $3}') | ||
echo "current version: $new_version" | ||
echo $versions | ||
if [ -z "${versions[@]}" ]; then | ||
echo "version is empty" | ||
exit 1 | ||
fi | ||
if [[ "${versions[@]}" =~ "${new_version}" ]]; then | ||
echo "Version is exist." | ||
echo "release=no" >> "$GITHUB_OUTPUT" | ||
else | ||
echo "Version is not exist." | ||
echo "release=yes" >> "$GITHUB_OUTPUT" | ||
fi | ||
stage-snapshot: | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 60 | ||
needs: [check_if_need_release] | ||
if: needs.check_if_need_release.outputs.release == 'yes' | ||
environment: | ||
name: Maven | ||
strategy: | ||
matrix: | ||
include: | ||
- os: ubuntu-latest | ||
classifier: linux-x86_64 | ||
- os: windows-latest | ||
classifier: windows-x86_64 | ||
- os: macos-latest | ||
classifier: osx-x86_64 | ||
- os: macos-latest | ||
classifier: osx-aarch_64 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK 8 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '8' | ||
cache: 'maven' | ||
server-id: ossrh | ||
server-username: MAVEN_USERNAME | ||
server-password: MAVEN_CENTRAL_TOKEN | ||
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} | ||
gpg-passphrase: MAVEN_GPG_PASSPHRASE | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Local staging | ||
shell: bash | ||
run: | | ||
./mvnw verify org.sonatype.plugins:nexus-staging-maven-plugin:deploy \ | ||
-DskipTests=true \ | ||
-Djni.classifier=${{ matrix.classifier }} \ | ||
-Dcargo-build.profile=release \ | ||
-DaltStagingDirectory=local-staging \ | ||
-DskipRemoteStaging=true \ | ||
-DserverId=ossrh \ | ||
-DnexusUrl=https://s01.oss.sonatype.org | ||
env: | ||
MAVEN_USERNAME: ${{ vars.ORG_GRADLE_PROJECT_MAVENCENTRALUSERNAME }} | ||
MAVEN_CENTRAL_TOKEN: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALPASSWORD }} | ||
MAVEN_GPG_PASSPHRASE: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEYPASSWORD }} | ||
|
||
- name: Upload local staging directory | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ matrix.classifier }}-local-staging | ||
path: packages/rust-core/java/local-staging | ||
if-no-files-found: error | ||
|
||
deploy-staged-snapshots: | ||
runs-on: ubuntu-latest | ||
needs: [check_if_need_release, stage-snapshot] | ||
if: needs.check_if_need_release.outputs.release == 'yes' | ||
timeout-minutes: 60 | ||
environment: | ||
name: Maven | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK 8 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '8' | ||
cache: 'maven' | ||
server-id: ossrh | ||
server-username: MAVEN_USERNAME | ||
server-password: MAVEN_CENTRAL_TOKEN | ||
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} | ||
gpg-passphrase: MAVEN_GPG_PASSPHRASE | ||
|
||
- name: Prepare environment variables | ||
run: echo "LOCAL_STAGING_DIR=$HOME/local-staging" >> $GITHUB_ENV | ||
|
||
- name: Download windows staging directory | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: windows-x86_64-local-staging | ||
path: ~/windows-x86_64-local-staging | ||
- name: Download linux staging directory | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: linux-x86_64-local-staging | ||
path: ~/linux-x86_64-local-staging | ||
- name: Download darwin staging directory | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: osx-x86_64-local-staging | ||
path: ~/osx-x86_64-local-staging | ||
- name: Download darwin (aarch64) staging directory | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: osx-aarch_64-local-staging | ||
path: ~/osx-aarch_64-local-staging | ||
|
||
- name: Merge staging repositories | ||
run: | | ||
bash tools/merge_local_staging.sh $LOCAL_STAGING_DIR/staging \ | ||
~/windows-x86_64-local-staging/staging \ | ||
~/linux-x86_64-local-staging/staging \ | ||
~/osx-x86_64-local-staging/staging \ | ||
~/osx-aarch_64-local-staging/staging | ||
- name: Deploy local staged artifacts | ||
run: | | ||
./mvnw org.sonatype.plugins:nexus-staging-maven-plugin:deploy-staged \ | ||
-DaltStagingDirectory=$LOCAL_STAGING_DIR \ | ||
-DskipStagingRepositoryClose=true \ | ||
-DserverId=ossrh \ | ||
-DnexusUrl=https://s01.oss.sonatype.org | ||
env: | ||
MAVEN_USERNAME: ${{ vars.ORG_GRADLE_PROJECT_MAVENCENTRALUSERNAME }} | ||
MAVEN_CENTRAL_TOKEN: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALPASSWORD }} | ||
MAVEN_GPG_PASSPHRASE: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEYPASSWORD }} |
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,43 @@ | ||
name: Java Bindings Test | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
paths: | ||
- 'packages/rust-core/common/**' | ||
- 'packages/rust-core/java/**' | ||
- 'packages/rust-core/Cargo.toml' | ||
- '.github/workflows/java-bindings-test.yml' | ||
|
||
defaults: | ||
run: | ||
working-directory: packages/rust-core/java | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
ci: | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 30 | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
# - macos-latest | ||
# - windows-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK 8 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '8' | ||
cache: 'maven' | ||
|
||
- name: Install | ||
run: ./mvnw clean install -DskipTests -Dgpg.skip | ||
|
||
- name: Test | ||
run: ./mvnw verify -Dgpg.skip |
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
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
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
Oops, something went wrong.