[citool] run MIDI input callback on kotlinx.coroutines UI thread. #388
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
name: build dist | |
on: | |
push: | |
pull_request: | |
jobs: | |
linux-build: | |
name: build on linux | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: apt update | |
run: | | |
sudo apt-get update | |
- name: set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: temurin | |
- name: apt install | |
run: | | |
echo y | sudo apt-get install doxygen cmake ninja-build libasound2-dev libjack-jackd2-0 | |
# 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: build RtMidi for Kotlin/Native | |
run: ./build-rtmidi.sh | |
# only for NON-releases | |
- name: build with Gradle () | |
if: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
run: ./gradlew --warning-mode all build | |
# only for releases | |
- name: publish with Gradle | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
run: ./gradlew --warning-mode all dokkaHtml 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@v3 | |
with: | |
name: test-failure-logs | |
path: | | |
ktmidi/build/reports/ | |
ktmidi-jvm-desktop/build/reports/ | |
ktmidi/*.log | |
ktmidi-native-ext/*.log | |
ktmidi-jvm-desktop/*.log | |
- name: upload artifact | |
if: success() | |
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 | |
# only for releases | |
- name: deploy to GitHub Pages | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages | |
folder: ktmidi/build/dokka/html |