-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update GitHub Actions: Build Triggers, upload-artifact (#720)
fix(GHA): Updates GHA build triggers * update to v4 of upload-artifact gha * fix(clang-format): v18 of workflow; allows for the newest version of clang-format to always be used by removing the clang-format version specification. This might be causing the issues with clang-format reordering the libraries and things crashing on the R side when the package is tested. * refactor(build-doxygen): Uses one file with an if statement to know if the doxygen workflow should deploy after building now that it is built on changes to both dev and main. * fix(call-calc-coverage): Ignores paths on push and PR; it was ignoring paths just on workflow dispatch. Now the ignore calls are there for both PR and pushes. * Adds dependabot.yml file to update GitHub actions * Removes tags as trigger in package down * Formats the GitHub action yml files consistently; moves summary above name: and arrange on in alphabetical order, as well as branch names and files are now in order too. This standardizes the way that the files are written. References: * https://kevsoft.net/2020/06/10/running-github-action-steps-and-jobs-only-on-push-to-master.html * https://stackoverflow.com/questions/58139406/only-run-job-on-specific-branch-with-github-actions Co-authored-by: Bai-Li-NOAA <[email protected]> Co-authored-by: kellijohnson-NOAA <[email protected]>
- Loading branch information
1 parent
7cf2c14
commit 06d9a17
Showing
15 changed files
with
139 additions
and
151 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,16 +1,16 @@ | ||
# Run doxygen to generate documentation from C++ code | ||
# build doxygen, error on warnings. | ||
# Run doxygen to generate documentation from C++ code, which is the equivalent | ||
# of roxygen documentation in the R code. After building the html files, if the | ||
# action is being ran on main, the files are moved to the appropriate location | ||
# and pushed to NOAA-FIMS/FIMS-docs@main. | ||
name: run-doxygen | ||
# The default build trigger is to run the action on every push for any branch | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: | ||
- dev | ||
- main | ||
# To run the default repository branch weekly on sunday, uncomment the following 2 lines | ||
#schedule: | ||
#- cron: '0 0 * * 0' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-doxygen: | ||
|
@@ -29,8 +29,28 @@ jobs: | |
sudo apt install cmake doxygen gcc git ninja-build | ||
- name: Building HTML documentation with Doxygen | ||
# Do not run mkdir docs and mv build/html docs locally | ||
# Do not run -DDOXYGEN_WARN_AS_ERROR=YES locally | ||
# FIX? run cmake --build build --parallel 16 | ||
run: | | ||
cmake -S . -B build -G Ninja -DDOXYGEN_WARN_AS_ERROR=YES | ||
cmake --build build | ||
- name: Deploy html documentation with Doxygen | ||
# Do not run mkdir docs and mv build/html docs locally | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
run: | | ||
mv build/html ./ | ||
mv ./html ./docs | ||
- name: Push docs to FIMS-docs repo | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
uses: dmnemec/copy_file_to_another_repo_action@main | ||
env: | ||
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} | ||
with: | ||
source_file: 'docs' | ||
destination_repo: 'NOAA-FIMS/FIMS-docs' | ||
destination_branch: 'main' | ||
user_email: '[email protected]' # your email | ||
user_name: 'Christine Stawitz' # your login | ||
commit_message: 'Docs: run Doxygen' |
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
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 |
---|---|---|
@@ -1,12 +1,15 @@ | ||
# Checks that the pkgdown site builds for a repository. | ||
# this assumes pkgdown is already set up. | ||
# Checks that the pkgdown site builds for a repository, assuming that one | ||
# already exists, but it does not actually deploy it. See | ||
# call-update-pkgdown.yml for that. | ||
name: call-build-pkgdown | ||
# on specifies the build triggers. See more info at https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- dev | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
call-workflow: | ||
uses: nmfs-fish-tools/ghactions4r/.github/workflows/build-pkgdown.yml@main |
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
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
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
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 |
---|---|---|
@@ -1,17 +1,17 @@ | ||
# run devtools::spell_check() | ||
# Runs devtools::spell_check(). | ||
name: call-spell-check | ||
# on specifies the build triggers. See more info at https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows | ||
|
||
on: | ||
# this workflow runs on pushing to main, pull requests to main, and manually. | ||
push: | ||
branches: | ||
- main | ||
- dev | ||
pull_request: | ||
branches: | ||
- dev | ||
- main | ||
push: | ||
branches: | ||
- dev | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
call-workflow: | ||
uses: nmfs-fish-tools/ghactions4r/.github/workflows/spell-check.yml@main |
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 |
---|---|---|
@@ -1,12 +1,11 @@ | ||
# updates exiting pkgdown site for a repository | ||
# deploys to a branch gh-pages | ||
# Updates the exiting pkgdown site for a repository by deploying the changes | ||
# made to the pkgdown site to a branch called gh-pages. | ||
name: call-update-pkgdown | ||
# on specifies the build triggers. See more info at https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows | ||
|
||
on: | ||
# this workflow runs on pushes to main or master or any time a new tag is pushed | ||
push: | ||
branches: [main, master] | ||
tags: ['*'] | ||
branches: [main] | ||
|
||
jobs: | ||
call-workflow: | ||
uses: nmfs-fish-tools/ghactions4r/.github/workflows/update-pkgdown.yml@main |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Uses dependabot to check things | ||
version: 2 | ||
updates: | ||
# Enable version updates for GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
# The default location of the bot is `.github/workflows` | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
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
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
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
Oops, something went wrong.