diff --git a/.github/workflows/awesome_workflow.yml b/.github/workflows/awesome_workflow.yml index 6052659c..ce629396 100644 --- a/.github/workflows/awesome_workflow.yml +++ b/.github/workflows/awesome_workflow.yml @@ -1,23 +1,22 @@ name: Awesome CI Workflow -on: [push] +on: [push, pull_request] # push: # branches: [ master ] # pull_request: # branches: [ master ] jobs: - code_format: + MainSequence: name: Code Formatter runs-on: ubuntu-latest steps: + - uses: actions/checkout@v1 # v2 is broken for git diff + - uses: actions/setup-python@v2 - name: requirements run: | sudo apt -qq -y update sudo apt -qq install clang-format - - uses: actions/checkout@master - with: - submodules: true - name: Setup Git Specs run: | git config --global user.name github-actions @@ -38,7 +37,7 @@ jobs: if [ ${fname} != ${new_fname} ] then echo " ${fname} --> ${new_fname}" - git "mv" "-f" "${fname}" "${new_fname}" + git "mv" "${fname}" ${new_fname} fi done git commit -am "formatting filenames $GITHUB_SHA" || true @@ -48,6 +47,7 @@ jobs: do clang-format --verbose -i --style="$line1 $line2 $line3 $line4" "$fname" done + git commit -am "formatting source-code for $GITHUB_SHA" || true env: line1: "{ BasedOnStyle: LLVM, UseTab: Never," line2: "IndentWidth: 4, TabWidth: 4, BreakBeforeBraces: Allman," @@ -56,15 +56,6 @@ jobs: - name: Git Push run: git push --force origin HEAD:$GITHUB_REF || true - update_directory_md: - name: Update Directory.md - needs: code_format - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v1 - - name: pull latest commit - run: git pull - name: Update DIRECTORY.md shell: python run: | @@ -122,7 +113,7 @@ jobs: build: name: Compile checks runs-on: ${{ matrix.os }} - needs: [update_directory_md] + needs: [MainSequence] strategy: matrix: os: [ubuntu-latest, windows-latest, macOS-latest] @@ -130,6 +121,5 @@ jobs: - uses: actions/checkout@master with: submodules: true - - run: git pull - run: cmake -B ./build -S . - run: cmake --build build