Skip to content

Commit

Permalink
#535 rework check scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
ExNDY committed Apr 16, 2024
1 parent 0422769 commit 95398a9
Show file tree
Hide file tree
Showing 10 changed files with 163 additions and 27 deletions.
60 changes: 48 additions & 12 deletions .github/compilation-check-source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ on:
jobs:
build-library:
runs-on: macOS-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macOS-latest, windows-latest, ubuntu-latest ]

steps:
- *checkout
Expand All @@ -85,7 +88,10 @@ jobs:
- *upload_reports

check-sample-android-mpp-app:
runs-on: macOS-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macOS-latest, windows-latest, ubuntu-latest ]
needs: build-library

steps:
Expand All @@ -102,7 +108,10 @@ jobs:
- *upload_reports

check-sample-auto-manifest:
runs-on: macOS-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macOS-latest, windows-latest, ubuntu-latest ]
needs: build-library

steps:
Expand All @@ -119,7 +128,10 @@ jobs:
- *upload_reports

check-sample-compose-jvm-app:
runs-on: macOS-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macOS-latest, windows-latest, ubuntu-latest ]
needs: build-library

steps:
Expand All @@ -136,7 +148,10 @@ jobs:
- *upload_reports

check-sample-resources-gallery:
runs-on: macOS-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macOS-latest, windows-latest, ubuntu-latest ]
needs: build-library

steps:
Expand All @@ -153,7 +168,10 @@ jobs:
- *upload_reports

check-sample-default-hierarchy-resources-gallery-mobile:
runs-on: macOS-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macOS-latest, windows-latest, ubuntu-latest ]
needs: build-library

steps:
Expand All @@ -170,7 +188,10 @@ jobs:
- *upload_reports

check-sample-ios-static-xcframework:
runs-on: macOS-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macOS-latest, windows-latest, ubuntu-latest ]
needs: build-library

steps:
Expand All @@ -187,7 +208,10 @@ jobs:
- *upload_reports

check-sample-ios-cocoapods-static-framework:
runs-on: macOS-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macOS-latest, windows-latest, ubuntu-latest ]
needs: build-library

steps:
Expand All @@ -204,7 +228,10 @@ jobs:
- *upload_reports

check-sample-kotlin-ios-app:
runs-on: macOS-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macOS-latest, windows-latest, ubuntu-latest ]
needs: build-library

steps:
Expand All @@ -221,7 +248,10 @@ jobs:
- *upload_reports

check-sample-compose-resources-gallery:
runs-on: macOS-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macOS-latest, windows-latest, ubuntu-latest ]
needs: build-library

steps:
Expand All @@ -238,7 +268,10 @@ jobs:
- *upload_reports

check-kotlin-2-sample:
runs-on: macOS-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macOS-latest, windows-latest, ubuntu-latest ]
needs: build-library

steps:
Expand All @@ -255,7 +288,10 @@ jobs:
- *upload_reports

check-cm-resources-sample:
runs-on: macOS-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macOS-latest, windows-latest, ubuntu-latest ]
needs: build-library

steps:
Expand Down
60 changes: 48 additions & 12 deletions .github/workflows/compilation-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ on:

jobs:
build-library:
runs-on: macOS-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macOS-latest, windows-latest, ubuntu-latest ]
steps:
- uses: actions/checkout@v1
- name: Set up JDK 17
Expand Down Expand Up @@ -55,7 +58,10 @@ jobs:
name: code-coverage-report-${{ github.job }}
path: "**/build/reports/**/*"
check-sample-android-mpp-app:
runs-on: macOS-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macOS-latest, windows-latest, ubuntu-latest ]
needs: build-library
steps:
- uses: actions/checkout@v1
Expand Down Expand Up @@ -95,7 +101,10 @@ jobs:
name: code-coverage-report-${{ github.job }}
path: "**/build/reports/**/*"
check-sample-auto-manifest:
runs-on: macOS-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macOS-latest, windows-latest, ubuntu-latest ]
needs: build-library
steps:
- uses: actions/checkout@v1
Expand Down Expand Up @@ -135,7 +144,10 @@ jobs:
name: code-coverage-report-${{ github.job }}
path: "**/build/reports/**/*"
check-sample-compose-jvm-app:
runs-on: macOS-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macOS-latest, windows-latest, ubuntu-latest ]
needs: build-library
steps:
- uses: actions/checkout@v1
Expand Down Expand Up @@ -175,7 +187,10 @@ jobs:
name: code-coverage-report-${{ github.job }}
path: "**/build/reports/**/*"
check-sample-resources-gallery:
runs-on: macOS-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macOS-latest, windows-latest, ubuntu-latest ]
needs: build-library
steps:
- uses: actions/checkout@v1
Expand Down Expand Up @@ -215,7 +230,10 @@ jobs:
name: code-coverage-report-${{ github.job }}
path: "**/build/reports/**/*"
check-sample-default-hierarchy-resources-gallery-mobile:
runs-on: macOS-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macOS-latest, windows-latest, ubuntu-latest ]
needs: build-library
steps:
- uses: actions/checkout@v1
Expand Down Expand Up @@ -255,7 +273,10 @@ jobs:
name: code-coverage-report-${{ github.job }}
path: "**/build/reports/**/*"
check-sample-ios-static-xcframework:
runs-on: macOS-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macOS-latest, windows-latest, ubuntu-latest ]
needs: build-library
steps:
- uses: actions/checkout@v1
Expand Down Expand Up @@ -295,7 +316,10 @@ jobs:
name: code-coverage-report-${{ github.job }}
path: "**/build/reports/**/*"
check-sample-ios-cocoapods-static-framework:
runs-on: macOS-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macOS-latest, windows-latest, ubuntu-latest ]
needs: build-library
steps:
- uses: actions/checkout@v1
Expand Down Expand Up @@ -335,7 +359,10 @@ jobs:
name: code-coverage-report-${{ github.job }}
path: "**/build/reports/**/*"
check-sample-kotlin-ios-app:
runs-on: macOS-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macOS-latest, windows-latest, ubuntu-latest ]
needs: build-library
steps:
- uses: actions/checkout@v1
Expand Down Expand Up @@ -375,7 +402,10 @@ jobs:
name: code-coverage-report-${{ github.job }}
path: "**/build/reports/**/*"
check-sample-compose-resources-gallery:
runs-on: macOS-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macOS-latest, windows-latest, ubuntu-latest ]
needs: build-library
steps:
- uses: actions/checkout@v1
Expand Down Expand Up @@ -416,7 +446,10 @@ jobs:
path: "**/build/reports/**/*"

check-cm-resources-sample:
runs-on: macOS-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macOS-latest, windows-latest, ubuntu-latest ]
needs: build-library
steps:
- uses: actions/checkout@v1
Expand Down Expand Up @@ -457,7 +490,10 @@ jobs:
path: "**/build/reports/**/*"

check-kotlin-2-sample:
runs-on: macOS-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macOS-latest, windows-latest, ubuntu-latest ]
needs: build-library
steps:
- uses: actions/checkout@v1
Expand Down
8 changes: 8 additions & 0 deletions samples/cm-resources-sample/local-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ log "cm-resources-sample android success"
./gradlew clean jvmJar
log "cm-resources-sample jvm success"

if ! command -v xcodebuild &> /dev/null
then
echo "xcodebuild could not be found, skip ios checks"
log "cm-resources-sample checked"

exit 0
fi

./gradlew clean compileKotlinIosX64
log "cm-resources-sample ios success"

Expand Down
8 changes: 8 additions & 0 deletions samples/compose-resources-gallery/local-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ log "compose-resources-gallery android success"
./gradlew clean jvmJar
log "compose-resources-gallery jvm success"

if ! command -v xcodebuild &> /dev/null
then
echo "xcodebuild could not be found, skip ios checks"
log "compose-resources-gallery checked"

exit 0
fi

./gradlew clean compileKotlinIosX64
log "compose-resources-gallery ios success"

Expand Down
8 changes: 8 additions & 0 deletions samples/default-hierarchy-gallery-mobile/local-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ log() {
./gradlew clean assembleDebug
log "default-hierarchy-gallery-mobile android success"

if ! command -v xcodebuild &> /dev/null
then
echo "xcodebuild could not be found, skip ios checks"
log "default-hierarchy-gallery-mobile checked"

exit 0
fi

./gradlew clean compileKotlinIosX64
log "default-hierarchy-gallery-mobile ios success"

Expand Down
8 changes: 8 additions & 0 deletions samples/ios-cocoapods-static-framework/local-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ log() {
echo "\033[0;32m> $1\033[0m"
}

if ! command -v xcodebuild &> /dev/null
then
echo "xcodebuild could not be found, skip ios checks"
log "ios-cocoapods-static-framework not checked"

exit 0
fi

./gradlew clean compileKotlinIosX64
log "ios-cocoapods-static-framework ios success"

Expand Down
8 changes: 8 additions & 0 deletions samples/ios-static-xcframework/local-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ log() {
echo "\033[0;32m> $1\033[0m"
}

if ! command -v xcodebuild &> /dev/null
then
echo "xcodebuild could not be found, skip ios checks"
log "ios-static-xcframework checked"

exit 0
fi

./gradlew clean build assembleMultiPlatformLibraryXCFramework
log "ios-static-xcframework gradle build success"

Expand Down
14 changes: 11 additions & 3 deletions samples/kotlin-2-sample/local-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,22 @@ log() {
}

./gradlew clean assembleDebug
log "kotlin2sample mobile android success"
log "kotlin-2-sample mobile android success"

if ! command -v xcodebuild &> /dev/null
then
echo "xcodebuild could not be found, skip ios checks"
log "kotlin-2-sample checked"

exit 0
fi

./gradlew clean compileKotlinIosX64
log "kotlin2sample mobile ios success"
log "kotlin-2-sample mobile ios success"

(
cd iosApp &&
set -o pipefail &&
xcodebuild -scheme iosApp -configuration Debug -sdk iphonesimulator -arch x86_64 build CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO | xcpretty
)
log "kotlin2sample mobile ios xcode success"
log "kotlin-2-sample mobile ios xcode success"
Loading

0 comments on commit 95398a9

Please sign in to comment.