From 418b2183cec020c8382646eb2435243c95b06903 Mon Sep 17 00:00:00 2001 From: mat <26722564+matcool@users.noreply.github.com> Date: Mon, 11 Nov 2024 15:30:46 -0300 Subject: [PATCH] add test workflow (#6) --- .editorconfig | 3 +++ .github/workflows/test.yml | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 .github/workflows/test.yml 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