From 0b521aeb6ced762e56ed1425a4dd1acd30a4fc4c Mon Sep 17 00:00:00 2001 From: Stas Sergeev Date: Mon, 22 Jul 2024 16:56:09 +0300 Subject: [PATCH] CI: add build workflow --- .github/workflows/ci-build.yml | 30 ++++++++++++++++++++++++++++++ ci_prereq.sh | 9 +++++++++ 2 files changed, 39 insertions(+) create mode 100644 .github/workflows/ci-build.yml create mode 100755 ci_prereq.sh diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml new file mode 100644 index 00000000..817dc935 --- /dev/null +++ b/.github/workflows/ci-build.yml @@ -0,0 +1,30 @@ +name: Build and test +on: + pull_request: + types: + - opened + - edited + - ready_for_review + - reopened + - synchronize + push: + +jobs: + Build_and_test: + name: Build and test + + if: contains(github.event.head_commit.message, '[skip ci]') == false + + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@v4 + + - name: Package install + run: ./ci_prereq.sh + + - name: Build + run: | + make + sudo make install + make demos diff --git a/ci_prereq.sh b/ci_prereq.sh new file mode 100755 index 00000000..35b32ff6 --- /dev/null +++ b/ci_prereq.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +sudo apt-get update +sudo apt install -y \ + devscripts \ + equivs + +sudo add-apt-repository ppa:stsp-0/thunk-gen +mk-build-deps --install --root-cmd sudo