-
Notifications
You must be signed in to change notification settings - Fork 220
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 #316 from ArielSAdamsNASA/fix-312-generate-documen…
…tation-in-all-scenarios Fix #312, Generate Documentation In All Scenarios
- Loading branch information
Showing
1 changed file
with
58 additions
and
31 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 |
---|---|---|
|
@@ -7,9 +7,11 @@ on: | |
|
||
env: | ||
SIMULATION: native | ||
REPO_NAME: ${{ github.event.repository.name }} | ||
|
||
jobs: | ||
#Checks for duplicate actions. Skips push actions if there is a matching or duplicate pull-request action. | ||
# Checks for duplicate actions. Skips push actions if there is a matching or | ||
# duplicate pull-request action. | ||
checks-for-duplicates: | ||
runs-on: ubuntu-latest | ||
# Map a step output to a job output | ||
|
@@ -24,7 +26,8 @@ jobs: | |
do_not_skip: '["push", "workflow_dispatch", "schedule"]' | ||
|
||
build-docs: | ||
#Continue if checks-for-duplicates found no duplicates. Always runs for pull-requests. | ||
# Continue if checks-for-duplicates found no duplicates. Always runs for | ||
# pull-requests. | ||
needs: checks-for-duplicates | ||
if: ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' }} | ||
name: cFE Documentation | ||
|
@@ -92,7 +95,7 @@ jobs: | |
cp ./cfe/cmake/Makefile.sample Makefile | ||
cp -r ./cfe/cmake/sample_defs sample_defs | ||
# Setup the build system | ||
# Setup the build system | ||
- name: Make Prep | ||
run: make prep | ||
|
||
|
@@ -126,21 +129,12 @@ jobs: | |
exit -1 | ||
fi | ||
pdf-usersguide: | ||
needs: build-usersguide | ||
# Name the Job | ||
name: PDF Users Guide | ||
# Set the type of machine to run on | ||
runs-on: ubuntu-18.04 | ||
|
||
steps: | ||
|
||
- name: PDF generation installs | ||
- 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: PDF generation | ||
- name: Generate PDF | ||
if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}} | ||
run: | | ||
set -x | ||
|
@@ -151,7 +145,29 @@ jobs: | |
# Could add pandoc and convert to github markdown | ||
# pandoc CFE_Users_Guide.pdf -t gfm | ||
- name: Deploy | ||
- 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: | ||
needs: build-usersguide | ||
# Name the Job | ||
name: Deploy Users Guide | ||
# Set the type of machine to run on | ||
runs-on: ubuntu-18.04 | ||
|
||
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: | ||
|
@@ -164,9 +180,7 @@ jobs: | |
build-osalguide: | ||
needs: checks-for-duplicates | ||
if: ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' }} | ||
# Name the Job | ||
name: Osal Guide | ||
# Set the type of machine to run on | ||
runs-on: ubuntu-18.04 | ||
|
||
steps: | ||
|
@@ -183,7 +197,7 @@ jobs: | |
cp ./cfe/cmake/Makefile.sample Makefile | ||
cp -r ./cfe/cmake/sample_defs sample_defs | ||
# Setup the build system | ||
# Setup the build system | ||
- name: Make Prep | ||
run: make prep | ||
|
||
|
@@ -204,33 +218,26 @@ jobs: | |
make_osalguide_stderr.txt | ||
osal-apiguide-warnings.log | ||
- name: Error Check | ||
- name: Check for Errors | ||
run: | | ||
if [[ -s make_osalguide_stderr.txt ]]; then | ||
cat make_osalguide_stderr.txt | ||
exit -1 | ||
fi | ||
- name: Warning Check | ||
- name: Check for Warnings | ||
run: | | ||
if [[ -s osal-apiguide-warnings.log ]]; then | ||
cat osal-apiguide-warnings.log | ||
exit -1 | ||
fi | ||
pdf-osalguide: | ||
needs: build-osalguide | ||
# Name the Job | ||
name: PDF Osal Guide | ||
# Set the type of machine to run on | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- name: PDF generation installs | ||
- 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: PDF generation | ||
- name: Generate PDF | ||
if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}} | ||
run: | | ||
mkdir deploy | ||
|
@@ -240,12 +247,32 @@ jobs: | |
# Could add pandoc and convert to github markdown | ||
# pandoc CFE_Users_Guide.pdf -t gfm | ||
- name: Deploy | ||
- name: Cache cFS Build Environment for osalguide | ||
id: cache-osalguide | ||
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 | ||
runs-on: ubuntu-18.04 | ||
|
||
steps: | ||
- name: Cache cFS Build Environment for osalguide | ||
id: cache-osalguide | ||
uses: actions/cache@v2 | ||
with: | ||
path: /home/runner/work/${{ env.REPO_NAME }}/${{ env.REPO_NAME }}/deploy/* | ||
key: osalguide-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 | ||
SINGLE_COMMIT: true |