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:
28
.github/workflows/test.yml
vendored
28
.github/workflows/test.yml
vendored
@@ -44,11 +44,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) }}
|
||||
@@ -58,6 +60,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:
|
||||
@@ -69,18 +84,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'
|
||||
|
||||
Reference in New Issue
Block a user