Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

fixing build

fixing build #5

Workflow file for this run

name: Run CI
on:
push:
branches: [ ta/sc-222947/maui-support ]
paths-ignore:
- '**.md' #Do not need to run CI for markdown changes.
pull_request:
branches: [ ta/sc-222947/maui-support ]
paths-ignore:
- '**.md'
jobs:
ci-build:
runs-on: macos-latest
strategy:
matrix:
dotnet-version: ['7.0.x']
android-api-version: ['27']
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0 #If you only need the current version keep this.
- name: Setup dotnet ${{ matrix.dotnet-version }} build tools
uses: actions/setup-dotnet@v3
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: 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-ios
# run: dotnet msbuild /p:Configuration=debug /p:TargetFramework=net7.0-ios src/LaunchDarkly.ClientSdk/LaunchDarkly.ClientSdk.csproj
# - name: Build for Net7-windows
# run: dotnet msbuild /p:Configuration=debug /p:TargetFramework=net7.0-maccatalyst src/LaunchDarkly.ClientSdk/LaunchDarkly.ClientSdk.csproj
# - name: Build for Net7-maccatalyst
# run: dotnet msbuild /p:Configuration=debug /p:TargetFramework=net7.0-windows src/LaunchDarkly.ClientSdk/LaunchDarkly.ClientSdk.csproj
# - name: Run Unit Tests for Net7
# run: |
# dotnet restore tests/LaunchDarkly.ClientSdk.Tests
# dotnet test -v=normal \
# --logger:"junit;LogFilePath=/tmp/circle-reports/unit-tests.xml" \
# tests/LaunchDarkly.ClientSdk.Tests/LaunchDarkly.ClientSdk.Tests.csproj
# - name: Build Contract Tests
# run: dotnet build contract-tests/TestService.csproj
# - name: Run Contract Tests
# run: |
# dotnet contract-tests/bin/Debug/net7.0/ContractTestService.dll > test-service.log 2>&1 & disown
# 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 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: |
echo "About to sleep"
sleep 10
adb install tests/LaunchDarkly.ClientSdk.Android.Tests/bin/Debug/net7.0-android/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
# TODO: incorporate and update https://github.com/launchdarkly/js-core/blob/main/actions/release-secrets/action.yml to support blobs