Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #205, Remove Duplicate Workflows #224

Merged
merged 1 commit into from
Apr 2, 2021
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
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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we name this step "check-for duplicates"? We can open a new issue for this.

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