CI #1550
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
| # SPDX-FileCopyrightText: Copyright 2021, 2026 Arm Limited and/or its affiliates <open-source-office@arm.com> | |
| # | |
| # SPDX-License-Identifier: Apache-2.0 | |
| name: CI | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-pdfs: | |
| if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4.1.7 | |
| - name: check the correctness of the sources and generate the PDFs | |
| run: ./build_with_docker.sh --finalversion | |
| - name: Derive short commit hash | |
| id: vars | |
| run: echo "short_sha=${GITHUB_SHA::8}" >> "$GITHUB_OUTPUT" | |
| - name: Rename PDFs with commit hash | |
| run: | | |
| mv pdfs/acle.pdf "pdfs/acle-${{ steps.vars.outputs.short_sha }}.pdf" | |
| mv pdfs/advsimd.pdf "pdfs/advsimd-${{ steps.vars.outputs.short_sha }}.pdf" | |
| mv pdfs/cmse.pdf "pdfs/cmse-${{ steps.vars.outputs.short_sha }}.pdf" | |
| mv pdfs/morello.pdf "pdfs/morello-${{ steps.vars.outputs.short_sha }}.pdf" | |
| mv pdfs/mve.pdf "pdfs/mve-${{ steps.vars.outputs.short_sha }}.pdf" | |
| - uses: actions/upload-artifact@v4.4.0 | |
| with: | |
| name: pdfs | |
| path: | | |
| pdfs/acle-${{ steps.vars.outputs.short_sha }}.pdf | |
| pdfs/advsimd-${{ steps.vars.outputs.short_sha }}.pdf | |
| pdfs/cmse-${{ steps.vars.outputs.short_sha }}.pdf | |
| pdfs/morello-${{ steps.vars.outputs.short_sha }}.pdf | |
| pdfs/mve-${{ steps.vars.outputs.short_sha }}.pdf | |
| if-no-files-found: error | |
| build-github-pages: | |
| if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4.1.7 | |
| - name: generate the GitHub Pages locally in order to check for errors | |
| run: ./tools/build-github-pages.sh build | |
| markdown-link-check: | |
| if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4.1.7 | |
| - name: Install markdown-link-check | |
| run: npm install -g markdown-link-check | |
| - name: Check links | |
| run: | | |
| find . -name '*.md' -print0 | \ | |
| xargs -0 -n 1 python3 .github/scripts/check_links.py | |
| create-tag-and-github-release: | |
| if: github.event_name == 'workflow_dispatch' && github.repository == 'ARM-software/acle' | |
| needs: | |
| - build-pdfs | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/download-artifact@v4.1.8 | |
| with: | |
| name: pdfs | |
| path: pdfs | |
| - name: Derive short commit hash | |
| id: vars | |
| run: echo "short_sha=${GITHUB_SHA::8}" >> "$GITHUB_OUTPUT" | |
| - name: Create tag with PDFs | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: main-${{ github.sha }} | |
| name: Latest | |
| target_commitish: ${{ github.sha }} | |
| files: | | |
| pdfs/acle-${{ steps.vars.outputs.short_sha }}.pdf | |
| pdfs/advsimd-${{ steps.vars.outputs.short_sha }}.pdf | |
| pdfs/cmse-${{ steps.vars.outputs.short_sha }}.pdf | |
| pdfs/morello-${{ steps.vars.outputs.short_sha }}.pdf | |
| pdfs/mve-${{ steps.vars.outputs.short_sha }}.pdf | |
| build-pages-artifact: | |
| if: github.event_name == 'workflow_dispatch' && github.repository == 'ARM-software/acle' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4.1.7 | |
| - uses: actions/configure-pages@v5 | |
| - name: Build GitHub Pages site | |
| run: ./tools/build-github-pages.sh build | |
| - name: Upload GitHub Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: _site | |
| deploy-pages: | |
| if: github.event_name == 'workflow_dispatch' && github.repository == 'ARM-software/acle' | |
| needs: | |
| - build-pages-artifact | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |