diff --git a/.github/workflows/build-documentation.yml b/.github/workflows/build-documentation.yml index 17bfd0c65..e6f280883 100644 --- a/.github/workflows/build-documentation.yml +++ b/.github/workflows/build-documentation.yml @@ -48,7 +48,6 @@ jobs: run: | cp ./cfe/cmake/Makefile.sample Makefile cp -r ./cfe/cmake/sample_defs sample_defs - # Setup the build system - name: Make Prep run: make prep @@ -56,7 +55,6 @@ jobs: - name: Build Docs run: | make doc > make_doc_stdout.txt 2> make_doc_stderr.txt - # Upload documentation logs as artifacts - name: Archive Documentation Build Logs uses: actions/upload-artifact@v2 @@ -65,7 +63,6 @@ jobs: path: | make_doc_stdout.txt make_doc_stderr.txt - - name: Error Check run: | if [[ -s make_doc_stderr.txt ]]; then @@ -73,12 +70,10 @@ jobs: exit -1 fi - build-usersguide: + build: needs: checks-for-duplicates if: ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' }} - # Name the Job - name: Users Guide - # Set the type of machine to run on + name: Build OSAL & Users Guide runs-on: ubuntu-18.04 steps: @@ -94,108 +89,7 @@ jobs: run: | cp ./cfe/cmake/Makefile.sample Makefile cp -r ./cfe/cmake/sample_defs sample_defs - - # Setup the build system - - name: Make Prep - run: make prep - - - name: Install Dependencies - run: sudo apt-get install doxygen graphviz -y - - - name: Build Usersguide - run: | - make usersguide > make_usersguide_stdout.txt 2> make_usersguide_stderr.txt - - - name: Archive Users Guide Build Logs - uses: actions/upload-artifact@v2 - with: - name: Users Guide Artifacts - path: | - make_usersguide_stdout.txt - make_usersguide_stderr.txt - cfe-usersguide-warnings.log - - - name: Error Check - run: | - if [[ -s make_usersguide_stderr.txt ]]; then - cat make_usersguide_stderr.txt - exit -1 - fi - - - name: Warning Check - run: | - if [[ -s cfe-usersguide-warnings.log ]]; then - cat cfe-usersguide-warnings.log - exit -1 - fi - - - name: Install Dependencies - if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}} - run: | - sudo apt-get install texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra - - - name: Generate PDF - if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}} - run: | - set -x - mkdir deploy - cd ./build/docs/users_guide/latex - make > build.txt - mv refman.pdf $GITHUB_WORKSPACE/deploy/cFE_Users_Guide.pdf - # Could add pandoc and convert to github markdown - # pandoc CFE_Users_Guide.pdf -t gfm - - - name: Cache cFS Build Environment for osalguide - id: cache-usersguide - uses: actions/cache@v2 - with: - path: /home/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/deploy/* - key: usersguide-buildnum-${{ github.run_number }} - deploy-usersguide: - name: Deploy Users Guide - runs-on: ubuntu-18.04 - needs: build-usersguide - if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}} - - steps: - - name: Cache cFS Build Environment for usersguide - id: cache-usersguide - uses: actions/cache@v2 - with: - path: /home/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/deploy/* - key: usersguide-buildnum-${{ github.run_number }} - - - name: Deploy to GitHub - if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}} - uses: JamesIves/github-pages-deploy-action@3.7.1 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BRANCH: gh-pages - FOLDER: deploy - CLEAN: false - SINGLE_COMMIT: true - - build-osalguide: - needs: checks-for-duplicates - if: ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' }} - name: Osal Guide - runs-on: ubuntu-18.04 - - steps: - # Checks out a copy of your repository on the ubuntu-latest machine - - name: Checkout code - uses: actions/checkout@v2 - with: - submodules: true - persist-credentials: false - - # Setup the build system - - name: Copy Files - run: | - cp ./cfe/cmake/Makefile.sample Makefile - cp -r ./cfe/cmake/sample_defs sample_defs - # Setup the build system - name: Make Prep run: make prep @@ -207,7 +101,7 @@ jobs: run: | make osalguide > make_osalguide_stdout.txt 2> make_osalguide_stderr.txt mv build/docs/osalguide/osal-apiguide-warnings.log osal-apiguide-warnings.log - + - name: Archive Osal Guide Build Logs uses: actions/upload-artifact@v2 with: @@ -216,26 +110,26 @@ jobs: make_osalguide_stdout.txt make_osalguide_stderr.txt osal-apiguide-warnings.log - + - name: Check for Errors run: | if [[ -s make_osalguide_stderr.txt ]]; then cat make_osalguide_stderr.txt exit -1 fi - + - name: Check for Warnings run: | if [[ -s osal-apiguide-warnings.log ]]; then cat osal-apiguide-warnings.log exit -1 fi - + - name: Install Dependencies if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}} run: | sudo apt-get install texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra - + - name: Generate PDF if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}} run: | @@ -245,27 +139,64 @@ jobs: mv refman.pdf $GITHUB_WORKSPACE/deploy/OSAL_Users_Guide.pdf # Could add pandoc and convert to github markdown # pandoc CFE_Users_Guide.pdf -t gfm - - - name: Cache cFS Build Environment for osalguide - id: cache-osalguide + + - name: Build Usersguide + run: | + make usersguide > make_usersguide_stdout.txt 2> make_usersguide_stderr.txt + + - name: Archive Users Guide Build Logs + uses: actions/upload-artifact@v2 + with: + name: Users Guide Artifacts + path: | + make_usersguide_stdout.txt + make_usersguide_stderr.txt + cfe-usersguide-warnings.log + + - name: Error Check + run: | + if [[ -s make_usersguide_stderr.txt ]]; then + cat make_usersguide_stderr.txt + exit -1 + fi + + - name: Warning Check + run: | + if [[ -s cfe-usersguide-warnings.log ]]; then + cat cfe-usersguide-warnings.log + exit -1 + fi + + - name: Generate PDF + if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}} + run: | + set -x + cd ./build/docs/users_guide/latex + make > build.txt + mv refman.pdf $GITHUB_WORKSPACE/deploy/cFE_Users_Guide.pdf + # Could add pandoc and convert to github markdown + # pandoc CFE_Users_Guide.pdf -t gfm + + - name: Cache cFS Build Environment for usersguide + id: cache-guide uses: actions/cache@v2 with: path: /home/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/deploy/* - key: osalguide-buildnum-${{ github.run_number }} - - deploy-osalguide: - needs: build-osalguide - name: Deploy Osal Guide + key: guide-buildnum-${{ github.run_number }} + + deploy: + needs: build + name: Deploy OSAL & Users Guide runs-on: ubuntu-18.04 if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}} steps: - name: Cache cFS Build Environment for osalguide - id: cache-osalguide + id: cache-guide uses: actions/cache@v2 with: path: /home/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/deploy/* - key: osalguide-buildnum-${{ github.run_number }} + key: guide-buildnum-${{ github.run_number }} - name: Deploy to GitHub uses: JamesIves/github-pages-deploy-action@3.7.1 @@ -275,4 +206,4 @@ jobs: FOLDER: deploy CLEAN: false SINGLE_COMMIT: true - + \ No newline at end of file