diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml index 6dbac576..a66be298 100644 --- a/.github/workflows/build-android.yml +++ b/.github/workflows/build-android.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - arch: [armeabi-v7a, x86_64] + arch: [armeabi-v7a, arm64-v8a, x86_64] steps: - uses: actions/checkout@v2 with: @@ -23,9 +23,9 @@ jobs: - name: Install Dependencies run: | sudo apt-get update -y && sudo apt-get install -yqq \ - build-essential clang llvm libelf1 libelf-dev zlib1g-dev libc++-dev libc++abi-dev \ + build-essential clang llvm zlib1g-dev libc++-dev libc++abi-dev \ sudo \ && sudo apt-get -y clean - name: Build xmake android examples/c run: | - cd examples/c && xmake f -p android -a ${{ matrix.arch }} -m release -y && xmake -y + cd examples/c && xmake f -p android -a ${{ matrix.arch }} --require-bpftool=y -y && xmake -y diff --git a/examples/c/xmake.lua b/examples/c/xmake.lua index 1854335c..add93258 100644 --- a/examples/c/xmake.lua +++ b/examples/c/xmake.lua @@ -21,7 +21,21 @@ else add_requires("linux-headers") end -add_includedirs("../../vmlinux") +if is_arch("arm64", "arm64-v8a") then + add_includedirs("../../vmlinux/arm64") +elseif is_arch("arm.*") then + add_includedirs("../../vmlinux/arm") +elseif is_arch("riscv32", "riscv64") then + add_includedirs("../../vmlinux/riscv") +elseif is_arch("loongarch") then + add_includedirs("../../vmlinux/loongarch") +elseif is_arch("ppc", "powerpc") then + add_includedirs("../../vmlinux/powerpc") +elseif is_arch("x86_64", "i386") then + add_includedirs("../../vmlinux/x86") +else + add_includedirs("../../vmlinux") +end -- we can run `xmake f --require-bpftool=y` to pull bpftool from xmake-repo repository if has_config("require-bpftool") then