[feat] mask out rejected tokens with -1 in Rejection Sampler #34
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: clang-format | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
clang-format: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install clang-format | |
run: | | |
sudo apt-get install -y clang-format colordiff | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Run clang-format | |
run: | | |
extensions="c,h,m,mm,cc,cp,cpp,c++,cxx,hh,hpp,hxx,inc,cu,cuh,proto,protodevel" | |
diff=`git-clang-format --extensions=$extensions --diff --commit ${{ github.event.pull_request.base.sha }}` | |
[ "$diff" = "no modified files to format" ] && exit 0 | |
[ "$diff" = "clang-format did not modify any files" ] && exit 0 | |
printf "\nYou have introduced coding style breakages. You can:\n" | |
echo "- 1> Fix the errors with git-clang-format" | |
echo "- 2> Disable checks on section of the code with:" | |
echo " // clang-format off" | |
echo " code" | |
echo " // clang-format on" | |
printf "\n\033[1mSuggested changes:\n\n" | |
echo "$diff" | colordiff | |
exit 1 |