Skip to content

operator stretch completed #151

operator stretch completed

operator stretch completed #151

Workflow file for this run

name: Source code formating check
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Update packages
run: |
sudo apt-get update
- name: Install packages
run: |
sudo apt-get -y install flex libfl-dev texlive-latex-base texlive-fonts-recommended texlive-latex-extra texlive-latex-recommended
- name: Build checkpd
working-directory: Tools/pd
run: make
- name: Build checkusing
working-directory: Tools/usingcheck
run: make
- uses: nrwl/last-successful-commit-action@v1
id: last_successful_commit_push
with:
branch: ${{ steps.branch-name.outputs.current_branch }} # Get the last successful commit for the current branch.
workflow_id: 'format.yml'
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Get changed C/C++ files
id: changed-files-specific
uses: tj-actions/changed-files@v33
with:
base_sha: ${{ steps.last_successful_commit_push.outputs.commit_hash }}
- name: Process all modified source files
run: |
export PATH=$PATH:$GITHUB_WORKSPACE/Tools/usingcheck
export PATH=$PATH:$GITHUB_WORKSPACE/Tools/pd
export PD_HEADER=$GITHUB_WORKSPACE/Tools/pd/pd.header
for file in ${{ steps.changed-files-specific.outputs.all_modified_files }}; do
echo "$file was modified"
if [[ $file == *.h ]] || [[ $file == *.hpp ]] || [[ $file == *.c ]] || [[ $file == *.cpp ]]; then
./Tools/usingcheck/usingcheck $file
./Tools/pd/checkpd --strong $file
fi
done