diff --git a/.github/workflows/android-dockerimage.disabled b/.github/workflows/android-dockerimage.yml similarity index 50% rename from .github/workflows/android-dockerimage.disabled rename to .github/workflows/android-dockerimage.yml index e34a3a4b2..2b924cb38 100644 --- a/.github/workflows/android-dockerimage.disabled +++ b/.github/workflows/android-dockerimage.yml @@ -1,24 +1,18 @@ name: Android Docker Image CI -# -- disabled for now, as the resulting image is HUGE and causes our -# Android builds to fail -#on: -# push: -# paths: -# - scripts/docker/android-build-container/Dockerfile -# - .github/workflows/android-docker* - -# this is here to prevent errors about not having an on: clause on: - repository_dispatch: - types: - - unused + push: + paths: + - scripts/docker/android-build-container + - .github/workflows/android-docker* + - packaging/android/android-build-setup.sh + - packaging/android/variables.sh jobs: android-build-container: runs-on: ubuntu-latest env: - VERSION: ${{ '5.13.10' }} # the version numbers here is based on the Qt version, the third digit is the rev of the docker image + VERSION: ${{ '5.15.2' }} # the version numbers here is based on the Qt version, the third digit is the rev of the docker image steps: - uses: actions/checkout@v1 @@ -26,23 +20,22 @@ jobs: - name: Get our pre-reqs run: | cd scripts/docker/android-build-container - bash download.sh - sed -ie 's/^sudo/#sudo/' setup-docker.sh - bash setup-docker.sh + bash setup-docker.sh -no-docker-build - - name: set env + - name: Build the name for the docker image + id: build_name run: | v=${{ env.VERSION }} b=${{ github.ref }} # -BRANCH suffix, unless the branch is master b=${b/refs\/heads\//} b=${b,,} # the name needs to be all lower case if [ $b = "master" ] ; then b="" ; else b="-$b" ; fi - echo "::set-env name=NAME::subsurface/android-build-container${b}:${v}" + echo "NAME=subsurface/android-build${b}:${v}" >> $GITHUB_OUTPUT - name: Build and Publish Linux Docker image to Dockerhub - uses: elgohr/Publish-Docker-Github-Action@master + uses: elgohr/Publish-Docker-Github-Action@v5 with: - name: ${{ env.NAME }} + name: ${{ steps.build_name.outputs.NAME }} username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} dockerfile: 'Dockerfile' diff --git a/scripts/docker/android-build-container/Dockerfile b/scripts/docker/android-build-container/Dockerfile index da0bd5cd6..ac00d66ec 100644 --- a/scripts/docker/android-build-container/Dockerfile +++ b/scripts/docker/android-build-container/Dockerfile @@ -15,6 +15,7 @@ RUN apt-get update && \ WORKDIR /android +# Scrape the manually curated Qt install from the previous build image COPY --from=base /android/5.15.1 5.15.1 # install, NDK and SDK there, plus the three files from the Subsurface diff --git a/scripts/docker/android-build-container/download.sh b/scripts/docker/android-build-container/download.sh deleted file mode 100755 index fffaeb18f..000000000 --- a/scripts/docker/android-build-container/download.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -wget https://download.qt.io/official_releases/qt/5.13/5.13.1/qt-opensource-linux-x64-5.13.1.run -wget https://dl.google.com/android/repository/android-ndk-r18b-linux-x86_64.zip -wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip -wget https://ftp.osuosl.org/pub/blfs/conglomeration/cmake/cmake-3.13.2.tar.gz diff --git a/scripts/docker/android-build-container/setup-docker.sh b/scripts/docker/android-build-container/setup-docker.sh index 9aab98c7e..5ce99cb28 100755 --- a/scripts/docker/android-build-container/setup-docker.sh +++ b/scripts/docker/android-build-container/setup-docker.sh @@ -16,5 +16,9 @@ cp ../../../packaging/android/android-build-setup.sh . cp ../../../packaging/android/variables.sh . +if [ "$1X" == "-no-docker-buildX" ]; then + exit 0 +fi + # create the container (this takes a while) docker build -t android-build .