From b1d92cbddad7cc6d338e9a4d79940302d755b2fa Mon Sep 17 00:00:00 2001 From: Krishna Vedala <7001608+kvedala@users.noreply.github.com> Date: Sat, 20 Jun 2020 07:27:19 -0400 Subject: [PATCH] fixed Github actions CI workflow to mimic changes in C++ repo --- .github/workflows/awesome_workflow.yml | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) 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