-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #404 from ArielSAdamsNASA/fix-249-combine-deploy-d…
…ocumentation-jobs Fix #249, Combine Deploy Documentation Jobs
- Loading branch information
Showing
1 changed file
with
55 additions
and
124 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,15 +48,13 @@ 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: 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,20 +63,17 @@ jobs: | |
path: | | ||
make_doc_stdout.txt | ||
make_doc_stderr.txt | ||
- name: Error Check | ||
run: | | ||
if [[ -s make_doc_stderr.txt ]]; then | ||
cat make_doc_stderr.txt | ||
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/[email protected] | ||
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/[email protected] | ||
|
@@ -275,4 +206,4 @@ jobs: | |
FOLDER: deploy | ||
CLEAN: false | ||
SINGLE_COMMIT: true | ||
|
||
|