Skip to content

adding dockerfile with cfs & onair dependencies #6

adding dockerfile with cfs & onair dependencies

adding dockerfile with cfs & onair dependencies #6

name: Documentation and Guides
# Run every time a new commit pushed to main or for pull requests
on:
push:
pull_request:
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-duplicates:
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
concurrent_skipping: 'same_content'
skip_after_successful_duplicate: 'true'
do_not_skip: '["push", "workflow_dispatch", "schedule"]'
build-docs:
# 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
runs-on: ubuntu-18.04
steps:
- name: Install Dependencies
run: sudo apt-get install doxygen graphviz -y
# Check out the cfs bundle
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: true
# Prepare build "recipes"
- 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
- 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
with:
name: cFS Docs Artifacts
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:
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
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
- 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
- name: Install Dependencies
run: sudo apt-get install doxygen graphviz -y
- name: Build OSAL Guide
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:
name: OSAL Guide Artifacts
path: |
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: |
mkdir deploy
cd ./build/docs/osalguide/apiguide/latex
make > build.txt
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
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
if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
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
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: deploy
CLEAN: false
SINGLE_COMMIT: true