Skip to content

Commit

Permalink
Update CI scripts (#698)
Browse files Browse the repository at this point in the history
* Update CI scripts

* Disable macos arm64 electrum tests that require support for SSL connections

ktor client does not support SSL sockets on native platforms.
  • Loading branch information
sstone authored Sep 16, 2024
1 parent 1493200 commit e45bdc3
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 19 deletions.
24 changes: 17 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ jobs:
os: [ubuntu-latest, macOS-latest]
steps:
- name: Check out
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: 'true'
- 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') }}
Expand All @@ -35,9 +35,10 @@ jobs:
sudo apt-get update -y
sudo apt install -y libcurl4-gnutls-dev
- name: Set up JDK 11
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'adopt'
- name: Check
run: ./gradlew check
- name: Publish Linux
Expand All @@ -52,10 +53,19 @@ 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
24 changes: 17 additions & 7 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ jobs:
os: [ubuntu-latest, macOS-latest]
steps:
- name: Check out
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: 'true'
- 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') }}
Expand All @@ -43,9 +43,10 @@ jobs:
sudo apt-get update -y
sudo apt install -y libcurl4-gnutls-dev
- name: Set up JDK 11
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'adopt'
- name: Check
run: ./gradlew check
- name: Publish Linux to Maven Local
Expand All @@ -60,10 +61,19 @@ 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-linux
path: |
maven-local
!maven-local/**/maven-metadata-local.xml
- name: Upload macos artifacts
uses: actions/upload-artifact@v4
if: matrix.os == 'macOS-latest'
with:
name: snapshot
name: snapshot-macos
path: |
maven-local
!maven-local/**/maven-metadata-local.xml
9 changes: 5 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@ jobs:

# 1 - checkout repositories
- name: Check out
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: 'true'

# 2 - setup cache and tools
- 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') }}
Expand All @@ -54,9 +54,10 @@ jobs:
sudo apt-get update -y
sudo apt install -y libcurl4-gnutls-dev
- name: Set up JDK 11
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'adopt'

# 4 - tests
- name: Check with integration
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ tasks.withType<AbstractTestTask> {
// Those tests use TLS sockets which are not supported on Linux and MacOS
tasks
.filterIsInstance<KotlinNativeTest>()
.filter { it.name == "macosX64Test" || it.name == "linuxX64Test" }
.filter { it.name == "macosX64Test" || it.name == "macosArm64Test" || it.name == "linuxX64Test" }
.map {
it.filter.excludeTestsMatching("*IntegrationTest")
it.filter.excludeTestsMatching("*ElectrumClientTest")
Expand Down

0 comments on commit e45bdc3

Please sign in to comment.