From 9b70884d289b586f59a5221232710a29b7bf0a36 Mon Sep 17 00:00:00 2001 From: Todd Anderson Date: Thu, 16 Nov 2023 14:31:00 -0600 Subject: [PATCH] fixing build --- .github/workflows/ci.yml | 40 +++++++++++++------ ...aunchDarkly.ClientSdk.Android.Tests.csproj | 2 +- 2 files changed, 29 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d77637a7..c377e9c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,11 +1,11 @@ name: Run CI on: push: - branches: [ main ] + branches: [ ta/sc-222947/maui-support ] paths-ignore: - '**.md' #Do not need to run CI for markdown changes. pull_request: - branches: [ main ] + branches: [ ta/sc-222947/maui-support ] paths-ignore: - '**.md' @@ -21,7 +21,6 @@ jobs: - name: Checkout code uses: actions/checkout@v3 with: - ref: 'ta/sc-222947/maui-support' fetch-depth: 0 #If you only need the current version keep this. - name: Setup dotnet ${{ matrix.dotnet-version }} build tools @@ -29,17 +28,17 @@ jobs: with: dotnet-version: ${{ matrix.dotnet-version }} - - name: Install MAUI Workload - run: dotnet workload install maui-android maui-ios maui-windows maui-maccatalyst --ignore-failed-sources + # - name: Install MAUI Workload + # run: dotnet workload install maui-android maui-ios maui-windows maui-maccatalyst --ignore-failed-sources - - name: Restore Dependencies - run: dotnet restore src/LaunchDarkly.ClientSdk/LaunchDarkly.ClientSdk.csproj + # - name: Restore Dependencies + # run: dotnet restore src/LaunchDarkly.ClientSdk/LaunchDarkly.ClientSdk.csproj # - name: Build for Net7 # run: dotnet msbuild /p:Configuration=debug /p:TargetFramework=net7.0 src/LaunchDarkly.ClientSdk/LaunchDarkly.ClientSdk.csproj - - name: Build for Net7-android - run: dotnet msbuild /p:Configuration=debug /p:TargetFramework=net7.0-android src/LaunchDarkly.ClientSdk/LaunchDarkly.ClientSdk.csproj + # - name: Build for Net7-android + # run: dotnet msbuild /p:Configuration=debug /p:TargetFramework=net7.0-android src/LaunchDarkly.ClientSdk/LaunchDarkly.ClientSdk.csproj # - name: Build for Net7-ios # run: dotnet msbuild /p:Configuration=debug /p:TargetFramework=net7.0-ios src/LaunchDarkly.ClientSdk/LaunchDarkly.ClientSdk.csproj @@ -66,9 +65,26 @@ jobs: # curl -s https://raw.githubusercontent.com/launchdarkly/sdk-test-harness/main/downloader/run.sh | VERSION=v2 PARAMS="-url http://localhost:8000 -debug -stop-service-at-end \ # -junit /tmp/circle-reports/contract-tests-junit.xml" sh - - name: Build Android Test Project - run: dotnet msbuild /restore /p:Configuration=Debug /t:SignAndroidPackage \ - tests/LaunchDarkly.ClientSdk.Android.Tests/LaunchDarkly.ClientSdk.Android.Tests.csproj + # - name: Build Android Test App + # run: | + # dotnet msbuild /restore /p:Configuration=Debug /t:SignAndroidPackage \ + # tests/LaunchDarkly.ClientSdk.Android.Tests/LaunchDarkly.ClientSdk.Android.Tests.csproj + + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + + - name: Setup Android Manager + uses: android-actions/setup-android@v3 + + - name: Run Android Test App on Emulator + uses: reactivecircus/android-emulator-runner@v2 + with: + api-level: 27 + script: | + adb install tests/LaunchDarkly.ClientSdk.Android.Tests/bin/Debug/com.companyname.LaunchDarkly.ClientSdk.Android.Tests-Signed.apk # TODO: update build commands to not use msbuild if possible # TODO: make teraform PR to get repo access to ARN. Also need to update the github-sdk-release role to get access to S3 blobs from .ldrelease/secrets.properties diff --git a/testsmaui/LaunchDarkly.ClientSdk.Android.Tests/LaunchDarkly.ClientSdk.Android.Tests.csproj b/testsmaui/LaunchDarkly.ClientSdk.Android.Tests/LaunchDarkly.ClientSdk.Android.Tests.csproj index 3090fad0..a0cc76db 100644 --- a/testsmaui/LaunchDarkly.ClientSdk.Android.Tests/LaunchDarkly.ClientSdk.Android.Tests.csproj +++ b/testsmaui/LaunchDarkly.ClientSdk.Android.Tests/LaunchDarkly.ClientSdk.Android.Tests.csproj @@ -27,7 +27,7 @@ conditional compilation, rather than by changing these includes; when we used to use individual file links, it was too easy to forget to update them. --> - +