CI: fix windows tests (#48)
Github Actions modified their windows runners which broke our build. As recommended, we now uses `msys2` on windows and install the packages that we need.
This commit is contained in:
48
.github/workflows/release.yml
vendored
48
.github/workflows/release.yml
vendored
@@ -29,11 +29,13 @@ jobs:
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
|
||||
restore-keys: ${{ runner.os }}-gradle-
|
||||
- name: Android environment
|
||||
if: matrix.os != 'windows-latest'
|
||||
shell: bash
|
||||
run: |
|
||||
echo "ANDROID_HOME=$ANDROID_HOME" >> $GITHUB_ENV
|
||||
echo "ANDROID_NDK_VERSION=21.4.7075529" >> $GITHUB_ENV
|
||||
- name: Cached Android NDK
|
||||
if: matrix.os != 'windows-latest'
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ format('{0}/ndk/{1}', env.ANDROID_HOME, env.ANDROID_NDK_VERSION) }}
|
||||
@@ -43,6 +45,19 @@ jobs:
|
||||
run: |
|
||||
echo "C:\msys64\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
rm.exe "C:/WINDOWS/system32/bash.EXE"
|
||||
- name: Install Automake
|
||||
if: matrix.os == 'macOS-latest'
|
||||
run: brew install automake
|
||||
- name: Install Automake (windows)
|
||||
if: matrix.os == 'windows-latest'
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
path-type: minimal
|
||||
update: true
|
||||
install: >-
|
||||
base-devel
|
||||
autotools
|
||||
mingw-w64-x86_64-gcc
|
||||
- name: Set up JDK 8
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
@@ -54,18 +69,19 @@ jobs:
|
||||
$ANDROID_HOME/tools/bin/sdkmanager "ndk;$ANDROID_NDK_VERSION"
|
||||
- name: Setup Android
|
||||
if: matrix.os == 'windows-latest'
|
||||
shell: bash
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
$ANDROID_HOME\\tools\\bin\\sdkmanager.bat "ndk;$ANDROID_NDK_VERSION"
|
||||
echo "skip.android=true" > local.properties
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
- name: Install Automake
|
||||
if: matrix.os == 'macOS-latest'
|
||||
run: brew install automake
|
||||
- name: Check JVM
|
||||
shell: bash
|
||||
if: matrix.os != 'windows-latest'
|
||||
run: ./gradlew jvmTest
|
||||
- name: Check JVM (Windows)
|
||||
if: matrix.os == 'windows-latest'
|
||||
shell: msys2 {0}
|
||||
run: ./gradlew jvmTest
|
||||
- name: Check Linux
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
@@ -87,27 +103,15 @@ jobs:
|
||||
script: ./gradlew connectedCheck
|
||||
- name: Publish Linux
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
env:
|
||||
BINTRAY_USER: ${{ secrets.bintray_user }}
|
||||
BINTRAY_APIKEY: ${{ secrets.bintray_apikey }}
|
||||
shell: bash
|
||||
# ./gradlew publishLinuxPublicationToBintrayRepository :jni:jvm:linux:publishJvmPublicationToBintrayRepository
|
||||
run: ./gradlew publishLinuxPublicationToMavenLocal :jni:jvm:linux:publishJvmPublicationToMavenLocal
|
||||
- name: Publish Windows
|
||||
if: matrix.os == 'windows-latest'
|
||||
env:
|
||||
BINTRAY_USER: ${{ secrets.bintray_user }}
|
||||
BINTRAY_APIKEY: ${{ secrets.bintray_apikey }}
|
||||
shell: bash
|
||||
# ./gradlew :jni:jvm:mingw:publishJvmPublicationToBintrayRepository
|
||||
shell: msys2 {0}
|
||||
run: ./gradlew :jni:jvm:mingw:publishToMavenLocal
|
||||
- name: Publish MacOS
|
||||
if: matrix.os == 'macOS-latest'
|
||||
env:
|
||||
BINTRAY_USER: ${{ secrets.bintray_user }}
|
||||
BINTRAY_APIKEY: ${{ secrets.bintray_apikey }}
|
||||
shell: bash
|
||||
# ./gradlew publish
|
||||
run: ./gradlew publishToMavenLocal
|
||||
- name: Copy artifact files
|
||||
run: |
|
||||
@@ -120,9 +124,3 @@ jobs:
|
||||
path: |
|
||||
maven-local
|
||||
!maven-local/**/maven-metadata-local.xml
|
||||
# - name: Discard
|
||||
# if: ${{ failure() || cancelled() }}
|
||||
# env:
|
||||
# BINTRAY_USER: ${{ secrets.bintray_user }}
|
||||
# BINTRAY_APIKEY: ${{ secrets.bintray_apikey }}
|
||||
# run: ./gradlew postBintrayDiscard
|
||||
|
||||
Reference in New Issue
Block a user