From d07115a7543abe752f28fd8cc08cf28697a39f97 Mon Sep 17 00:00:00 2001 From: LIU Hao Date: Mon, 16 Oct 2023 20:51:05 +0800 Subject: [PATCH] Use GitHub Actions --- .github/workflows/c-cpp.yml | 48 +++++++++++++++++++++++++++++++++++++ ci/build.sh | 2 +- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/c-cpp.yml diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml new file mode 100644 index 000000000..199c31731 --- /dev/null +++ b/.github/workflows/c-cpp.yml @@ -0,0 +1,48 @@ +name: C/C++ CI + +on: + push: + branches: + - master + - releases/* + + pull_request: + branches: + - master + +jobs: + ubuntu: + name: Ubuntu native build + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Install dependencies + run: sudo apt-get install -y --no-install-recommends autoconf automake > + libtool g++ gettext make libedit-dev libpcre2-dev libssl-dev zlib1g-dev + + - name: Run tests + run: ./ci/build.sh + + msys2: + name: MSYS2 native build + runs-on: windows-latest + + defaults: + run: + shell: msys2 {0} + + steps: + - uses: actions/checkout@v3 + + - uses: msys2/setup-msys2@v2 + with: + msystem: MSYS + + - name: Install dependencies + run: pacman -S --noconfirm autoconf automake libtool gcc gettext make > + libedit-devel pcre2-devel openssl-devel zlib-devel libiconv-devel + + - name: Run tests + run: ./ci/build.sh diff --git a/ci/build.sh b/ci/build.sh index d779e8f59..7e9275966 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -12,7 +12,7 @@ autoreconf -ifv cd $(mktemp -d) trap 'rm -rf ~+ || true' EXIT ~-/configure --{build,host}=${CONFIGURE_HOST} ${CONFIGURE_OPTS} \ - --disable-dependency-tracking --disable-silent-rules --enable-debug-checks + --disable-dependency-tracking --disable-silent-rules --enable-debug-checks # test if ! make -j$(nproc) distcheck DISTCHECK_CONFIGURE_FLAGS=${CONFIGURE_OPTS}