add windows support #14
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
| # https://github.com/Kotlin/multiplatform-library-template/blob/main/.github/workflows/gradle.yml | |
| # https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle | |
| name: CI | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| workflow_call: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - cmd: "./gradlew :kmp-webrtc:testDebugUnitTest" | |
| os: macos-latest | |
| - cmd: "./gradlew :example:androidApp:assembleDebug" | |
| os: macos-latest | |
| - cmd: "./scripts/build_ios_demo.sh" | |
| os: macos-latest | |
| dep: "brew update && brew install cocoapods xcodegen" | |
| - cmd: "./scripts/build_mac_demo.sh" | |
| os: macos-latest | |
| dep: "brew update && brew install cocoapods xcodegen" | |
| - cmd: ".\\scripts\\setup_windows.bat && cd example\\winApp && msbuild winApp.vcxproj /t:Build /p:Configuration=Release /p:Platform=x64" | |
| os: windows-latest | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| pull-requests: write | |
| contents: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: "recursive" | |
| - uses: actions/setup-java@v4 | |
| with: | |
| java-version: "17" | |
| distribution: "temurin" | |
| cache: "gradle" | |
| - uses: gradle/actions/setup-gradle@v3 | |
| - uses: suisei-cn/actions-download-file@v1.6.0 | |
| id: download_libs # Remember to give an ID if you need the output filename | |
| name: Download libs.zip | |
| with: | |
| url: "https://github.com/HackWebRTC/kmp-webrtc/releases/latest/download/libs.zip" | |
| target: ./ | |
| - name: Setup MSBuild | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| uses: microsoft/setup-msbuild@v2 | |
| with: | |
| msbuild-architecture: x64 | |
| - if: ${{ matrix.dep }} | |
| run: ${{ matrix.dep }} | |
| - name: Extract libs | |
| run: | | |
| unzip -o libs.zip | |
| - if: ${{ matrix.os == 'windows-latest' }} | |
| shell: cmd | |
| run: ${{ matrix.cmd }} | |
| - if: ${{ matrix.os != 'windows-latest' }} | |
| run: ${{ matrix.cmd }} |