From 89f6ec259c47c9660cccb46b448acda4993a502d Mon Sep 17 00:00:00 2001 From: Randolph Sapp Date: Tue, 19 Nov 2024 01:20:56 -0600 Subject: [PATCH] feat(cicd): automated builds and deployment to pages Use a matrix to parallelize building the docs for listed DEVFAMILY and OS combinations. Aggregate the results to build an expected pages artifact. Deploy the monolithic artifact to GitHub pages. If any platform fails for any reason, the arguments and logs for that build will be logged under a separate section of this workflow, and the results should not be deployed. Signed-off-by: Randolph Sapp --- .github/workflows/build.yml | 85 ++++++++++++++++++++++++++++++++++++ .github/workflows/deploy.yml | 18 ++++++++ 2 files changed, 103 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..b8934782d --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,85 @@ +--- +name: "build" + +on: + push: + branches: [feature/cicd-builds] + +concurrency: + group: ${{ github.ref_name }} + cancel-in-progress: true + +defaults: + run: + shell: bash + +jobs: + build: + name: Build Linux Documents + runs-on: ubuntu-latest + container: + image: ghcr.io/texasinstruments/processor-sdk-doc:latest + options: --entrypoint /bin/bash + strategy: + matrix: + os: [linux] + device: + - AM335X + - AM437X + - AM57X + - AM62AX + - AM62PX + - AM62X + - AM64X + - AM65X + - AM67 + - AM68 + - AM69 + - CORESDK + - DRA821A + - GEN + - J7200 + - J721E + - J721S2 + - J722S + - J742S2 + - J784S4 + include: + - os: android + device: AM62PX + - os: android + device: AM62X + - os: android + device: GEN + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Build ${{ matrix.device }} + run: | + make DEVFAMILY=${{ matrix.device }} OS=${{ matrix.os }} + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.device }}-${{ matrix.os }} + path: build/ + retention-days: 1 + + agregate: + name: Agregate build artifacts + runs-on: ubuntu-latest + needs: build + + steps: + - name: Download all artifacts + uses: actions/download-artifact@v4 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + path: build + + - name: Upload static files as single artifact + uses: actions/upload-pages-artifact@v3 + with: + path: build diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 000000000..8fe2d860c --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,18 @@ +--- +name: "deploy" + +on: + workflow_run: + workflows: + - build + types: + - completed + +jobs: + deploy: + name: Deploy + runs-on: ubuntu-latest + + steps: + - name: Update github page deployment + uses: actions/deploy-pages@v4