From 25e72324b99d89881557a2fbd1a796f01a6096e4 Mon Sep 17 00:00:00 2001 From: Vincenzo Palazzo Date: Sat, 19 Oct 2024 12:02:04 +0100 Subject: [PATCH] ci: build datum inside the CI As this could be a potential spam point for our GitHub because people might submit code without verifying if it compiles. However, having this inside the CI allows us to cover a basic compilation test, which for some contributions may not require a full build. Additionally, we can ensure that the code compiles on basic Linux OS environments, like Ubuntu, or detect if there are any dependency breaks (even with minimal dependencies, so this shouldn't be an issue either). Signed-off-by: Vincenzo Palazzo --- .github/workflows/build.yaml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..f59f98f --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,31 @@ +name: Build DATUM Gateway + +on: + schedule: + - cron: '0 0 1 * *' + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Create build directory + run: mkdir -p build + + - name: Install dependencies + run: sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev libjansson-dev libmicrohttpd-dev libsodium-dev + + - name: Build DATUM Gateway + run: | + cd build + cmake .. + make -j$(nproc) \ No newline at end of file