Skip to content

Conversation

@lievenhey
Copy link

No description provided.

@lievenhey lievenhey force-pushed the android-ci branch 4 times, most recently from 276329d to 2aa3bee Compare November 6, 2025 13:18
@MiKom MiKom marked this pull request as ready for review November 6, 2025 15:04
@MiKom MiKom marked this pull request as draft November 6, 2025 15:04
Comment on lines 38 to 41
mkdir build
cd build
cmake -DANDROID=ON -DKDUTILS_USE_EXTERNAL_DEPENDENCIES=ON ..
make -j `nproc`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To simplify this a bit I'd do the following:

  1. Set CMAKE_GENERATOR env variable to "Ninja"
  2. do configure with `cmake -S . -B build [MORE_OPTIONS]
  3. build with cmake --build build

steps:
- name: Install dependencies
run: |
export CMAKE_TOOLCHAIN_FILE=/opt/android-sdk-linux/ndk/28.0.13004108/build/cmake/android.toolchain.cmake
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CMAKE_TOOLCHAIN_FILE and CMAKE_GENERATOR can be set once on the job level:

jobs:
  build-android:
    #...
    env:
      CMAKE_TOOLCHAIN_FILE: /opt/android-sdk-linux/ndk/28.0.13004108/build/cmake/android.toolchain.cmake
      CMAKE_GENERATOR: Ninja

So you won't need to repeat them in each step

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about $PATH it has self-reference and I'm not sure if:

env:
  PATH: "/opt/android-sdk-linux/cmake/3.31.5/bin/:/opt/android-sdk-linux/ndk/28.0.13004108/prebuilt/linux-x86_64/bin/:${{env:PATH}}"

will work.

Another option is a separate early step:

steps:
  - run: echo "/opt/android-sdk-linux/cmake/3.31.5/bin/:/opt/android-sdk-linux/ndk/28.0.13004108/prebuilt/linux-x86_64/bin/" >> $GITHUB_PATH

AFAIK, this adds to PATH for subsequent steps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants