Build should be faster #78
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: Build | |
| on: | |
| push: | |
| branches: | |
| - "**" | |
| paths-ignore: | |
| - ".github/ISSUE_TEMPLATE/*.yml" | |
| - ".gitignore" | |
| - "CONTRIBUTING.md" | |
| - "LICENSE" | |
| - "NOTICE" | |
| - "README.md" | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| build-windows: | |
| name: Build Windows | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - name: windows-x86_64 | |
| runs-on: windows-2022 | |
| - name: windows-aarch64 | |
| runs-on: windows-2022 | |
| runs-on: ${{ matrix.platform.runs-on }} | |
| steps: | |
| - uses: Kas-tle/actions/checkout@main | |
| name: Checkout Repository | |
| - uses: ./.github/actions/prepare-windows | |
| name: Prepare Windows | |
| - uses: ./.github/actions/setup-gradle | |
| with: | |
| gradle-cache-read-only: "false" | |
| name: Setup Gradle | |
| - uses: ./.github/actions/build | |
| with: | |
| platform-name: ${{ matrix.platform.name }} | |
| name: Build | |
| test-windows: | |
| name: Test Windows | |
| needs: build-windows | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - name: windows-2022_windows-x86_64 | |
| artifact-name: windows-x86_64 | |
| runs-on: windows-2022 | |
| - name: windows-2025_windows-x86_64 | |
| artifact-name: windows-x86_64 | |
| runs-on: windows-2025 | |
| - name: windows-11-arm_windows-aarch64 | |
| artifact-name: windows-aarch64 | |
| runs-on: windows-11-arm | |
| runs-on: ${{ matrix.platform.runs-on }} | |
| steps: | |
| - uses: Kas-tle/actions/checkout@main | |
| name: Checkout Repository | |
| - uses: ./.github/actions/setup-gradle | |
| name: Setup Gradle | |
| - uses: ./.github/actions/test | |
| with: | |
| platform-name: ${{ matrix.platform.artifact-name }} | |
| name: Test | |
| build-linux: | |
| name: Build Linux | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - name: linux-aarch32 | |
| runs-on: ubuntu-22.04 | |
| - name: linux-aarch64 | |
| runs-on: ubuntu-22.04 | |
| - name: linux-x86_64 | |
| runs-on: ubuntu-22.04 | |
| runs-on: ${{ matrix.platform.runs-on }} | |
| steps: | |
| - uses: Kas-tle/actions/checkout@main | |
| name: Checkout Repository | |
| - uses: ./.github/actions/prepare-linux | |
| name: Prepare Linux | |
| - uses: ./.github/actions/setup-gradle | |
| with: | |
| gradle-cache-read-only: "false" | |
| name: Setup Gradle | |
| - uses: ./.github/actions/build | |
| with: | |
| platform-name: ${{ matrix.platform.name }} | |
| name: Build | |
| test-linux: | |
| name: Test Linux | |
| needs: build-linux | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - name: ubuntu-22.04-arm_linux-aarch32 | |
| artifact-name: linux-aarch32 | |
| runs-on: ubuntu-22.04-arm | |
| java-arch: armv7 | |
| - name: ubuntu-24.04-arm_linux-aarch32 | |
| artifact-name: linux-aarch32 | |
| runs-on: ubuntu-24.04-arm | |
| java-arch: armv7 | |
| - name: ubuntu-22.04-arm_linux-aarch64 | |
| artifact-name: linux-aarch64 | |
| runs-on: ubuntu-22.04-arm | |
| java-arch: aarch64 | |
| - name: ubuntu-24.04-arm_linux-aarch64 | |
| artifact-name: linux-aarch64 | |
| runs-on: ubuntu-24.04-arm | |
| java-arch: aarch64 | |
| - name: ubuntu-22.04_linux-x86_64 | |
| artifact-name: linux-x86_64 | |
| runs-on: ubuntu-22.04 | |
| java-arch: x64 | |
| - name: ubuntu-24.04_linux-x86_64 | |
| artifact-name: linux-x86_64 | |
| runs-on: ubuntu-24.04 | |
| java-arch: x64 | |
| runs-on: ${{ matrix.platform.runs-on }} | |
| steps: | |
| - uses: Kas-tle/actions/checkout@main | |
| name: Checkout Repository | |
| - uses: ./.github/actions/setup-gradle | |
| with: | |
| java-architecture: ${{ matrix.platform.java-arch }} | |
| name: Setup Gradle | |
| - uses: ./.github/actions/test | |
| with: | |
| platform-name: ${{ matrix.platform.artifact-name }} | |
| name: Test | |
| build-macos: | |
| name: Build macOS | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - name: macos-x86_64 | |
| runs-on: macos-14 | |
| - name: macos-aarch64 | |
| runs-on: macos-14 | |
| runs-on: ${{ matrix.platform.runs-on }} | |
| steps: | |
| - uses: Kas-tle/actions/checkout@main | |
| name: Checkout Repository | |
| - uses: ./.github/actions/prepare-macos | |
| name: Prepare macOS | |
| - uses: ./.github/actions/setup-gradle | |
| with: | |
| gradle-cache-read-only: "false" | |
| name: Setup Gradle | |
| - uses: ./.github/actions/build | |
| with: | |
| platform-name: ${{ matrix.platform.name }} | |
| name: Build | |
| test-macos: | |
| name: Test macOS | |
| needs: build-macos | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - name: macos-15-intel_macos-x86_64 | |
| artifact-name: macos-x86_64 | |
| runs-on: macos-15-intel | |
| - name: macos-14_macos-aarch64 | |
| artifact-name: macos-aarch64 | |
| runs-on: macos-14 | |
| - name: macos-15_macos-aarch64 | |
| artifact-name: macos-aarch64 | |
| runs-on: macos-15 | |
| - name: macos-26_macos-aarch64 | |
| artifact-name: macos-aarch64 | |
| runs-on: macos-26 | |
| runs-on: ${{ matrix.platform.runs-on }} | |
| steps: | |
| - uses: Kas-tle/actions/checkout@main | |
| name: Checkout Repository | |
| - uses: ./.github/actions/setup-gradle | |
| name: Setup Gradle | |
| - uses: ./.github/actions/test | |
| with: | |
| platform-name: ${{ matrix.platform.artifact-name }} | |
| name: Test | |
| detect-release: | |
| name: Detect Release | |
| needs: | |
| - test-windows | |
| - test-linux | |
| - test-macos | |
| if: ${{ success() && github.repository == 'Kas-tle/webrtc-java' && github.ref_name == 'master' }} | |
| runs-on: ubuntu-22.04 | |
| outputs: | |
| unreleased: ${{ steps.version.outputs.unreleased }} | |
| version: ${{ steps.version.outputs.version }} | |
| steps: | |
| - uses: Kas-tle/actions/checkout@main | |
| with: | |
| fetch-depth: "0" | |
| name: Checkout Repository | |
| - name: Get Release Version | |
| id: version | |
| run: | | |
| version=$(cat gradle.properties | grep version= | cut -d'=' -f2) | |
| echo "version=$version" >> $GITHUB_OUTPUT | |
| unreleased=$(git show-ref --tags --verify --quiet "refs/tags/${version}" && echo false || echo true) | |
| echo "unreleased=$unreleased" >> $GITHUB_OUTPUT | |
| shell: bash | |
| release: | |
| name: Release and Publish | |
| needs: | |
| - detect-release | |
| if: ${{ success() && github.repository == 'Kas-tle/webrtc-java' && github.ref_name == 'master' && needs.detect-release.outputs.unreleased == 'true' }} | |
| runs-on: ubuntu-22.04 | |
| outputs: | |
| release_id: ${{ steps.release.outputs.releaseID }} | |
| steps: | |
| - uses: Kas-tle/actions/checkout@main | |
| name: Checkout Repository | |
| - uses: ./.github/actions/setup-gradle | |
| name: Setup Gradle | |
| - uses: ./.github/actions/publish | |
| env: | |
| MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} | |
| MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }} | |
| PGP_SECRET: ${{ secrets.PGP_SECRET }} | |
| PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} | |
| name: Publish to Maven Central | |
| - uses: Kas-tle/base-release-action@65d06f835be34757c6d73c16959c97e92c2a3c7f | |
| id: release | |
| with: | |
| files: | | |
| webrtc/build/libs/*.jar | |
| native-staging/**/*.jar | |
| appID: ${{ secrets.RELEASE_APP_ID }} | |
| appPrivateKey: ${{ secrets.RELEASE_APP_PK }} | |
| discordWebhook: ${{ secrets.DISCORD_WEBHOOK }} | |
| tagBase: ${{ needs.detect-release.outputs.version }} | |
| tagIncrement: false | |
| tagSeparator: "" | |
| tagPrefix: "" | |
| releaseName: ${{ needs.detect-release.outputs.version }} | |
| releaseBodyDependencyUsage: "java" | |
| releaseBodyDependencyJavaGroupId: "dev.kastle.webrtc" | |
| releaseBodyDependencyJavaArtifactId: "webrtc-java" | |
| name: Create Release | |
| upload-logs: | |
| name: Upload Logs | |
| runs-on: ubuntu-22.04 | |
| needs: release | |
| if: ${{ success() && github.repository == 'Kas-tle/webrtc-java' && github.ref_name == 'master' }} | |
| steps: | |
| - uses: Kas-tle/release-build-log-action@1b57448eaf9476e6e05450e4ea240449eac2c0d2 | |
| with: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| releaseID: ${{ needs.release.outputs.release_id }} | |
| name: Upload Build Logs to Release |