From dbdab2061fc0875bb00fa0d8a4eaefe8dfd82648 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomi=20L=C3=A4hteenm=C3=A4ki?= Date: Mon, 29 Jan 2024 20:04:56 +0200 Subject: [PATCH] Setup GitHub Actions Closes #15 --- .github/workflows/build-and-test.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/build-and-test.yml diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml new file mode 100644 index 0000000..3138e87 --- /dev/null +++ b/.github/workflows/build-and-test.yml @@ -0,0 +1,26 @@ +name: Build and Test + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +env: + BUILD_TYPE: Release + +jobs: + fedora: + runs-on: ubuntu-latest + container: fedora:latest + steps: + - name: Setup + run: dnf install -y git-core cmake pkgconf gcc bison flex libcmocka-devel gnutls-devel + - uses: actions/checkout@v3 + - name: Configure CMake + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + - name: Build + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + - name: Test + run: ctest --test-dir ${{github.workspace}}/build -C ${{env.BUILD_TYPE}} +