From f3159623db20ef28d52c769df0d22d6b99befd4a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 29 Nov 2024 23:18:51 +0100 Subject: [PATCH] .github: build with GitHub actions --- .github/dependabot.yml | 6 ++++ .github/workflows/build.yml | 62 +++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/build.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..5ace460 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..4eaf0db --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,62 @@ +--- +on: + workflow_dispatch: + push: + paths-ignore: + - 'debian/**' + - 'doc/**' + - 'subprojects/**' + branches: + - master + pull_request: + paths-ignore: + - 'debian/**' + - 'doc/**' + - 'subprojects/**' + branches: + - master + +permissions: + contents: read # to fetch code (actions/checkout) + +jobs: + build: + runs-on: ubuntu-24.04 + steps: + - id: checkout + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends \ + meson \ + ccache \ + libfmt-dev \ + libcap-dev \ + libsystemd-dev + + - id: cache-ccache + uses: hendrikmuhs/ccache-action@v1 + with: + key: ${{github.job}} + + - name: Configure + run: | + meson setup \ + -Dauto_features=enabled \ + -Dwrap_mode=nofallback \ + output + + - name: Build + run: ninja -C output -v + + - name: Unit Tests + run: meson test -C output + + - name: Dump Unit Test Log + if: ${{ failure() }} + continue-on-error: true + run: cat output/meson-logs/testlog.txt