Skip to content

Commit

Permalink
Merge pull request #224 from ArielSAdamsNASA/fix-205-remove_duplicate…
Browse files Browse the repository at this point in the history
…_workflows

Fix #205, Remove Duplicate Workflows
  • Loading branch information
astrogeco authored Apr 2, 2021
2 parents b01abf3 + 0cbfdd7 commit c957990
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 16 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/build-cfs-deprecated.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,36 @@
name: "Deprecated Build, Test, and Run"

# Run every time a new commit pushed to main or for pull requests
# Run every time a new commit pushed or for pull requests
on:
push:
branches:
- main

pull_request:

env:
SIMULATION: native
OMIT_DEPRECATED: false

jobs:

#Checks for duplicate actions. Skips push actions if there is a matching or duplicate pull-request action.
duplicate-job:
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"]'

# Set the job key. The key is displayed as the job name
# when a job name is not provided

build-cfs:
#Continue if duplicate-job found no duplicates. Always runs for pull-requests.
needs: duplicate-job
if: ${{ needs.duplicate-job.outputs.should_skip != 'true' }}
name: Build
runs-on: ubuntu-18.04

Expand Down
23 changes: 18 additions & 5 deletions .github/workflows/build-cfs.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,33 @@
name: Build, Test, and Run [OMIT_DEPRECATED=true]

# Run every time a new commit pushed to main or for pull requests
# Run every time a new commit pushed or for pull requests
on:
push:
branches:
- main

pull_request:

env:
SIMULATION: native
OMIT_DEPRECATED: true

jobs:

#Checks for duplicate actions. Skips push actions if there is a matching or duplicate pull-request action.
duplicate-job:
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"]'

build-cfs:
#Continue if duplicate-job found no duplicates. Always runs for pull-requests.
needs: duplicate-job
if: ${{ needs.duplicate-job.outputs.should_skip != 'true' }}
name: Build
runs-on: ubuntu-18.04

Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/codeql-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,40 +13,63 @@ env:
BUILDTYPE: release

jobs:
#Checks for duplicate actions. Skips push actions if there is a matching or duplicate pull-request action.
duplicate-job:
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"]'


CodeQL-Build:
#Continue if duplicate-job found no duplicates. Always runs for pull-requests.
needs: duplicate-job
if: ${{ needs.duplicate-job.outputs.should_skip != 'true' }}
runs-on: ubuntu-18.04
timeout-minutes: 15

steps:
# Checks out a copy of your repository
- name: Checkout code
if: ${{ !steps.skip-workflow.outputs.skip }}
uses: actions/checkout@v2
with:
repository: nasa/cFS
submodules: true

- name: Check versions
if: ${{ !steps.skip-workflow.outputs.skip }}
run: |
git log -1 --pretty=oneline
git submodule
- name: Initialize CodeQL
if: ${{ !steps.skip-workflow.outputs.skip }}
uses: github/codeql-action/init@v1
with:
languages: c
config-file: ./.github/codeql/codeql-config.yml

# Setup the build system
- name: Copy sample_defs
if: ${{ !steps.skip-workflow.outputs.skip }}
run: |
cp ./cfe/cmake/Makefile.sample Makefile
cp -r ./cfe/cmake/sample_defs sample_defs
# Setup the build system
- name: Make Install
if: ${{ !steps.skip-workflow.outputs.skip }}
run: make

# Run CodeQL
- name: Perform CodeQL Analysis
if: ${{ !steps.skip-workflow.outputs.skip }}
uses: github/codeql-action/analyze@v1
24 changes: 18 additions & 6 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,29 @@
name: Static Analysis

# Run this workflow every time a new commit pushed to your repository
# Run this workflow every time a new commit pushed to your repository and for pull requests
on:
push:
branches:
- main

pull_request:

jobs:
#Checks for duplicate actions. Skips push actions if there is a matching or duplicate pull-request action.
duplicate-job:
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"]'

static-analysis:
#Continue if duplicate-job found no duplicates. Always runs for pull-requests.
needs: duplicate-job
if: ${{ needs.duplicate-job.outputs.should_skip != 'true' }}
name: Run cppcheck
runs-on: ubuntu-18.04

Expand All @@ -19,8 +32,7 @@ jobs:
matrix:
cppcheck: [bundle, cfe, osal, psp]

steps:

steps:
- name: Install cppcheck
run: sudo apt-get install cppcheck -y

Expand Down

0 comments on commit c957990

Please sign in to comment.