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:
parent
d074a03f2d
commit
de3fc7fe11
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') }}
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
|
||||||
restore-keys: ${{ runner.os }}-gradle-
|
restore-keys: ${{ runner.os }}-gradle-
|
||||||
- name: Android environment
|
- name: Android environment
|
||||||
|
if: matrix.os != 'windows-latest'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "ANDROID_HOME=$ANDROID_HOME" >> $GITHUB_ENV
|
echo "ANDROID_HOME=$ANDROID_HOME" >> $GITHUB_ENV
|
||||||
echo "ANDROID_NDK_VERSION=21.4.7075529" >> $GITHUB_ENV
|
echo "ANDROID_NDK_VERSION=21.4.7075529" >> $GITHUB_ENV
|
||||||
- name: Cached Android NDK
|
- name: Cached Android NDK
|
||||||
|
if: matrix.os != 'windows-latest'
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ${{ format('{0}/ndk/{1}', env.ANDROID_HOME, env.ANDROID_NDK_VERSION) }}
|
path: ${{ format('{0}/ndk/{1}', env.ANDROID_HOME, env.ANDROID_NDK_VERSION) }}
|
||||||
@ -43,6 +45,19 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "C:\msys64\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
echo "C:\msys64\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||||
rm.exe "C:/WINDOWS/system32/bash.EXE"
|
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
|
- name: Set up JDK 8
|
||||||
uses: actions/setup-java@v1
|
uses: actions/setup-java@v1
|
||||||
with:
|
with:
|
||||||
@ -54,18 +69,19 @@ jobs:
|
|||||||
$ANDROID_HOME/tools/bin/sdkmanager "ndk;$ANDROID_NDK_VERSION"
|
$ANDROID_HOME/tools/bin/sdkmanager "ndk;$ANDROID_NDK_VERSION"
|
||||||
- name: Setup Android
|
- name: Setup Android
|
||||||
if: matrix.os == 'windows-latest'
|
if: matrix.os == 'windows-latest'
|
||||||
shell: bash
|
shell: msys2 {0}
|
||||||
run: |
|
run: |
|
||||||
$ANDROID_HOME\\tools\\bin\\sdkmanager.bat "ndk;$ANDROID_NDK_VERSION"
|
echo "skip.android=true" > local.properties
|
||||||
- name: Set up JDK 11
|
- name: Set up JDK 11
|
||||||
uses: actions/setup-java@v1
|
uses: actions/setup-java@v1
|
||||||
with:
|
with:
|
||||||
java-version: 11
|
java-version: 11
|
||||||
- name: Install Automake
|
|
||||||
if: matrix.os == 'macOS-latest'
|
|
||||||
run: brew install automake
|
|
||||||
- name: Check JVM
|
- 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
|
run: ./gradlew jvmTest
|
||||||
- name: Check Linux
|
- name: Check Linux
|
||||||
if: matrix.os == 'ubuntu-latest'
|
if: matrix.os == 'ubuntu-latest'
|
||||||
@ -87,27 +103,15 @@ jobs:
|
|||||||
script: ./gradlew connectedCheck
|
script: ./gradlew connectedCheck
|
||||||
- name: Publish Linux
|
- name: Publish Linux
|
||||||
if: matrix.os == 'ubuntu-latest'
|
if: matrix.os == 'ubuntu-latest'
|
||||||
env:
|
|
||||||
BINTRAY_USER: ${{ secrets.bintray_user }}
|
|
||||||
BINTRAY_APIKEY: ${{ secrets.bintray_apikey }}
|
|
||||||
shell: bash
|
shell: bash
|
||||||
# ./gradlew publishLinuxPublicationToBintrayRepository :jni:jvm:linux:publishJvmPublicationToBintrayRepository
|
|
||||||
run: ./gradlew publishLinuxPublicationToMavenLocal :jni:jvm:linux:publishJvmPublicationToMavenLocal
|
run: ./gradlew publishLinuxPublicationToMavenLocal :jni:jvm:linux:publishJvmPublicationToMavenLocal
|
||||||
- name: Publish Windows
|
- name: Publish Windows
|
||||||
if: matrix.os == 'windows-latest'
|
if: matrix.os == 'windows-latest'
|
||||||
env:
|
shell: msys2 {0}
|
||||||
BINTRAY_USER: ${{ secrets.bintray_user }}
|
|
||||||
BINTRAY_APIKEY: ${{ secrets.bintray_apikey }}
|
|
||||||
shell: bash
|
|
||||||
# ./gradlew :jni:jvm:mingw:publishJvmPublicationToBintrayRepository
|
|
||||||
run: ./gradlew :jni:jvm:mingw:publishToMavenLocal
|
run: ./gradlew :jni:jvm:mingw:publishToMavenLocal
|
||||||
- name: Publish MacOS
|
- name: Publish MacOS
|
||||||
if: matrix.os == 'macOS-latest'
|
if: matrix.os == 'macOS-latest'
|
||||||
env:
|
|
||||||
BINTRAY_USER: ${{ secrets.bintray_user }}
|
|
||||||
BINTRAY_APIKEY: ${{ secrets.bintray_apikey }}
|
|
||||||
shell: bash
|
shell: bash
|
||||||
# ./gradlew publish
|
|
||||||
run: ./gradlew publishToMavenLocal
|
run: ./gradlew publishToMavenLocal
|
||||||
- name: Copy artifact files
|
- name: Copy artifact files
|
||||||
run: |
|
run: |
|
||||||
@ -120,9 +124,3 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
maven-local
|
maven-local
|
||||||
!maven-local/**/maven-metadata-local.xml
|
!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
|
|
||||||
|
29
.github/workflows/snapshot.yml
vendored
29
.github/workflows/snapshot.yml
vendored
@ -54,6 +54,19 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "C:\msys64\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
echo "C:\msys64\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||||
rm.exe "C:/WINDOWS/system32/bash.EXE"
|
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
|
- name: Set up JDK 8
|
||||||
uses: actions/setup-java@v1
|
uses: actions/setup-java@v1
|
||||||
with:
|
with:
|
||||||
@ -63,15 +76,21 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
$ANDROID_HOME/tools/bin/sdkmanager "ndk;$ANDROID_NDK_VERSION"
|
$ANDROID_HOME/tools/bin/sdkmanager "ndk;$ANDROID_NDK_VERSION"
|
||||||
|
- name: Setup Android
|
||||||
|
if: matrix.os == 'windows-latest'
|
||||||
|
shell: msys2 {0}
|
||||||
|
run: |
|
||||||
|
echo "skip.android=true" > local.properties
|
||||||
- name: Set up JDK 11
|
- name: Set up JDK 11
|
||||||
uses: actions/setup-java@v1
|
uses: actions/setup-java@v1
|
||||||
with:
|
with:
|
||||||
java-version: 11
|
java-version: 11
|
||||||
- name: Install Automake
|
|
||||||
if: matrix.os == 'macOS-latest'
|
|
||||||
run: brew install automake
|
|
||||||
- name: Check JVM
|
- 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
|
run: ./gradlew jvmTest
|
||||||
- name: Check Linux
|
- name: Check Linux
|
||||||
if: matrix.os == 'ubuntu-latest'
|
if: matrix.os == 'ubuntu-latest'
|
||||||
@ -97,7 +116,7 @@ jobs:
|
|||||||
run: ./gradlew publishLinuxPublicationToMavenLocal :jni:jvm:linux:publishJvmPublicationToMavenLocal -PsnapshotNumber=${{ github.run_number }} -PgitRef=${{ github.ref }}
|
run: ./gradlew publishLinuxPublicationToMavenLocal :jni:jvm:linux:publishJvmPublicationToMavenLocal -PsnapshotNumber=${{ github.run_number }} -PgitRef=${{ github.ref }}
|
||||||
- name: Publish Windows
|
- name: Publish Windows
|
||||||
if: matrix.os == 'windows-latest'
|
if: matrix.os == 'windows-latest'
|
||||||
shell: bash
|
shell: msys2 {0}
|
||||||
run: ./gradlew :jni:jvm:mingw:publishToMavenLocal -PsnapshotNumber=${{ github.run_number }} -PgitRef=${{ github.ref }}
|
run: ./gradlew :jni:jvm:mingw:publishToMavenLocal -PsnapshotNumber=${{ github.run_number }} -PgitRef=${{ github.ref }}
|
||||||
- name: Publish MacOS
|
- name: Publish MacOS
|
||||||
if: matrix.os == 'macOS-latest'
|
if: matrix.os == 'macOS-latest'
|
||||||
|
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') }}
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
|
||||||
restore-keys: ${{ runner.os }}-gradle-
|
restore-keys: ${{ runner.os }}-gradle-
|
||||||
- name: Android environment
|
- name: Android environment
|
||||||
|
if: matrix.os != 'windows-latest'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "ANDROID_HOME=$ANDROID_HOME" >> $GITHUB_ENV
|
echo "ANDROID_HOME=$ANDROID_HOME" >> $GITHUB_ENV
|
||||||
echo "ANDROID_NDK_VERSION=21.4.7075529" >> $GITHUB_ENV
|
echo "ANDROID_NDK_VERSION=21.4.7075529" >> $GITHUB_ENV
|
||||||
- name: Cached Android NDK
|
- name: Cached Android NDK
|
||||||
|
if: matrix.os != 'windows-latest'
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ${{ format('{0}/ndk/{1}', env.ANDROID_HOME, env.ANDROID_NDK_VERSION) }}
|
path: ${{ format('{0}/ndk/{1}', env.ANDROID_HOME, env.ANDROID_NDK_VERSION) }}
|
||||||
@ -58,6 +60,19 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "C:\msys64\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
echo "C:\msys64\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||||
rm.exe "C:/WINDOWS/system32/bash.EXE"
|
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
|
- name: Set up JDK 8
|
||||||
uses: actions/setup-java@v1
|
uses: actions/setup-java@v1
|
||||||
with:
|
with:
|
||||||
@ -69,18 +84,19 @@ jobs:
|
|||||||
$ANDROID_HOME/tools/bin/sdkmanager "ndk;$ANDROID_NDK_VERSION"
|
$ANDROID_HOME/tools/bin/sdkmanager "ndk;$ANDROID_NDK_VERSION"
|
||||||
- name: Setup Android
|
- name: Setup Android
|
||||||
if: matrix.os == 'windows-latest'
|
if: matrix.os == 'windows-latest'
|
||||||
shell: bash
|
shell: msys2 {0}
|
||||||
run: |
|
run: |
|
||||||
$ANDROID_HOME\\tools\\bin\\sdkmanager.bat "ndk;$ANDROID_NDK_VERSION"
|
echo "skip.android=true" > local.properties
|
||||||
- name: Set up JDK 11
|
- name: Set up JDK 11
|
||||||
uses: actions/setup-java@v1
|
uses: actions/setup-java@v1
|
||||||
with:
|
with:
|
||||||
java-version: 11
|
java-version: 11
|
||||||
- name: Install Automake
|
|
||||||
if: matrix.os == 'macOS-latest'
|
|
||||||
run: brew install automake
|
|
||||||
- name: Check JVM
|
- 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
|
run: ./gradlew jvmTest
|
||||||
- name: Check Linux
|
- name: Check Linux
|
||||||
if: matrix.os == 'ubuntu-latest'
|
if: matrix.os == 'ubuntu-latest'
|
||||||
|
@ -7,7 +7,7 @@ if (includeAndroid) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
val currentOs = OperatingSystem.current()
|
val currentOs = OperatingSystem.current()
|
||||||
val bash = if (currentOs.isWindows) "bash.exe" else "bash"
|
val bash = "bash"
|
||||||
|
|
||||||
val buildSecp256k1 by tasks.creating { group = "build" }
|
val buildSecp256k1 by tasks.creating { group = "build" }
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ val buildSecp256k1Host by tasks.creating(Exec::class) {
|
|||||||
|
|
||||||
workingDir = projectDir
|
workingDir = projectDir
|
||||||
environment("TARGET", target)
|
environment("TARGET", target)
|
||||||
commandLine(bash, "build.sh")
|
commandLine(bash, "-l", "build.sh")
|
||||||
}
|
}
|
||||||
|
|
||||||
val buildSecp256k1Ios by tasks.creating(Exec::class) {
|
val buildSecp256k1Ios by tasks.creating(Exec::class) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user