-
Notifications
You must be signed in to change notification settings - Fork 13
Android ci #100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Android ci #100
Conversation
276329d to
2aa3bee
Compare
.github/workflows/build.yml
Outdated
| mkdir build | ||
| cd build | ||
| cmake -DANDROID=ON -DKDUTILS_USE_EXTERNAL_DEPENDENCIES=ON .. | ||
| make -j `nproc` |
There was a problem hiding this comment.
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:
- Set CMAKE_GENERATOR env variable to "Ninja"
- do configure with `cmake -S . -B build [MORE_OPTIONS]
- 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 |
There was a problem hiding this comment.
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: NinjaSo you won't need to repeat them in each step
There was a problem hiding this comment.
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.
No description provided.