diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml new file mode 100644 index 0000000..5dbc353 --- /dev/null +++ b/.github/workflows/linux-build.yml @@ -0,0 +1,49 @@ +name: Linux (Ubuntu) + +on: + push: + paths: + - '**.cpp' + - '**.hpp' + - '**.txt' + + branches: + - main + + pull_request: + paths: + - '**.cpp' + - '**.hpp' + + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Run clang-format + run: clang-format -i examples/*.cpp && clang-format -i tests/*.cpp && clang-format -i tests/*.hpp && clang-format -i benchmarks/*.cpp && git diff-index --quiet HEAD + + - name: Run CMake setup + working-directory: ./ + run: mkdir build/ && cd build/ && cmake ../ + + - name: Build examples + working-directory: ./build + run: make examples + + - name: Build tests + working-directory: ./build + run: make tests + + - name: Build benchmarks + working-directory: ./build + run: make benchmarks + + - name: Run tests + working-directory: ./ + run: ./build/tests/test \ No newline at end of file diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml new file mode 100644 index 0000000..90ea95f --- /dev/null +++ b/.github/workflows/windows-build.yml @@ -0,0 +1,54 @@ +name: Windows + +defaults: + run: + shell: bash + +on: + push: + paths: + - '**.cpp' + - '**.hpp' + + branches: + - main + + pull_request: + paths: + - '**.cpp' + - '**.hpp' + - '**.txt' + + branches: + - main + +jobs: + build: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v2 + + - name: Run clang-format + shell: bash + run: C:/msys64/mingw64/bin/clang-format -i examples/*.cpp && C:/msys64/mingw64/bin/clang-format -i tests/*.cpp && C:/msys64/mingw64/bin/clang-format -i tests/*.hpp && C:/msys64/mingw64/bin/clang-format -i benchmarks/*.cpp && git diff-index --quiet HEAD + + - name: Run CMake setup + working-directory: ./ + run: mkdir build/ && cd build/ && cmake ../ + + - name: Build examples + working-directory: ./build + run: make examples + + - name: Build tests + working-directory: ./build + run: make tests + + - name: Build benchmarks + working-directory: ./build + run: make benchmarks + + - name: Run tests + working-directory: ./ + run: ./build/tests/test \ No newline at end of file