Skip to content

Commit

Permalink
fixed Github actions CI workflow
Browse files Browse the repository at this point in the history
to mimic changes in C++ repo
  • Loading branch information
kvedala committed Jun 20, 2020
1 parent 10122ed commit b1d92cb
Showing 1 changed file with 7 additions and 17 deletions.
24 changes: 7 additions & 17 deletions .github/workflows/awesome_workflow.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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,"
Expand All @@ -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: |
Expand Down Expand Up @@ -122,14 +113,13 @@ jobs:
build:
name: Compile checks
runs-on: ${{ matrix.os }}
needs: [update_directory_md]
needs: [MainSequence]
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@master
with:
submodules: true
- run: git pull
- run: cmake -B ./build -S .
- run: cmake --build build

0 comments on commit b1d92cb

Please sign in to comment.