diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8e96b8124..c91f867a5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -67,43 +67,3 @@ test-ubuntu: docker exec retroshare curl --verbose http://127.0.0.1:9092/rsMsgs/getChatLobbyList | jq - docker container stop retroshare - -build-android-arm-apk: - stage: build - script: - - mkdir Dockercontext - - > - docker build -t retroshare:android_arm_latest - $($CI_PROJECT_DIR/build_scripts/GitlabCI/getRepoArgs.sh) - --build-arg RS_SERVICE_QMAKE_EXTRA_OPTS="$RS_SERVICE_QMAKE_EXTRA_OPTS" - --file $CI_PROJECT_DIR/build_scripts/GitlabCI/Android.Dockerfile - Dockercontext -# see https://stackoverflow.com/a/59055906 - - > - docker cp - $(docker create --rm retroshare:android_arm_latest):/retroshare-service-android-build/android-build/build/outputs/apk/debug/android-build-debug.apk - $CI_PROJECT_DIR/RetroShare_Android_Service-arm.apk - artifacts: - paths: - - RetroShare_Android_Service-arm.apk - -# Use separate runner to avoid no space left on device -build-android-arm64-apk: - stage: build - script: - - mkdir Dockercontext - - > - docker build -t retroshare:android_arm64_latest - $($CI_PROJECT_DIR/build_scripts/GitlabCI/getRepoArgs.sh) - --build-arg ANDROID_PLATFORM_VER=21 - --build-arg ANDROID_NDK_ARCH=arm64 - --build-arg RS_SERVICE_QMAKE_EXTRA_OPTS="$RS_SERVICE_QMAKE_EXTRA_OPTS" - --file $CI_PROJECT_DIR/build_scripts/GitlabCI/Android.Dockerfile - Dockercontext - - > - docker cp - $(docker create --rm retroshare:android_arm64_latest):/retroshare-service-android-build/android-build/build/outputs/apk/debug/android-build-debug.apk - $CI_PROJECT_DIR/RetroShare_Android_Service-arm64.apk - artifacts: - paths: - - RetroShare_Android_Service-arm64.apk diff --git a/README.asciidoc b/README.asciidoc index 63890af9e..e1f41e74d 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -9,9 +9,10 @@ RetroShare provides file sharing, chat, messages, forums, channels and more. .Build Status |=============================================================================== -|GNU/Linux, Android (via Gitlab CI) | image:https://gitlab.com/RetroShare/RetroShare/badges/master/pipeline.svg[link="https://gitlab.com/RetroShare/RetroShare/-/commits/master",title="pipeline status"] +|GNU/Linux (via Gitlab CI) | image:https://gitlab.com/RetroShare/RetroShare/badges/master/pipeline.svg[link="https://gitlab.com/RetroShare/RetroShare/-/commits/master",title="pipeline status"] |Windows (via AppVeyor) | image:https://ci.appveyor.com/api/projects/status/github/RetroShare/RetroShare?svg=true[link="https://ci.appveyor.com/project/RetroShare58622/retroshare"] |macOS, (via Travis CI) | image:https://app.travis-ci.com/RetroShare/RetroShare.svg?branch=master[link="https://app.travis-ci.com/github/RetroShare/RetroShare"] +|libretroshare GNU/Linux, Android (via Gitlab CI) | image:https://gitlab.com/RetroShare/libretroshare/badges/master/pipeline.svg[link="https://gitlab.com/RetroShare/libretroshare/-/commits/master",title="pipeline status"] |=============================================================================== == Get the source diff --git a/build_scripts/GitlabCI/base.Dockerfile b/build_scripts/GitlabCI/base.Dockerfile index b65ed1776..60d122a88 100644 --- a/build_scripts/GitlabCI/base.Dockerfile +++ b/build_scripts/GitlabCI/base.Dockerfile @@ -12,16 +12,26 @@ ## To run the container # docker run -it -p 127.0.0.1:9092:9092 "${CI_REGISTRY_IMAGE}" retroshare-service --jsonApiPort 9092 --jsonApiBindAddress 0.0.0.0 -FROM ubuntu +FROM ubuntu:21.10 ENV DEBIAN_FRONTEND=noninteractive +ENV APT_UNAT="--assume-yes --quiet" -RUN apt-get update -y && apt-get upgrade -y -qq && \ - apt-get install -y -qq build-essential cimg-dev libssl-dev libbz2-dev \ - libsqlite3-dev \ - libsqlcipher-dev libupnp-dev pkg-config libz-dev \ - qt5-default libxapian-dev qttools5-dev doxygen rapidjson-dev \ - git cmake curl +RUN apt-get update $APT_UNAT && \ + apt-get upgrade --show-upgraded $APT_UNAT && \ + apt-get clean $APT_UNAT && \ + apt-get install --no-install-recommends $APT_UNAT \ + bash build-essential cimg-dev libssl-dev libbz2-dev \ + libminiupnpc-dev \ + libsqlite3-dev libsqlcipher-dev \ + pkg-config libz-dev \ + libxapian-dev doxygen rapidjson-dev \ + git cmake curl python3 + +## Avoid git cloning spuriously failing with +# server certificate verification failed. CAfile: none CRLfile: none +RUN apt-get install --no-install-recommends $APT_UNAT --reinstall \ + ca-certificates RUN git clone --depth 1 https://github.com/aetilius/pHash.git && \ rm -rf pHash-build && mkdir pHash-build && cd pHash-build && \ @@ -34,11 +44,14 @@ ARG REPO_URL=https://gitlab.com/RetroShare/RetroShare.git ARG REPO_BRANCH=master ARG REPO_DEPTH="--depth 2000" RUN git clone $REPO_DEPTH $REPO_URL -b $REPO_BRANCH && cd RetroShare && \ - git fetch --tags && cd .. -RUN mkdir RetroShare-build && cd RetroShare-build && \ - qmake ../RetroShare \ - CONFIG+=no_retroshare_plugins \ - CONFIG+=retroshare_service CONFIG+=no_retroshare_gui \ - CONFIG+=rs_jsonapi CONFIG+=rs_deep_search && \ - (make -j$(nproc) || make -j$(nproc) || make) && make install && \ + git fetch --tags && \ + git submodule update --init --remote --force \ + libbitdht/ libretroshare/ openpgpsdk/ && \ + cd .. + +RUN \ + mkdir RetroShare-build && cd RetroShare-build && \ + cmake -B. -S../RetroShare/retroshare-service \ + -DRS_FORUM_DEEP_INDEX=ON -DRS_JSON_API=ON && \ + make -j$(nproc) && make install && \ cd .. && rm -rf RetroShare-build diff --git a/build_scripts/GitlabCI/gitlabCI.Dockerfile b/build_scripts/GitlabCI/gitlabCI.Dockerfile index aa9c6cc87..65361ff79 100644 --- a/build_scripts/GitlabCI/gitlabCI.Dockerfile +++ b/build_scripts/GitlabCI/gitlabCI.Dockerfile @@ -8,11 +8,12 @@ RUN \ cd RetroShare && git remote add testing $REPO_URL && \ git fetch --tags testing $REPO_BRANCH && \ git reset --hard testing/$REPO_BRANCH && \ + git submodule update --init --remote --force \ + libbitdht/ libretroshare/ openpgpsdk/ && \ git --no-pager log --max-count 1 RUN \ mkdir RetroShare-build && cd RetroShare-build && \ - qmake ../RetroShare CONFIG+=no_retroshare_gui \ - CONFIG+=retroshare_service \ - CONFIG+=rs_jsonapi CONFIG+=rs_deep_search && \ - (make -j$(nproc) || make -j$(nproc) || make) && make install && \ + cmake -B. -S../RetroShare/retroshare-service \ + -DRS_FORUM_DEEP_INDEX=ON -DRS_JSON_API=ON && \ + make -j$(nproc) && make install && \ cd .. && rm -rf RetroShare-build diff --git a/libretroshare b/libretroshare index 449fcbc3f..167589952 160000 --- a/libretroshare +++ b/libretroshare @@ -1 +1 @@ -Subproject commit 449fcbc3f293361b3227277e28e2879a46cdd20c +Subproject commit 16758995237494a1f39fa86f0f04cf37de121a91