Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
strategy:
max-parallel: 3
matrix:
jdk: [ 17.0.12_7, 21.0.4_7, 22.0.2_9 ]
jdk: [ 17.0.13_11, 21.0.5_11, 22.0.2_9 ]
android: [ 34, 35 ]
ndk: [ 26.3.11579264, 27.0.12077973 ]
cmake: [ 3.22.1 ]
ndk: [ 26.3.11579264, 27.2.12479018 ]
cmake: [ 3.31.1 ]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -72,7 +72,8 @@ jobs:
android=${{ matrix.android }}
ndk=${{ matrix.ndk }}
cmake=${{ matrix.cmake }}
provenance: true
provenance: ${{ github.event_name != 'pull_request' }}
sbom: ${{ github.event_name != 'pull_request' }}
cache-from: type=registry,ref=user/app:latest
cache-to: type=inline
- name: Update Docker Hub repository description
Expand Down
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,21 @@
#
# Build with custom arguments:
#
# $ ./scripts/build --android 34 --jdk 22.0.1_8 --ndk 25.2.9519653 --cmake 3.22.1
# $ ./scripts/build --android 35 --jdk 22.0.2_9 --ndk 25.2.9519653 --cmake 3.31.1
#

ARG jdk=22.0.2_9
ARG android=35

FROM saschpe/android-sdk:${android}-jdk${jdk}
ARG android
ARG cmake=3.22.1
ARG cmake=3.31.1
ARG jdk
ARG ndk=27.0.12077973
ARG ndk=27.2.12479018
LABEL maintainer="Sascha Peilicke <sascha@peilicke.de"
LABEL description="Android NDK ${ndk} with CMake ${cmake} on SDK ${android} using JDK ${jdk}"

USER nonroot
ENV NDK_ROOT="${ANDROID_SDK_ROOT}/ndk/${ndk}"
RUN sdkmanager --install \
"cmake;${cmake}" \
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ available:
| 34 | ✅ | ✅ | ✅ | ✅ |
| 35 | | ✅ | ✅ | ✅ |

* Android 35 image NDK versions: __26.2.11394342__ and __27.0.12077973__
* Older Android image NDK versions: __25.2.9519653__ and __26.2.11394342__
* CMake version: __3.22.1__
* Android 35 image NDK versions: __26.2.11394342__ and __27.2.12479018__
* Previous images: __25.2.9519653__ and __26.2.11394342__
* CMake version: __3.31.1__
* Previous images: __3.22.1__

## Usage

Expand Down
6 changes: 6 additions & 0 deletions scripts/build
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ usage() {
printf " --ndk VERSION (default: %s)\n" "${DEFAULT_NDK}"
printf " --platforms (default: %s)\n" "${DEFAULT_PLATFORMS}"
printf " --push (optional, upload images to Docker Hub)\n"
printf " --verbose (optional)\n"
exit 1
}

Expand All @@ -33,6 +34,7 @@ jdk="${DEFAULT_JDK}"
ndk="${DEFAULT_NDK}"
platforms="${DEFAULT_PLATFORMS}"
cmd_push=
docker_progress=auto
while [ $# -gt 0 ]; do
key="$1"
case $key in
Expand All @@ -59,6 +61,9 @@ while [ $# -gt 0 ]; do
--push)
cmd_push=true
;;
--verbose)
docker_progress=plain
;;
-h | --help)
usage
shift # past argument
Expand Down Expand Up @@ -90,5 +95,6 @@ safe docker build \
--build-arg cmake="${cmake}" \
--build-arg jdk="${jdk}" \
--build-arg ndk="${ndk}" \
--progress "${docker_progress}" \
--tag "${image_tag}" \
.
Loading