From f8417356ad0144ac4459b41b0a574d56b6d38469 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Sun, 14 Jul 2024 19:28:07 +0200 Subject: [PATCH] Fix CI --- .github/workflows/ci.yml | 13 +++++++++++-- Makefile | 4 ++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d852e2..1e78735 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,9 +12,18 @@ jobs: steps: - uses: actions/checkout@v4 - uses: Homebrew/actions/setup-homebrew@master + - uses: nttld/setup-ndk@v1 + id: setup-ndk + with: + ndk-version: r26d + link-to-sdk: true - run: brew install clang-format - - run: make CC=clang - - run: make check CC=clang + - run: make CC="${ANDROID_NDK_HOME}"/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android30-clang + env: + ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} + - run: make check CC="${ANDROID_NDK_HOME}"/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android30-clang + env: + ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} - run: make unit-test CC=clang actionlint: diff --git a/Makefile b/Makefile index 249a3c7..a2d8308 100644 --- a/Makefile +++ b/Makefile @@ -46,8 +46,8 @@ check: $(CLANG_FORMAT) --dry-run $(C_SOURCE) $(CLANG_TIDY) -warnings-as-errors='*' $(C_SOURCE) -- -DTERMUX_BASE_DIR=\"$(TERMUX_BASE_DIR)\" -test-binary: $(C_SOURCE) - $(CC) $(CFLAGS) $(LDFLAGS) $(C_SOURCE) -g -fsanitize=address -fno-omit-frame-pointer -DUNIT_TEST=1 -DTERMUX_BASE_DIR=\"$(TERMUX_BASE_DIR)\" -o test-binary +test-binary: src/termux-exec.c src/exec-variants.c + $(CC) $(CFLAGS) $(LDFLAGS) $^ -g -fsanitize=address -fno-omit-frame-pointer -DUNIT_TEST=1 -DTERMUX_BASE_DIR=\"$(TERMUX_BASE_DIR)\" -o test-binary deb: libtermux-exec.so termux-create-package termux-exec-debug.json