Unverified Commit 52091d36 authored by Gao, Xiang's avatar Gao, Xiang Committed by GitHub
Browse files

Add clang-format ci (#524)



* Add clang-format ci

* format
Co-authored-by: default avatarFarhad Ramezanghorbani <farhadrgh@users.noreply.github.com>
parent b6837658
name: clang-format
on:
pull_request:
push:
branches:
- master
schedule:
- cron: '0 0 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Lint with clang-format
run: |
find -name '*.cpp' -o -name '*.h' -o -name '*.cu' -o -name '*.cuh' | xargs clang-format -i
GIT_DIFF=$(git diff)
if [[ -z $GIT_DIFF ]]; then
exit 0
fi
echo $GIT_DIFF
exit 1
// This file only exists temporarily for validating the clang-format CI
// This file should be deleted when https://github.com/aiqm/torchani/pull/516
// or https://github.com/aiqm/torchani/pull/521 is merged.
#include <stdio.h>
#include <stdlib.h>
__global__ void print_from_gpu(void) {
printf("Hello World! from thread [%d,%d] \
From device\n",
threadIdx.x, blockIdx.x);
}
int main(void) {
printf("Hello World from host!\n");
print_from_gpu<<<1, 1>>>();
cudaDeviceSynchronize();
return 0;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment