1# Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced 2# at the Lawrence Livermore National Laboratory. All Rights reserved. See files 3# LICENSE and NOTICE for details. LLNL-CODE-806117. 4# 5# This file is part of the MFEM library. For more information and source code 6# availability visit https://mfem.org. 7# 8# MFEM is free software; you can redistribute it and/or modify it under the 9# terms of the BSD-3 license. We welcome feedback and contributions, see file 10# CONTRIBUTING.md for details. 11 12name: repo-check 13 14permissions: 15 actions: write 16 17on: 18 push: 19 20jobs: 21 file-headers-check: 22 runs-on: ubuntu-18.04 23 24 steps: 25 - name: Cancel Previous Runs 26 uses: styfle/cancel-workflow-action@0.9.0 27 with: 28 access_token: ${{ github.token }} 29 - name: checkout mfem 30 uses: actions/checkout@v2 31 32 - name: copyright check 33 id: copyright 34 run: | 35 ./config/githooks/pre-push --copyright 36 37 continue-on-error: true 38 39 - name: license check 40 id: license 41 run: | 42 ./config/githooks/pre-push --license 43 continue-on-error: true 44 45 - name: release check 46 id: release 47 run: | 48 ./config/githooks/pre-push --release 49 continue-on-error: true 50 51 - name: wrap-up 52 if: steps.copyright.outcome != 'success' || steps.license.outcome != 'success' || steps.release.outcome != 'success' 53 run: | 54 if [[ "${{ steps.copyright.outcome }}" != "success" ]]; then 55 echo "copyright check failed, unroll log for details" 56 fi 57 if [[ "${{ steps.license.outcome }}" != "success" ]]; then 58 echo "license check failed, unroll log for details" 59 fi 60 if [[ "${{ steps.release.outcome }}" != "success" ]]; then 61 echo "release check failed, unroll log for details" 62 fi 63 exit 1 64 65 code-style: 66 runs-on: ubuntu-16.04 # needed for astyle 2.05.1 67 68 steps: 69 - name: checkout mfem 70 uses: actions/checkout@v2 71 72 - name: get astyle 73 run: | 74 sudo apt-get install astyle=2.05.1-0ubuntu1 75 76 - name: style check 77 run: | 78 ./config/githooks/pre-push --style 79 80 documentation: 81 runs-on: ubuntu-18.04 82 83 steps: 84 - name: checkout mfem 85 uses: actions/checkout@v2 86 87 - name: get doxygen and graphviz 88 run: | 89 sudo apt-get install doxygen graphviz 90 91 - name: build documentation 92 run: | 93 cd tests/scripts 94 ./runtest documentation 95 96 branch-history: 97 if: github.ref != 'refs/heads/next' && github.ref != 'refs/heads/master' 98 runs-on: ubuntu-18.04 99 100 steps: 101 - name: checkout mfem 102 uses: actions/checkout@v2 103 with: 104 fetch-depth: 0 105 106 - name: branch-history 107 run: | 108 git fetch origin master:master 109 git checkout -b gh-actions-branch-history 110 ./config/githooks/pre-push --history 111