diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9847fe6..78874b3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,14 +16,20 @@ jobs: uses: actions/checkout@v2 with: submodules: 'true' + - name: Enable KVM + if: matrix.os == 'ubuntu-latest' + run: | + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules + sudo udevadm control --reload-rules + sudo udevadm trigger --name-match=kvm - name: Cached Konan - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.konan key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} restore-keys: ${{ runner.os }}-konan- - name: Cached Gradle - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.gradle key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} @@ -36,7 +42,7 @@ jobs: echo "ANDROID_NDK_VERSION=25.2.9519653" >> $GITHUB_ENV - name: Cached Android NDK if: matrix.os != 'windows-latest' - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ${{ format('{0}/ndk/{1}', env.ANDROID_HOME, env.ANDROID_NDK_VERSION) }} key: ${{ runner.os }}-android-ndk-${{ env.ANDROID_NDK_VERSION }} @@ -47,7 +53,7 @@ jobs: rm.exe "C:/WINDOWS/system32/bash.EXE" - name: Install Automake if: matrix.os == 'macOS-latest' - run: brew install automake + run: brew install automake libtool - name: Install Automake (windows) if: matrix.os == 'windows-latest' uses: msys2/setup-msys2@v2 @@ -69,9 +75,10 @@ jobs: run: | echo "skip.android=true" > local.properties - name: Set up JDK 11 - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: - java-version: 11 + java-version: 17 + distribution: 'adopt' - name: Check JVM if: matrix.os != 'windows-latest' run: ./gradlew jvmTest @@ -88,7 +95,7 @@ jobs: shell: bash run: ./gradlew iosX64Test - name: Check Android - if: matrix.os == 'macOS-latest' + if: matrix.os == 'ubuntu-latest' uses: reactivecircus/android-emulator-runner@v2 with: api-level: 27 @@ -99,7 +106,7 @@ jobs: - name: Publish Linux if: matrix.os == 'ubuntu-latest' shell: bash - run: ./gradlew publishLinuxX64PublicationToMavenLocal :jni:jvm:linux:publishJvmPublicationToMavenLocal + run: ./gradlew publishAndroidPublicationToMavenLocal publishLinuxX64PublicationToMavenLocal :jni:jvm:linux:publishJvmPublicationToMavenLocal - name: Publish Windows if: matrix.os == 'windows-latest' shell: msys2 {0} @@ -112,10 +119,27 @@ jobs: run: | mkdir -p maven-local/release cp -r ~/.m2/repository/* maven-local/release - - name: Upload artifacts - uses: actions/upload-artifact@v2 + - name: Upload linux artifacts + if: matrix.os == 'ubuntu-latest' + uses: actions/upload-artifact@v4 + with: + name: release-linux + path: | + maven-local + !maven-local/**/maven-metadata-local.xml + - name: Upload macos artifacts + if: matrix.os == 'macOS-latest' + uses: actions/upload-artifact@v4 with: - name: release + name: release-macos path: | maven-local !maven-local/**/maven-metadata-local.xml + - name: Upload windows artifacts + if: matrix.os == 'windows-latest' + uses: actions/upload-artifact@v4 + with: + name: release-windows + path: | + maven-local + !maven-local/**/maven-metadata-local.xml \ No newline at end of file diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index f6ba47d..6cbaf61 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -22,17 +22,23 @@ jobs: os: [ubuntu-latest, macOS-latest, windows-latest] steps: - name: Check out - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: 'true' + - name: Enable KVM + if: matrix.os == 'ubuntu-latest' + run: | + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules + sudo udevadm control --reload-rules + sudo udevadm trigger --name-match=kvm - name: Cached Konan - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.konan key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} restore-keys: ${{ runner.os }}-konan- - name: Cached Gradle - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.gradle key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} @@ -45,7 +51,7 @@ jobs: echo "ANDROID_NDK_VERSION=25.2.9519653" >> $GITHUB_ENV - name: Cached Android NDK if: matrix.os != 'windows-latest' - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ${{ format('{0}/ndk/{1}', env.ANDROID_HOME, env.ANDROID_NDK_VERSION) }} key: ${{ runner.os }}-android-ndk-${{ env.ANDROID_NDK_VERSION }} @@ -56,7 +62,7 @@ jobs: rm.exe "C:/WINDOWS/system32/bash.EXE" - name: Install Automake if: matrix.os == 'macOS-latest' - run: brew install automake + run: brew install automake libtool - name: Install Automake (windows) if: matrix.os == 'windows-latest' uses: msys2/setup-msys2@v2 @@ -78,9 +84,10 @@ jobs: run: | echo "skip.android=true" > local.properties - name: Set up JDK 11 - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: - java-version: 11 + java-version: 17 + distribution: 'adopt' - name: Check JVM if: matrix.os != 'windows-latest' run: ./gradlew jvmTest @@ -97,7 +104,7 @@ jobs: shell: bash run: ./gradlew iosX64Test - name: Check Android - if: matrix.os == 'macOS-latest' + if: matrix.os == 'ubuntu-latest' uses: reactivecircus/android-emulator-runner@v2 with: api-level: 27 @@ -108,7 +115,7 @@ jobs: - name: Publish Linux if: matrix.os == 'ubuntu-latest' shell: bash - run: ./gradlew publishLinuxX64PublicationToMavenLocal :jni:jvm:linux:publishJvmPublicationToMavenLocal -PsnapshotNumber=${{ github.run_number }} -PgitRef=${{ github.ref }} + run: ./gradlew publishAndroidPublicationToMavenLocal publishLinuxX64PublicationToMavenLocal :jni:jvm:linux:publishJvmPublicationToMavenLocal -PsnapshotNumber=${{ github.run_number }} -PgitRef=${{ github.ref }} - name: Publish Windows if: matrix.os == 'windows-latest' shell: msys2 {0} @@ -121,11 +128,27 @@ jobs: run: | mkdir -p maven-local/snapshot cp -r ~/.m2/repository/* maven-local/snapshot - - name: Upload artifacts - uses: actions/upload-artifact@v2 + - name: Upload linux artifacts + if: matrix.os == 'ubuntu-latest' + uses: actions/upload-artifact@v4 with: - name: snapshot + name: snapshot-linux path: | maven-local !maven-local/**/maven-metadata-local.xml - + - name: Upload macos artifacts + if: matrix.os == 'macOS-latest' + uses: actions/upload-artifact@v4 + with: + name: snapshot-macos + path: | + maven-local + !maven-local/**/maven-metadata-local.xml + - name: Upload windows artifacts + if: matrix.os == 'windows-latest' + uses: actions/upload-artifact@v4 + with: + name: snapshot-windows + path: | + maven-local + !maven-local/**/maven-metadata-local.xml \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fc3a042..ff6c438 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,17 +28,23 @@ jobs: os: [ubuntu-latest, macOS-latest, windows-latest] steps: - name: Check out - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: 'true' + - name: Enable KVM + if: matrix.os == 'ubuntu-latest' + run: | + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules + sudo udevadm control --reload-rules + sudo udevadm trigger --name-match=kvm - name: Cached Konan - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.konan key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} restore-keys: ${{ runner.os }}-konan- - name: Cached Gradle - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.gradle key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} @@ -51,7 +57,7 @@ jobs: echo "ANDROID_NDK_VERSION=25.2.9519653" >> $GITHUB_ENV - name: Cached Android NDK if: matrix.os != 'windows-latest' - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ${{ format('{0}/ndk/{1}', env.ANDROID_HOME, env.ANDROID_NDK_VERSION) }} key: ${{ runner.os }}-android-ndk-${{ env.ANDROID_NDK_VERSION }} @@ -62,7 +68,7 @@ jobs: rm.exe "C:/WINDOWS/system32/bash.EXE" - name: Install Automake if: matrix.os == 'macOS-latest' - run: brew install automake + run: brew install automake libtool - name: Install Automake (windows) if: matrix.os == 'windows-latest' uses: msys2/setup-msys2@v2 @@ -84,9 +90,10 @@ jobs: run: | echo "skip.android=true" > local.properties - name: Set up JDK 11 - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: - java-version: 11 + java-version: 17 + distribution: 'adopt' - name: Check JVM if: matrix.os != 'windows-latest' run: ./gradlew jvmTest @@ -103,7 +110,7 @@ jobs: shell: bash run: ./gradlew iosX64Test - name: Check Android - if: matrix.os == 'macOS-latest' + if: matrix.os == 'ubuntu-latest' uses: reactivecircus/android-emulator-runner@v2 with: api-level: 27