mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-03-27 10:11:48 -04:00
This commit optimizes CI/CD performance and reproducibility by migrating workflows from `ubuntu-latest` to a three-tier runner strategy using specific Ubuntu 24.04 images. Specific changes include: - **Lightweight Utility Jobs**: Migrated status checks, labelers, triage, changelog generation, and metadata tasks to `ubuntu-24.04-arm` to take advantage of shorter queue times for non-x86 dependent tasks. - **Gradle & Heavy Jobs**: Pinned heavy workloads (Android builds, host checks, CodeQL, Dokka, publishing) to `ubuntu-24.04` to ensure build reproducibility and avoid unexpected breakages from `ubuntu-latest` alias updates. - **Desktop Release Matrix**: Updated the desktop release strategy to include `ubuntu-24.04` and `ubuntu-24.04-arm` for cross-platform native packaging. - **Documentation**: Updated `AGENTS.md`, `GEMINI.md`, and `.github/copilot-instructions.md` to document the new runner strategy and provide guidelines for future workflow modifications. Workflows updated: - `promote.yml`, `release.yml`, `pull-request.yml`, `merge-queue.yml`, `codeql.yml`, `docs.yml`, `reusable-check.yml`, and various utility/triage workflows. Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
79 lines
2.0 KiB
YAML
79 lines
2.0 KiB
YAML
# This workflow builds and deploys the Dokka documentation to GitHub Pages.
|
|
|
|
name: Deploy Documentation
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
workflow_dispatch:
|
|
inputs:
|
|
ref:
|
|
description: 'The branch, tag or SHA to checkout'
|
|
required: false
|
|
type: string
|
|
|
|
# Allow this workflow to be called from other workflows
|
|
workflow_call:
|
|
inputs:
|
|
ref:
|
|
description: 'The branch, tag or SHA to checkout'
|
|
required: false
|
|
type: string
|
|
|
|
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
|
|
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
|
|
concurrency:
|
|
group: "pages"
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
build-docs:
|
|
if: github.repository == 'meshtastic/Meshtastic-Android'
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
submodules: 'recursive'
|
|
ref: ${{ inputs.ref || '' }}
|
|
|
|
- name: Set up JDK 17
|
|
uses: actions/setup-java@v5
|
|
with:
|
|
java-version: '17'
|
|
distribution: 'temurin'
|
|
token: ${{ github.token }}
|
|
|
|
- name: Setup Gradle
|
|
uses: gradle/actions/setup-gradle@v6
|
|
|
|
- name: Build Dokka HTML documentation
|
|
run: ./gradlew dokkaGeneratePublicationHtml
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-pages-artifact@v4
|
|
with:
|
|
path: build/dokka/html
|
|
|
|
deploy:
|
|
if: github.repository == 'meshtastic/Meshtastic-Android'
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
runs-on: ubuntu-24.04-arm
|
|
needs: build-docs
|
|
steps:
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v5
|