From a720cc9f7dd193ae3ee54c028775d4af92cf3a13 Mon Sep 17 00:00:00 2001 From: Guilherme Janczak Date: Wed, 31 Jan 2024 02:43:18 +0000 Subject: [PATCH] switch termux docker image provider to a maintained one --- .cirrus.yml | 10 ---------- .github/workflows/build-and-test.yml | 19 +++++++++++++++++++ meson.build | 5 +++-- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index d4c98a5..d30882e 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -69,13 +69,3 @@ task: setup_script: - pkg install -y meson ninja gcc << : *common_script - -task: - container: - image: kcubeterm/termux:x86_64 - kvm: true - name: bionic - setup_script: - - pkg install -y ninja clang python - - pip install meson - << : *common_script diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 2069984..8c59326 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -19,6 +19,25 @@ on: [push, pull_request] # copypasted between jobs. You'll probably want to read the 'glibc:' task first, # it's the one that requires the least hacks. jobs: + bionic: + runs-on: ubuntu-latest + container: termux/termux-docker:x86_64 + steps: + - name: setup + run: | + /entrypoint.sh pkg install -y ninja clang python git + /entrypoint.sh pip install meson + git clone --depth 1 -b $GITHUB_REF_NAME \ + https://github.com/$GITHUB_REPOSITORY + - name: build + run: | + meson setup -Dtest_system=true build libobsd + meson compile -C build + - name: test + run: meson test --no-suite system -C build + - name: test_system + run: meson test --suite system -C build || true + dietlibc: runs-on: ubuntu-latest steps: diff --git a/meson.build b/meson.build index 2e30e5a..a685c62 100644 --- a/meson.build +++ b/meson.build @@ -44,9 +44,10 @@ elif cc.has_header_symbol('features.h', '__dietlibc__') cxx_support = false elif cc.has_header_symbol('features.h', '__NEWLIB__') or \ cc.has_header_symbol('features.h', '__BIONIC__') or \ - cc.has_header_symbol('features.h', '__GLIBC__') or \ cc.has_header_symbol('features.h', '_GNU_SOURCE', - prefix: '''#define _ALL_SOURCE\n#undef _GNU_SOURCE''') + prefix: + '''#define _ALL_SOURCE\n#undef _GNU_SOURCE''') or \ + cc.has_header_symbol('features.h', '__GLIBC__') or \ # Some libcs (e.g. uClibc-ng) might set __GLIBC__ in features.h to try to # imitate glibc. Make sure we test for __GLIBC__ last for this reason. If the