Merge branch 'master' into cusparseXcsrsort #50
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
# Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced | |
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files | |
# LICENSE and NOTICE for details. LLNL-CODE-806117. | |
# | |
# This file is part of the MFEM library. For more information and source code | |
# availability visit https://mfem.org. | |
# | |
# MFEM is free software; you can redistribute it and/or modify it under the | |
# terms of the BSD-3 license. We welcome feedback and contributions, see file | |
# CONTRIBUTING.md for details. | |
name: "Checks" | |
permissions: | |
actions: write | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
# This workflow is run on pushes to any branch in the MFEM repo (with or without | |
# PRs), as well as on updates to PRs from forks. In particular, we do not | |
# duplicate work by running on both pushes and updates to local PRs. We do that | |
# by checking if the workflow trigger is 'push' ("github.event_name == 'push'") | |
# and if we are in a fork ("github.event.pull_request.head.repo.full_name != | |
# github.repository"). | |
jobs: | |
file-headers-check: | |
runs-on: ubuntu-latest | |
if: | | |
(github.event_name == 'push' || | |
github.event.pull_request.head.repo.full_name != github.repository) | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/cancel-workflow-action@0.12.1 | |
with: | |
access_token: ${{ github.token }} | |
- name: checkout mfem | |
uses: actions/checkout@v4 | |
- name: copyright check | |
id: copyright | |
run: | | |
./config/githooks/pre-push --copyright | |
continue-on-error: true | |
- name: license check | |
id: license | |
run: | | |
./config/githooks/pre-push --license | |
continue-on-error: true | |
- name: release check | |
id: release | |
run: | | |
./config/githooks/pre-push --release | |
continue-on-error: true | |
- name: math check | |
id: math | |
run: | | |
./config/githooks/pre-push --math | |
continue-on-error: true | |
- name: wrap-up | |
if: | | |
steps.copyright.outcome != 'success' || | |
steps.license.outcome != 'success' || | |
steps.release.outcome != 'success' || | |
steps.math.outcome != 'success' | |
run: | | |
if [[ "${{ steps.copyright.outcome }}" != "success" ]]; then | |
echo "copyright check failed, unroll log for details" | |
fi | |
if [[ "${{ steps.license.outcome }}" != "success" ]]; then | |
echo "license check failed, unroll log for details" | |
fi | |
if [[ "${{ steps.release.outcome }}" != "success" ]]; then | |
echo "release check failed, unroll log for details" | |
fi | |
if [[ "${{ steps.math.outcome }}" != "success" ]]; then | |
echo "math check failed, unroll log for details" | |
fi | |
exit 1 | |
code-style: | |
runs-on: ubuntu-latest | |
if: | | |
(github.event_name == 'push' || | |
github.event.pull_request.head.repo.full_name != github.repository) | |
steps: | |
- name: checkout mfem | |
uses: actions/checkout@v4 | |
- name: get astyle | |
run: | | |
sudo apt-get install astyle | |
- name: style check | |
run: | | |
./config/githooks/pre-push --style | |
documentation: | |
runs-on: ubuntu-latest | |
if: | | |
(github.event_name == 'push' || | |
github.event.pull_request.head.repo.full_name != github.repository) | |
steps: | |
- name: checkout mfem | |
uses: actions/checkout@v4 | |
- name: get doxygen and graphviz | |
run: | | |
sudo apt-get install doxygen graphviz | |
- name: update doxygen config file | |
run: | | |
cd doc | |
doxygen -u CodeDocumentation.conf.in | |
- name: build documentation | |
run: | | |
cd tests/scripts | |
./runtest documentation | |
branch-history: | |
if: | | |
github.ref != 'refs/heads/next' && | |
github.ref != 'refs/heads/master' && | |
(github.event_name == 'push' || | |
github.event.pull_request.head.repo.full_name != github.repository) | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout mfem | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: branch-history | |
run: | | |
# We override origin to make sure we point to the main repo. | |
# This is to have consistent test results on PRs from forks. | |
git remote remove origin | |
git remote add origin https://github.com/mfem/mfem.git | |
git checkout -b gh-actions-branch-history | |
./config/githooks/pre-push --history |