diff --git a/.editorconfig b/.editorconfig index c1e2c64..70e0c4a 100644 --- a/.editorconfig +++ b/.editorconfig @@ -10,3 +10,6 @@ end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true + +[*.yml] +indent_size = 2 \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..fb863d2 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,32 @@ +name: Build and test + +on: + push: + branches: "**" + pull_request: + branches: "**" + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - uses: seanmiddleditch/gha-setup-ninja@v4 + + - name: Install GCC 12 + run: | + sudo apt install -y gcc-12 g++-12 + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100 + sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100 + + - name: Configure CMake + run: cmake -B build -G Ninja + + - name: Build + run: cmake --build build --parallel + + - name: Test + working-directory: build/test + run: ctest