ci(docs): update cpu builds to use default gh actions #1034
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: Documentation | |
| permissions: | |
| contents: write # contents permission to update benchmark contents in gh-pages branch | |
| statuses: read | |
| deployments: write # deployments permission to deploy GitHub pages website | |
| pages: write | |
| id-token: write | |
| pull-requests: write | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - "src/**/*" | |
| - "ext/**/*" | |
| - "test/**/*" | |
| - "Project.toml" | |
| - "docs/**/*" | |
| - "examples/**/*" | |
| - ".buildkite/**/*" | |
| - ".github/workflows/Documentation.yml" | |
| - "lib/**/*" | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "*" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | |
| jobs: | |
| tutorial-cuda: | |
| if: ${{ !contains(github.event.head_commit.message, '[skip docs]') }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Trigger CUDA Tutorial Build | |
| id: buildkite-build | |
| uses: buildkite/trigger-pipeline-action@v2.4.1 | |
| with: | |
| buildkite_api_access_token: ${{ secrets.BUILDKITE_TOKEN }} | |
| pipeline: "julialang/lux-dot-jl" | |
| commit: ${{ github.event.pull_request.head.sha }} | |
| branch: ${{ github.event.pull_request.head.ref }} | |
| message: | | |
| Triggered from PR #${{ github.event.pull_request.number }}: ${{ github.event.pull_request.title }} | |
| send_pull_request: true | |
| pull_request_base_branch: ${{ github.event.pull_request.base.ref }} | |
| build_env_vars: >- | |
| { | |
| "LUX_CUDA_TUTORIALS": "1", | |
| "GITHUB_PR_NUMBER": "${{ github.event.pull_request.number }}" | |
| } | |
| - name: Download CUDA Tutorial Artifacts | |
| uses: EnricoMi/download-buildkite-artifact-action@v1 | |
| with: | |
| buildkite_token: ${{ secrets.BUILDKITE_TOKEN }} | |
| buildkite_build_url: ${{ steps.buildkite-build.outputs.url }} | |
| ignore_build_states: blocked,canceled,skipped,not_run | |
| ignore_job_states: timed_out,failed | |
| output_path: artifacts | |
| poll_interval: 30 | |
| - name: Upload Tutorial Artifacts | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: "tutorial-cuda" | |
| path: artifacts/**/* | |
| retention-days: 90 | |
| if-no-files-found: error | |
| tutorial-cpu: | |
| if: ${{ !contains(github.event.head_commit.message, '[skip docs]') }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| group: [0, 1, 2, 3] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Collect Workflow Telemetry | |
| uses: catchpoint/workflow-telemetry-action@v2 | |
| with: | |
| comment_on_pr: false | |
| job_summary: true | |
| - uses: julia-actions/setup-julia@v2 | |
| with: | |
| version: "1.11" | |
| - uses: julia-actions/cache@v2 | |
| with: | |
| cache-name: julia-cache;workflow=tutorial-cpu-${{ matrix.group }}-${{ github.event_name }}-${{ github.event.repository.default_branch }}-${{ github.sha }} | |
| - name: Run Tutorials | |
| run: julia --color=yes --project=docs --threads=auto docs/tutorials.jl | |
| env: | |
| TUTORIAL_BACKEND_GROUP: "CPU" | |
| BUILDKITE_PARALLEL_JOB_COUNT: 4 | |
| BUILDKITE_PARALLEL_JOB: ${{ matrix.group }} | |
| LD_LIBRARY_PATH: "" | |
| - name: Upload Tutorial Artifacts | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: "tutorial-cpu-${{ matrix.group }}" | |
| path: | | |
| docs/src/tutorials/beginner/**/* | |
| docs/src/tutorials/intermediate/**/* | |
| docs/src/tutorials/advanced/**/* | |
| tutorial_deps/* | |
| **/*.cov | |
| docs/src/public/examples/**/* | |
| retention-days: 90 | |
| if-no-files-found: error | |
| documentation: | |
| if: ${{ !contains(github.event.head_commit.message, '[skip docs]') }} | |
| runs-on: ubuntu-latest | |
| needs: [tutorial-cpu, tutorial-cuda] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Collect Workflow Telemetry | |
| uses: catchpoint/workflow-telemetry-action@v2 | |
| with: | |
| comment_on_pr: false | |
| job_summary: true | |
| - uses: julia-actions/setup-julia@v2 | |
| with: | |
| version: "1.11" | |
| - uses: julia-actions/cache@v2 | |
| with: | |
| cache-name: julia-cache;workflow=documentation-${{ github.event_name }}-${{ github.event.repository.default_branch }}-${{ github.sha }} | |
| # Download the artifacts from the tutorials | |
| - name: Download Tutorial Artifacts | |
| uses: actions/download-artifact@v5 | |
| with: | |
| pattern: "tutorial-*" | |
| path: tutorial_artifacts | |
| merge-multiple: true | |
| - name: Move Documentation Artifacts | |
| run: cp -r tutorial_artifacts/* ./ | |
| - uses: julia-actions/julia-buildpkg@v1 | |
| - uses: julia-actions/julia-docdeploy@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| env: | |
| JULIA_DEBUG: "Documenter,Reactant,Reactant_jll,Lux" | |
| DATADEPS_ALWAYS_ACCEPT: true | |
| GKSwstype: "100" # https://discourse.julialang.org/t/generation-of-documentation-fails-qt-qpa-xcb-could-not-connect-to-display/60988 |