Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 24 additions & 11 deletions .github/actions/setup-cfe/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ inputs:
source-dir:
description: 'Directory to stage sources'
required: true
org:
description: 'GitHub org that hosts the repos'
default: 'cFS'

runs:
using: 'composite'
Expand All @@ -19,51 +22,59 @@ runs:
- name: Checkout PSP
uses: actions/checkout@v4
with:
repository: cFS/PSP
repository: ${{ inputs.org }}/PSP
path: ${{ inputs.source-dir }}/psp
ref: dev

- name: Checkout OSAL
uses: actions/checkout@v4
with:
repository: cFS/osal
repository: ${{ inputs.org }}/osal
path: ${{ inputs.source-dir }}/osal
ref: dev

- name: Checkout CI_LAB
uses: actions/checkout@v4
with:
repository: cFS/ci_lab
repository: ${{ inputs.org }}/ci_lab
path: ${{ inputs.source-dir }}/apps/ci_lab
ref: dev

- name: Checkout TO_LAB
uses: actions/checkout@v4
with:
repository: cFS/to_lab
repository: ${{ inputs.org }}/to_lab
path: ${{ inputs.source-dir }}/apps/to_lab
ref: dev

- name: Checkout SCH_LAB
uses: actions/checkout@v4
with:
repository: cFS/sch_lab
repository: ${{ inputs.org }}/sch_lab
path: ${{ inputs.source-dir }}/apps/sch_lab
ref: dev

- name: Checkout SAMPLE_APP
uses: actions/checkout@v4
with:
repository: cFS/sample_app
repository: ${{ inputs.org }}/sample_app
path: ${{ inputs.source-dir }}/apps/sample_app
ref: dev

- name: Checkout SAMPLE_LIB
uses: actions/checkout@v4
with:
repository: cFS/sample_lib
repository: ${{ inputs.org }}/sample_lib
path: ${{ inputs.source-dir }}/libs/sample_lib
ref: dev

- name: Checkout elf2cfetbl
if: ${{ !env.CFE_EDS_ENABLED }}
uses: actions/checkout@v4
with:
repository: cFS/elf2cfetbl
repository: ${{ inputs.org }}/elf2cfetbl
path: ${{ inputs.source-dir }}/tools/elf2cfetbl
ref: dev

- name: Add elf2cfetbl subdir
if: ${{ !env.CFE_EDS_ENABLED }}
Expand All @@ -75,8 +86,9 @@ runs:
if: ${{ env.CFE_EDS_ENABLED }}
uses: actions/checkout@v4
with:
repository: cFS/EdsLib
repository: ${{ inputs.org }}/EdsLib
path: ${{ inputs.source-dir }}/tools/eds
ref: dev

- name: Add edslib subdir
if: ${{ env.CFE_EDS_ENABLED }}
Expand All @@ -90,8 +102,9 @@ runs:
- name: Checkout commandline-tools
uses: actions/checkout@v4
with:
repository: cFS/commandline-tools
repository: ${{ inputs.org }}/cfs-commandline-tools
path: ${{ inputs.source-dir }}/tools/commandline-tools
ref: dev

- name: Add commandline-tools subdir
shell: bash
Expand Down Expand Up @@ -119,4 +132,4 @@ runs:
pwd
ls -la .
cp -r ./cfe/cmake/sample_defs ./sample_defs
cp ./cfe/cmake/Makefile.sample ./Makefile
cp ./cfe/cmake/Makefile.sample ./Makefile
85 changes: 23 additions & 62 deletions .github/workflows/build-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,94 +12,55 @@ on:
- synchronize
workflow_dispatch:
schedule:
# 10:45 PM UTC every Sunday
- cron: '45 22 * * 0'
# 11:00 PM UTC every Sunday
- cron: '0 23 * * 0'

env:
WORK_PATH: ${{ github.workspace }}

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: '["pull_request", "workflow_dispatch", "schedule"]'

checkout-and-cache:
name: Custom checkout and cache for cFS documents
needs: checks-for-duplicates
if: ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' || contains(github.ref, 'main') }}
runs-on: ubuntu-latest

steps:
- name: Checkout bundle
uses: actions/checkout@v3
- name: Checkout cFE
uses: actions/checkout@v4
with:
repository: nasa/cFS
submodules: true
path: cfe

- name: Checkout submodule
uses: actions/checkout@v3
- name: Set up Dependencies
uses: ./cfe/.github/actions/setup-cfe
with:
path: cfe
source-dir: .
preferred-ref: ${{ github.head_ref }}
org: 'nasa'

# Setup the build system
- name: Set up for build
run: make SIMULATION=native prep

- name: Cache Source and Build
id: cache-src-bld
uses: actions/cache@v3
with:
path: /home/runner/work/${{ github.event.repository.name }}/${{ github.event.repository.name }}/*
key: cfs-doc-${{ github.run_number }}
path: ${{ env.WORK_PATH }}/
key: cfs-doc-${{ github.run_id }}

build-cfe-usersguide:
needs: checkout-and-cache
name: Build and deploy cFE Docs
uses: nasa/cFS/.github/workflows/build-deploy-doc.yml@main
uses: nasa/cFS/.github/workflows/build-doc-reusable.yml@dev
with:
target: "[\"cfe-usersguide\"]"
cache-key: cfs-doc-${{ github.run_number }}
cache-key: cfs-doc-${{ github.run_id }}
buildpdf: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
deploy: false # Note can't use cache with deploy, deploy in following job instead

build-mission-doc:
# see cFS issue #877, here: https://github.com/nasa/cFS/issues/877
if: false # This will prevent the job from ever running
needs: checkout-and-cache
name: Build Mission Doc
uses: nasa/cFS/.github/workflows/build-deploy-doc.yml@main
uses: nasa/cFS/.github/workflows/build-doc-reusable.yml@dev
with:
target: "[\"mission-doc\"]"
cache-key: cfs-doc-${{ github.run_number }}
deploy: false
buildpdf: false # No need for mission pdf within cFE, done at bundle level

deploy-documentation:
needs: build-cfe-usersguide
if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
name: Deploy documentation to gh-pages
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: actions/download-artifact@v4.1.7

- name: Display structure of downloaded files
run: ls -R

- name: Move pdfs to deployment directory
run: mkdir deploy; mv */*.pdf deploy

- name: Deploy to GitHub
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: deploy
SINGLE_COMMIT: true
cache-key: cfs-doc-${{ github.run_id }}
buildpdf: false # No need for mission pdf within cFE, done at bundle level
Loading
Loading