Skip to content

Commit

Permalink
update GitHub Actions setup.
Browse files Browse the repository at this point in the history
  • Loading branch information
atsushieno committed Dec 14, 2023
1 parent c889c5f commit 7763eee
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 126 deletions.
61 changes: 48 additions & 13 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,60 @@ on:
jobs:
linux-build:
name: build on linux
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v1
uses: actions/checkout@v3
with:
submodules: recursive

# Only for release tags
- name: setup gpg necessities
if: startsWith(github.ref, 'refs/tags/')
shell: bash
run: |
mkdir -p '${{ github.workspace }}'
echo '${{ secrets.GPG_KEY_CONTENTS }}' | base64 -d > '${{ github.workspace }}/${{ secrets.SIGNING_SECRET_KEY_RING_FILE }}'
- name: rewrite build.gradle to require signing on awkward OS
if: startsWith(github.ref, 'refs/tags/') && startsWith(matrix.os, 'macos')
run: |
sed -i "" "s/signing {}/signing { sign(publishing.publications) }/" */build.gradle*
- name: rewrite build.gradle to require signing on standard OS
shell: bash
if: startsWith(github.ref, 'refs/tags/') && !startsWith(matrix.os, 'macos')
run: |
sed -i "s/signing {}/signing { sign(publishing.publications) }/" */build.gradle*
- name: apt update
run: |
sudo apt-get update
- name: set up JDK 11
uses: actions/setup-java@v1
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: temurin
- name: apt install
run: |
echo y | sudo apt-get install doxygen cmake ninja-build libasound2-dev libjack-jackd2-0
- name: stupid NDK setup workaround for GitHub Actions
run: sudo mkdir -p /usr/local/lib/android/sdk/ndk && sudo chmod 777 /usr/local/lib/android/sdk/ndk
- name: build
run: |
./build-rtmidi.sh
./gradlew --warning-mode all build publishToMavenLocal
- name: build RtMidi for Kotlin/Native
run: ./build-rtmidi.sh
- name: build with Gradle (only for non-releases)
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
run: ./gradlew --warning-mode all build
- name: publish with Gradle (only for releases)
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: ./gradlew --warning-mode all publish
env:
OSSRH_USERNAME: atsushieno
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_SECRET_KEY_RING_FILE: ${{ format('{0}/{1}', github.workspace, secrets.SIGNING_SECRET_KEY_RING_FILE) }}

- name: upload build failure logs
if: failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: test-failure-logs
path: |
Expand All @@ -42,11 +71,17 @@ jobs:
ktmidi-jvm-desktop/*.log
- name: upload artifact
if: success()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ktmidi-artifacts
path: |
ktmidi/build/libs/*.jar
ktmidi/build/outputs/aar/*.aar
ktmidi-native-ext/build/bin
ktmidi-jvm-desktop/build/libs/*.jar
- name: deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ktmidi/build/dokka/html
76 changes: 0 additions & 76 deletions .github/workflows/actions_package_reg.yml

This file was deleted.

37 changes: 0 additions & 37 deletions .github/workflows/m2_settings.xml

This file was deleted.

0 comments on commit 7763eee

Please sign in to comment.