From c93482f0f6ac00031571f78ebede33c41166f412 Mon Sep 17 00:00:00 2001 From: Metin Kale Date: Mon, 25 Dec 2023 15:54:07 +0100 Subject: [PATCH] ci --- .github/workflows/androidci.yml | 25 ++++++++++++++++++ .gitlab-ci.yml | 46 --------------------------------- 2 files changed, 25 insertions(+), 46 deletions(-) create mode 100644 .github/workflows/androidci.yml delete mode 100644 .gitlab-ci.yml diff --git a/.github/workflows/androidci.yml b/.github/workflows/androidci.yml new file mode 100644 index 00000000..3084b321 --- /dev/null +++ b/.github/workflows/androidci.yml @@ -0,0 +1,25 @@ +name: Android CI + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + cache: gradle + + - name: Grant execute permission for ci_build.sh + run: chmod +x ci_build.sh + - name: Build with ci_build.sj + run: ./ci_build.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 4a18b11f..00000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,46 +0,0 @@ -image: openjdk:8-jdk - -variables: - ANDROID_COMPILE_SDK: "28" - ANDROID_BUILD_TOOLS: "28.0.3" - ANDROID_SDK_TOOLS: "4333796" - -before_script: - - apt-get --quiet update --yes - - apt-get --quiet install --yes wget tar unzip lib32stdc++6 lib32z1 - - wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/sdk-tools-linux-${ANDROID_SDK_TOOLS}.zip - - unzip -d android-sdk-linux android-sdk.zip - - echo y | android-sdk-linux/tools/bin/sdkmanager "platforms;android-${ANDROID_COMPILE_SDK}" >/dev/null - - echo y | android-sdk-linux/tools/bin/sdkmanager "platform-tools" >/dev/null - - echo y | android-sdk-linux/tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS}" >/dev/null - - export ANDROID_HOME=$PWD/android-sdk-linux - - export PATH=$PATH:$PWD/android-sdk-linux/platform-tools/ - # temporarily disable checking for EPIPE error and use yes to accept all licenses - - set +o pipefail - - yes | android-sdk-linux/tools/bin/sdkmanager --licenses - - set -o pipefail - - chmod +x ./fdroidPrep.sh - - chmod +x ./gradlew - - echo "FabricApiKey=$FABRIC_APIKEY" >> ./gradle.properties - - echo "GoogleApiKey=$MAPS_KEY" >> ./gradle.properties - - echo "android.enableJetifier=true" >> ./gradle.properties - - echo "android.useAndroidX=true" >> ./gradle.properties -stages: - - build - -buildPlay: - stage: build - script: - - ./gradlew assemblePlayDebug - artifacts: - paths: - - app/build/outputs/apk/play/debug/app-play-debug.apk - -buildFdroid: - stage: build - script: - - ./fdroidPrep.sh - - ./gradlew assembleFdroidDebug - artifacts: - paths: - - app/build/outputs/apk/fdroid/debug/app-fdroid-debug.apk \ No newline at end of file