diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml new file mode 100644 index 0000000..a04bf7e --- /dev/null +++ b/.github/workflows/build-test.yml @@ -0,0 +1,41 @@ +name: Tests + +on: + push: + branches: + - main + pull_request: + branches: + - main + workflow_dispatch: + +jobs: + build-and-test: + runs-on: ubuntu-latest + container: + image: ghcr.io/${{ github.repository_owner }}/embedded-lib-dev:latest + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Check environment + run: | + cmake --version + gcc --version + + - name: Create build directory + run: mkdir build + + - name: Configure CMake + run: cmake -DTARGET_GROUP=test .. + working-directory: ./build + + - name: Build tests + run: cmake --build . + working-directory: ./build + + - name: Run tests + run: ctest --output-on-failure + working-directory: ./build \ No newline at end of file