diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..8b37187 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +name: PlatformIO CI + +on: + workflow_dispatch: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + clang-format-check: + name: Clang-format formatting check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Run clang-format style check. + uses: jidicula/clang-format-action@v4.11.0 + with: + clang-format-version: '14' + include-regex: ^.*\.(cpp|hpp)$ + + build: + name: Build the project + runs-on: ubuntu-latest + steps: + - name: Checkout the repository + uses: actions/checkout@v3 + - name: Prepare build and Husarion SDK + run: | + mkdir build + wget http://files.fictionlab.pl/husarion/Husarion_SDK-stable.zip + unzip Husarion_SDK-stable.zip -d hFramework + - name: Configure and build the project + uses: threeal/cmake-action@v1.3.0 + with: + run-build: true + options: HFRAMEWORK_PATH=../hFramework + +