4.0.2 #105
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| workflow_dispatch: | |
| inputs: | |
| run_macos_native: | |
| description: 'Run macOS-only MAUI iOS and full KMP checks' | |
| required: false | |
| type: boolean | |
| default: false | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| HUSKY: 0 | |
| NX_DAEMON: false | |
| NX_NO_CLOUD: true | |
| NX_DISABLE_DB: true | |
| jobs: | |
| js: | |
| name: JS/TS packages | |
| runs-on: [self-hosted] | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: '20' | |
| - run: npm ci --ignore-scripts | |
| - run: npm run versions:check | |
| - run: npm run build | |
| - run: npm run lint | |
| - run: npm test | |
| - run: npm run typecheck --workspace=@screeb/react-native | |
| flutter: | |
| name: Flutter package | |
| runs-on: [self-hosted] | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - uses: android-actions/setup-android@9fc6c4e9069bf8d3d10b2204b1fb8f6ef7065407 # v3 | |
| with: | |
| packages: tools platform-tools build-tools;35.0.0 platforms;android-35 | |
| - uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2 | |
| with: | |
| flutter-version: '3.x' | |
| channel: 'stable' | |
| - name: Trust Flutter SDK checkout | |
| run: git config --global --add safe.directory "$FLUTTER_ROOT" | |
| - run: cd packages/sdk-flutter && flutter pub get | |
| - run: cd packages/sdk-flutter && flutter analyze | |
| - run: cd packages/sdk-flutter && flutter test | |
| maui-android: | |
| name: .NET MAUI Android SDK | |
| runs-on: [self-hosted] | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - uses: android-actions/setup-android@9fc6c4e9069bf8d3d10b2204b1fb8f6ef7065407 # v3 | |
| with: | |
| packages: tools platform-tools build-tools;35.0.0 platforms;android-35 | |
| - uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4 | |
| with: | |
| dotnet-version: '9.0.x' | |
| - name: Install MAUI workloads | |
| run: dotnet workload install maui-android | |
| - name: Restore | |
| run: dotnet restore packages/sdk-maui/ScreebMaui.csproj -p:TargetFramework=net9.0-android | |
| - name: Build Android | |
| run: dotnet build packages/sdk-maui/ScreebMaui.csproj -f net9.0-android --no-restore | |
| - name: Run unit tests | |
| run: dotnet test packages/sdk-maui/tests/ScreebUtilsTests.csproj | |
| maui-ios: | |
| name: .NET MAUI iOS SDK | |
| runs-on: macos-latest | |
| if: ${{ github.event_name == 'workflow_dispatch' && inputs.run_macos_native }} | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4 | |
| with: | |
| dotnet-version: '9.0.x' | |
| - name: Install MAUI workloads | |
| run: dotnet workload install ios | |
| - name: Download Screeb iOS XCFramework | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| mkdir -p packages/sdk-maui/native/ios | |
| gh release download --repo ScreebApp/sdk-ios-public --pattern 'Screeb.zip' --output /tmp/Screeb.zip --clobber | |
| unzip -q /tmp/Screeb.zip -d /tmp/screeb_ios | |
| cp -r /tmp/screeb_ios/Screeb.xcframework packages/sdk-maui/native/ios/ | |
| - name: Restore | |
| run: dotnet restore packages/sdk-maui/ScreebMaui.csproj | |
| - name: Build iOS | |
| run: dotnet build packages/sdk-maui/ScreebMaui.csproj -f net9.0-ios --no-restore | |
| kmp-android: | |
| name: Kotlin Multiplatform Android SDK | |
| runs-on: [self-hosted] | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Check native Android artifact | |
| id: native-android | |
| run: | | |
| version=$(sed -n 's/^SCREEB_ANDROID_SDK_VERSION=//p' packages/sdk-kmp/gradle.properties | head -n1) | |
| url="https://repo.maven.apache.org/maven2/app/screeb/sdk/survey/${version}/survey-${version}.pom" | |
| echo "version=${version}" >> "$GITHUB_OUTPUT" | |
| if curl -fsI "$url" >/dev/null; then | |
| echo "available=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "::warning::app.screeb.sdk:survey:${version} is not published yet; skipping KMP Android build." | |
| echo "available=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4 | |
| if: steps.native-android.outputs.available == 'true' | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - uses: android-actions/setup-android@9fc6c4e9069bf8d3d10b2204b1fb8f6ef7065407 # v3 | |
| if: steps.native-android.outputs.available == 'true' | |
| with: | |
| packages: tools platform-tools build-tools;35.0.0 platforms;android-35 | |
| - name: Make gradlew executable | |
| if: steps.native-android.outputs.available == 'true' | |
| run: chmod +x packages/sdk-kmp/gradlew | |
| - name: Build Android target | |
| if: steps.native-android.outputs.available == 'true' | |
| run: cd packages/sdk-kmp && ./gradlew assembleRelease testDebugUnitTest --no-daemon | |
| kmp-full: | |
| name: Kotlin Multiplatform full SDK | |
| runs-on: macos-latest | |
| if: ${{ github.event_name == 'workflow_dispatch' && inputs.run_macos_native }} | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Download Screeb iOS XCFramework | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| set -euo pipefail | |
| SCREEB_IOS_SDK_VERSION=$(grep '^SCREEB_IOS_SDK_VERSION=' packages/sdk-kmp/gradle.properties | cut -d= -f2) | |
| mkdir -p packages/sdk-kmp/native/ios | |
| gh release download "v${SCREEB_IOS_SDK_VERSION}" --repo ScreebApp/sdk-ios-public --pattern 'Screeb.zip' --output /tmp/Screeb.zip --clobber | |
| unzip -q /tmp/Screeb.zip -d /tmp/screeb_ios | |
| cp -r /tmp/screeb_ios/Screeb.xcframework packages/sdk-kmp/native/ios/ | |
| - name: Make gradlew executable | |
| run: chmod +x packages/sdk-kmp/gradlew | |
| - name: Build SDK | |
| run: cd packages/sdk-kmp && ./gradlew clean build --no-daemon |