From c106507a0e79d85be772161bc42b44a2f2a89653 Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Thu, 3 Sep 2026 09:39:28 +0200 Subject: [PATCH 1/8] CI: first build, then assemble Signed-off-by: tobiasKaminsky --- .github/workflows/assembleFlavors.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/assembleFlavors.yml b/.github/workflows/assembleFlavors.yml index e1cddeaab50a..17dccdba6971 100644 --- a/.github/workflows/assembleFlavors.yml +++ b/.github/workflows/assembleFlavors.yml @@ -15,8 +15,26 @@ concurrency: cancel-in-progress: true jobs: + compile: + runs-on: ubuntu-latest-max + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - name: set up JDK 21 + uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0 + with: + distribution: "temurin" + java-version: 21 + - uses: gradle/actions/wrapper-validation@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0 + - name: compile + run: | + echo "org.gradle.jvmargs=-Xmx6g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g" >> gradle.properties + echo "org.gradle.caching=true" >> gradle.properties + echo "org.gradle.parallel=true" >> gradle.properties + echo "org.gradle.configureondemand=true" >> gradle.properties + ./gradlew app:compileGenericDebugSources flavor: runs-on: ubuntu-latest + needs: [compile] strategy: fail-fast: false matrix: From ad48bd94ef904c3a60bdb7e2bb19b0cff3d1fb45 Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Thu, 3 Sep 2026 10:08:34 +0200 Subject: [PATCH 2/8] CI: first build, then assemble Signed-off-by: tobiasKaminsky --- .github/workflows/QA_keystore.jks | Bin 2236 -> 0 bytes .github/workflows/QA_keystore.jks.license | 2 - .github/workflows/ai-policy.yml | 179 ------------------- .github/workflows/analysis.yml | 76 -------- .github/workflows/assembleFlavors.yml | 11 +- .github/workflows/autoApproveSync.yml | 40 ----- .github/workflows/check.yml | 32 ---- .github/workflows/codeql.yml | 60 ------- .github/workflows/configNC.sh | 86 --------- .github/workflows/configServer.sh | 20 --- .github/workflows/detectNewJavaFiles.yml | 43 ----- .github/workflows/detectWrongSettings.yml | 30 ---- .github/workflows/garm.yml | 107 ----------- .github/workflows/lib.sh | 27 --- .github/workflows/lib.sh.license | 2 - .github/workflows/lint-translations.yml | 39 ---- .github/workflows/pr-feedback.yml | 55 ------ .github/workflows/qa.yml | 85 --------- .github/workflows/renovate-approve-merge.yml | 61 ------- .github/workflows/reuse.yml | 27 --- .github/workflows/scorecard.yml | 47 ----- .github/workflows/screenShotTest.yml | 109 ----------- .github/workflows/stale.yml | 35 ---- .github/workflows/unit-tests.yml | 64 ------- .github/workflows/uploadArtifact.sh | 44 ----- 25 files changed, 10 insertions(+), 1271 deletions(-) delete mode 100644 .github/workflows/QA_keystore.jks delete mode 100644 .github/workflows/QA_keystore.jks.license delete mode 100644 .github/workflows/ai-policy.yml delete mode 100644 .github/workflows/analysis.yml delete mode 100644 .github/workflows/autoApproveSync.yml delete mode 100644 .github/workflows/check.yml delete mode 100644 .github/workflows/codeql.yml delete mode 100644 .github/workflows/configNC.sh delete mode 100644 .github/workflows/configServer.sh delete mode 100644 .github/workflows/detectNewJavaFiles.yml delete mode 100644 .github/workflows/detectWrongSettings.yml delete mode 100644 .github/workflows/garm.yml delete mode 100644 .github/workflows/lib.sh delete mode 100644 .github/workflows/lib.sh.license delete mode 100644 .github/workflows/lint-translations.yml delete mode 100644 .github/workflows/pr-feedback.yml delete mode 100644 .github/workflows/qa.yml delete mode 100644 .github/workflows/renovate-approve-merge.yml delete mode 100644 .github/workflows/reuse.yml delete mode 100644 .github/workflows/scorecard.yml delete mode 100644 .github/workflows/screenShotTest.yml delete mode 100644 .github/workflows/stale.yml delete mode 100644 .github/workflows/unit-tests.yml delete mode 100755 .github/workflows/uploadArtifact.sh diff --git a/.github/workflows/QA_keystore.jks b/.github/workflows/QA_keystore.jks deleted file mode 100644 index 2b8fb9bc231219ab7954a6e0a5fea47b5f4c61f8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2236 zcmcgt`9IW)8lKg@kEN{RL?XslW*AFZ!%cRw-mGI^n^Bg8F(k_{UE4Sk8cQTmBn(A} zO7`r_ZH_IHIfJYnozMN@`~~-i=ktD^_xK2mCAPyh1C@*{GL|Jkudx-w>OKXC?vhk ziw{3S_>|W)AO_eS9k#-ENL^Aj;q|qfm$xxV3|t_)xS8*8(pw9~MVw-hX5j1z6+y}R zI)a(9WpRX|sN6xYedH!8^2>73CH<|q*Evl-aO@S4g18~$!DZ>dXA$F#?*UfA=ZXI$ z%+1&+SeQ?USmc;XvG4Fy3sChW_4^>n#j9Hfn|M{qpiX%EsXIU9K8hFHI6)uh-E}VZ z-+qI}k^8zz=*vMV)$ne{t)}-fKe7oPDnbfq z#i^F?#Hsnb$zWWkb1!D^$4KMSrlQeu!qLY39-f8|^*6NQC67D&X?mr&+W1*ZzWM0j z#Y(w+A59X}S)X*UB%iBJclT9iQFVvQkhb=y%N6KLz3pF|BE~AUaPmE@bdTvngaUs+ zWGi0_8!$G#p{LF>UUT9wNAAZ@H=kYM`EaoI;#MzK`C)GO+X=F4G5HOHwvz?grUs_V1=f}u zGj*&z`X$aK-q?xDoK4mGcbj2esbkiPMzmsCQG9T(-x2OYi1(AG5)L@Km9<@rk&^s% zhngeJd=7WWW*$cIO3mbvZSIarYpZAdh-*xxFSO`-s~)=w!)Qt)yRhZ#Hf^TPEn5CK zX5~^R#AtF@5&lqRF#wlF`CM^&<)E8S4tvlo{acQJeUm;0LJ3#j-Sws2EfcT^Z58KS z=!{hh5~h{o&ICEF8E#qEs!$o*deZI2ZOHa@ijsW!m_JXx*PS)R(`Tet_Z@i7Mjd<% zi}tV-s$-k_tQnGe4(AcG=h?E}ciWV2Ewl%gdOdU(^leWxN!d0%El5C*UQIhy2G3cr zy5we;xLn?jKej|Of%GQ>I4avZU8O9jOG9VvK9i?fd?OtcKxx2QPT8T9iJQ|Z2J-y? z`gjo?|1MjF47P+JhWuv9hwfXN5aAd4lWr2E4t&w1srk7lE~9C6>>yCGKc5;YGG6}B z8BOmZOJPYq%-PQB(x%Ss!=bu7zqLS#*d5mZ7V7!JGbGDv;`gKhaS+@dF1sucAD8Gs za(Tr;%=i&QWQuFvyn%$h{^NB{X0|y;W`2MPbDnWe1y8h&QminbDWzz5t%ijQjhSeC zKvgapvTRjM_SwncWihMC9#~6=enRY8!QlM&3JfcHd5N4r$#QH%bO-NEtY;hhdG`<4 zj#yO3Eq$%ZPxIfwrEi~#;Yj{Q-xHEy2}oVF7<21!RG2deypsv-*42m@{POcrN>|vt z)W3vPZf-yqZS&EhQA}qn`iLM)y^?blv)QbON$oHUesj2xTL%3;m(frU*Dff(v^1!7 zn&vVFzENZ%^8NfUo;1R-GA`C8nOXbOFw`35y7jj!!kthUKnnzd-U5hFJV1oFmOvq3 z2n1#d3LF4<**KL_%u;rF!C>wa!wgj81~}QE4lp(Z#Q3tBFd+1ca3HviaghYPw|}r_ zsE?WuAn>cpj^MN-L=p&oo;L_;Vt~l69v6bo5*J1A4i1a-L7IkmnW>!uM1KvS2!8u8 zuK-Ux(%ds7AQT@I4M>aes%ZfjH4K2gfCexwV!Y^+0$~3~|F63c!N2`eij$mx62bf@ z0RrZN5W!$j{%p^^+JTu;J+}LdWFYm-&U+Jd)BCRZIj&$U%2)QcF9#Bo6%3#?3mqBP zrk;BVL>D0!seN1WS@X6Jtl4L#dn|3{qNFnbmk+g;T(fBuhDMKqsk;8t?EXy0jZXJI zCA((NMz0sn)9`npsLM~Q9qOk`S|*WXH-4EC+>ko`INs8d1Cd{7QY_)Bx%|?whSQKc zCD$)A_{m`L3@Or?JV?^6=O#SAH7X7s(2;9!4K4gbvSIgkc0H-F!k(@0BU6tgtr}H> z<{{1sY}a;~C{y@zhibG#wdfmldEsXx0eT`f+M~tIx9rUtNj|)u>+3h$sJaA|e>1 zE2XtjlFmws>Eoxe1O%&=x}eu|1=B7(Cz#TbsLA2Ja~CA_{Du%CKX+}sc+SzKif{HC zmAa@GJU*VWb!4o(8oOR1uu>JJu1U(BAxxY%*?g@lsQJ+s{U>`zjt8>s)R)3W^9*m% zy0(2ei3sV2Rb^E(^~S5LotF$nAH)oC+dvK=Ktlc&rHAWKMRXEaCG5{ zY*O!q6zS$`d5aba;ezKw6zPfFl@Iv3rs^uXX#BU6){Mr}lwDBQaHBjI)R@jp UT$x~>$nZXtB6{SH*t-|@7tCJSiU0rr diff --git a/.github/workflows/QA_keystore.jks.license b/.github/workflows/QA_keystore.jks.license deleted file mode 100644 index f070b8a4c019..000000000000 --- a/.github/workflows/QA_keystore.jks.license +++ /dev/null @@ -1,2 +0,0 @@ -SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors -SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/.github/workflows/ai-policy.yml b/.github/workflows/ai-policy.yml deleted file mode 100644 index 4502560e8319..000000000000 --- a/.github/workflows/ai-policy.yml +++ /dev/null @@ -1,179 +0,0 @@ -# This workflow is provided via the organization template repository -# -# https://github.com/nextcloud/.github -# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization -# -# SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT - -name: AI Policy - -on: - pull_request: - types: [opened, synchronize, reopened] - branches: [master, main] - -permissions: - contents: read - # Required to add the "AI assisted" label via `gh pr edit --add-label` - pull-requests: write - # Required to create the "AI assisted" label via the REST labels endpoint - # (labels are an issues-scoped resource in the GitHub API) - issues: write - -concurrency: - group: ai-policy-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - check-ai-trailers: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - fetch-depth: 0 - persist-credentials: false - - - name: Collect PR commit messages - id: collect - env: - BASE_REF: ${{ github.base_ref }} - run: | - set -euo pipefail - git fetch origin "${BASE_REF}" - MERGE_BASE=$(git merge-base "origin/${BASE_REF}" HEAD) - git log --format="%B" "${MERGE_BASE}..HEAD" > /tmp/pr_commits.txt - echo "--- PR commit messages ---" - cat /tmp/pr_commits.txt - echo "--------------------------" - - - name: Define shared agent detection patterns - run: | - set -euo pipefail - - # Email addresses known to be used by coding agents. - # These should never appear in Signed-off-by because the DCO can only be attested by a human. - EMAIL_PATTERN="copilot@github\.com\ - |noreply@anthropic\.com\ - |devin@cognition\.ai\ - |devin@cognition-labs\.com\ - |aider@aider\.chat\ - |noreply@aider\.chat\ - |codex@openai\.com\ - |cursor@anysphere\.com\ - |windsurf@codeium\.com\ - |codeium@codeium\.com\ - |amazon-q@amazon\.com\ - |codewhisperer@amazon\.com\ - |gemini-code-assist@google\.com\ - |openhands@all-hands\.dev\ - |swe-agent@princeton\.edu" - - # Strip embedded whitespace (used above only for readability) - EMAIL_PATTERN=$(echo "$EMAIL_PATTERN" | tr -d ' \n') - echo "AGENT_EMAIL_PATTERN=${EMAIL_PATTERN}" >> "$GITHUB_ENV" - - # Display-name prefixes used by known coding agents (shared by Signed-off-by and Co-Authored-By checks) - # shellcheck disable=SC2016 - echo 'AGENT_NAMES=GitHub Copilot|Claude( [A-Za-z0-9. -]+)?|Devin( AI)?|aider( \(.*\))?|OpenAI Codex|Cursor( AI)?|Windsurf|Amazon Q|CodeWhisperer|Gemini Code Assist|OpenHands|SWE-agent|AutoCodeRover|Tabnine' >> "$GITHUB_ENV" - - - name: Check for AI-assistant / Assisted-by trailers - id: ai_trailers - run: | - set -euo pipefail - AI_ASSISTED=false - if grep -qiE '^(AI-assistant|Assisted-by):' /tmp/pr_commits.txt; then - AI_ASSISTED=true - echo "Found AI-assistant/Assisted-by trailer(s):" - grep -iE '^(AI-assistant|Assisted-by):' /tmp/pr_commits.txt - fi - echo "ai_assisted=${AI_ASSISTED}" >> "$GITHUB_OUTPUT" - - - name: Check for coding-agent Signed-off-by trailers - id: agent_signoff - run: | - set -euo pipefail - - EMAIL_HITS=$(grep -iE "^Signed-off-by:.*<(${AGENT_EMAIL_PATTERN})>" /tmp/pr_commits.txt 2>/dev/null || true) - NAME_HITS=$(grep -iE "^Signed-off-by: *(${AGENT_NAMES}) *[<(]" /tmp/pr_commits.txt 2>/dev/null || true) - - AGENT_LINES=$(printf '%s\n%s' "$EMAIL_HITS" "$NAME_HITS" | sort -u | sed '/^[[:space:]]*$/d') - - AGENT_SIGNOFF=false - if [ -n "$AGENT_LINES" ]; then - AGENT_SIGNOFF=true - fi - - echo "agent_signoff=${AGENT_SIGNOFF}" >> "$GITHUB_OUTPUT" - { - echo "agent_lines<> "$GITHUB_OUTPUT" - - - name: Check for coding-agent Co-Authored-By trailers - id: co_authored - run: | - set -euo pipefail - - EMAIL_HITS=$(grep -iE "^Co-Authored-By:.*<(${AGENT_EMAIL_PATTERN})>" /tmp/pr_commits.txt 2>/dev/null || true) - NAME_HITS=$(grep -iE "^Co-Authored-By: *(${AGENT_NAMES}) *[<(]" /tmp/pr_commits.txt 2>/dev/null || true) - - CO_AUTHORED=false - if [ -n "$EMAIL_HITS" ] || [ -n "$NAME_HITS" ]; then - CO_AUTHORED=true - echo "Found coding-agent Co-Authored-By trailer(s):" - printf '%s\n%s' "$EMAIL_HITS" "$NAME_HITS" | sort -u | sed '/^[[:space:]]*$/d' - fi - - echo "co_authored=${CO_AUTHORED}" >> "$GITHUB_OUTPUT" - - - name: Create 'AI assisted' label if absent - if: steps.ai_trailers.outputs.ai_assisted == 'true' || steps.agent_signoff.outputs.agent_signoff == 'true' || steps.co_authored.outputs.co_authored == 'true' - env: - GH_TOKEN: ${{ github.token }} - run: | - gh api "repos/${{ github.repository }}/labels" \ - --method POST \ - -f name="AI assisted" \ - -f color="d93f0b" \ - -f description="This PR contains AI-assisted commits" \ - 2>/dev/null || true - - - name: Label PR as AI assisted - if: steps.ai_trailers.outputs.ai_assisted == 'true' || steps.agent_signoff.outputs.agent_signoff == 'true' || steps.co_authored.outputs.co_authored == 'true' - env: - GH_TOKEN: ${{ github.token }} - run: | - gh pr edit "${{ github.event.pull_request.number }}" \ - --repo "${{ github.repository }}" \ - --add-label "AI assisted" - echo "Added 'AI assisted' label to PR #${{ github.event.pull_request.number }}" - - - name: Fail on coding-agent Signed-off-by - if: steps.agent_signoff.outputs.agent_signoff == 'true' - env: - AGENT_LINES: ${{ steps.agent_signoff.outputs.agent_lines }} - AGENTS_MD_URL: https://github.com/${{ github.repository }}/blob/${{ github.base_ref }}/AGENTS.md - run: | - echo "::error title=Coding-agent sign-off detected::A Signed-off-by trailer from a known coding agent was found in one or more commits." - echo "" - echo "Offending trailer(s):" - echo "${AGENT_LINES}" - echo "" - echo "The 'Signed-off-by' trailer represents the Developer Certificate of Origin (DCO)" - echo "and must only be attested by a human contributor." - echo "Please amend the affected commit(s) to remove the coding-agent sign-off" - echo "and replace it with an 'Assisted-by' trailer, for example:" - echo "" - echo " Assisted-by: Claude Code:claude-sonnet-4-6" - echo "" - echo "References:" - echo " • AGENTS.md (this repository)" - echo " ${AGENTS_MD_URL}" - echo " • AI Contribution Policy" - echo " https://github.com/nextcloud/.github/blob/master/AI_POLICY.md" - echo " • Contribution Guidelines" - echo " https://github.com/nextcloud/.github/blob/master/CONTRIBUTING.md" - exit 1 diff --git a/.github/workflows/analysis.yml b/.github/workflows/analysis.yml deleted file mode 100644 index f8a4991c8ce0..000000000000 --- a/.github/workflows/analysis.yml +++ /dev/null @@ -1,76 +0,0 @@ -# synced from @nextcloud/android-config - -# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-FileCopyrightText: 2025 Alper Ozturk -# SPDX-FileCopyrightText: 2023 Tobias Kaminsky -# SPDX-FileCopyrightText: 2023 Andy Scherzinger -# SPDX-FileCopyrightText: 2023 Josh Richards -# SPDX-FileCopyrightText: 2025 Marcel Hibbe -# SPDX-License-Identifier: GPL-3.0-or-later - -name: "Analysis" - -on: - pull_request: - branches: [ "master", "main", "stable-*" ] - push: - branches: [ "master", "main", "stable-*" ] - -permissions: - pull-requests: write - contents: write - -concurrency: - group: analysis-wrapper-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - analysis: - runs-on: ubuntu-latest - steps: - - name: Disabled on forks - if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository }} - run: | - echo 'Can not analyze PRs from forks' - exit 1 - - name: Setup variables # zizmor: ignore[template-injection] - id: get-vars - run: | - if [ -z "$GITHUB_HEAD_REF" ]; then - # push - { - echo "branch=$GITHUB_REF_NAME" - echo "pr=$GITHUB_RUN_ID" - echo "repo=${{ github.repository }}" - } >> "$GITHUB_OUTPUT" - else - # pull request - { - echo "branch=$GITHUB_HEAD_REF" - echo "pr=${{ github.event.pull_request.number }}" - echo "repo=${{ github.event.pull_request.head.repo.full_name }}" - } >> "$GITHUB_OUTPUT" - fi - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - repository: ${{ steps.get-vars.outputs.repo }} - ref: ${{ steps.get-vars.outputs.branch }} - - name: Set up JDK 21 - uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0 - with: - distribution: "temurin" - java-version: 21 - - name: Install dependencies - run: | - sudo apt install python3-defusedxml - - name: Run analysis wrapper - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - mkdir -p "$HOME/.gradle" - { - echo "org.gradle.jvmargs=-Xmx1g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8" - echo "org.gradle.configureondemand=true" - } > "$HOME/.gradle/gradle.properties" - scripts/analysis/analysis-wrapper.sh "${{ steps.get-vars.outputs.branch }}" "${{ secrets.LOG_USERNAME }}" "${{ secrets.LOG_PASSWORD }}" "$GITHUB_RUN_NUMBER" "${{ steps.get-vars.outputs.pr }}" diff --git a/.github/workflows/assembleFlavors.yml b/.github/workflows/assembleFlavors.yml index 17dccdba6971..a2469208413b 100644 --- a/.github/workflows/assembleFlavors.yml +++ b/.github/workflows/assembleFlavors.yml @@ -32,6 +32,12 @@ jobs: echo "org.gradle.parallel=true" >> gradle.properties echo "org.gradle.configureondemand=true" >> gradle.properties ./gradlew app:compileGenericDebugSources + - name: Upload test build + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: folder + path: . + retention-days: 2 flavor: runs-on: ubuntu-latest needs: [compile] @@ -40,7 +46,10 @@ jobs: matrix: flavor: [ Generic, Gplay, Huawei ] steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - name: Download test-build + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + name: folder - name: set up JDK 21 uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0 with: diff --git a/.github/workflows/autoApproveSync.yml b/.github/workflows/autoApproveSync.yml deleted file mode 100644 index 123b6821f945..000000000000 --- a/.github/workflows/autoApproveSync.yml +++ /dev/null @@ -1,40 +0,0 @@ -# synced from @nextcloud/android-config - -# SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-FileCopyrightText: 2023 Álvaro Brey -# SPDX-License-Identifier: GPL-3.0-or-later - -name: Auto approve sync -on: - pull_request_target: # zizmor: ignore[dangerous-triggers] - branches: - - master - - main - types: - - opened - - reopened - - synchronize - - labeled - -concurrency: - group: sync-approve-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -permissions: - pull-requests: write - -jobs: - auto-approve: - name: Auto approve sync - runs-on: ubuntu-latest-low - if: ${{ contains(github.event.pull_request.labels.*.name, 'sync') && github.actor == 'nextcloud-android-bot' }} - steps: - - name: Disabled on forks - if: ${{ github.event.pull_request.head.repo.full_name != github.repository }} - run: | - echo 'Can not approve PRs from forks' - exit 1 - - - uses: hmarr/auto-approve-action@f0939ea97e9205ef24d872e76833fa908a770363 # v4.0.0 - with: - github-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml deleted file mode 100644 index 7e5b554292d5..000000000000 --- a/.github/workflows/check.yml +++ /dev/null @@ -1,32 +0,0 @@ -# SPDX-FileCopyrightText: 2020-2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only - -name: Check - -on: - pull_request: - branches: [ master, stable-* ] - -# Declare default permissions as read only. -permissions: read-all - -concurrency: - group: check-kotlin-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - check: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - task: [ detekt, spotlessKotlinCheck, lint ] - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - name: Set up JDK 21 - uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0 - with: - distribution: "temurin" - java-version: 21 - - name: Check ${{ matrix.task }} - run: ./gradlew ${{ matrix.task }} diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index 71e86ec8bb76..000000000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,60 +0,0 @@ -# synced from @nextcloud/android-config - -# SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-FileCopyrightText: 2023-2024 Andy Scherzinger -# SPDX-FileCopyrightText: 2022 Tobias Kaminsky -# SPDX-FileCopyrightText: 2022 Álvaro Brey -# SPDX-FileCopyrightText: 2025 Marcel Hibbe -# SPDX-License-Identifier: GPL-3.0-or-later - -name: "CodeQL" - -on: - push: - branches: [ "master", "main", "stable-*" ] - pull_request: - branches: [ "master", "main" ] - schedule: - - cron: '24 18 * * 3' - -permissions: - contents: read - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - strategy: - fail-fast: false - matrix: - language: [ 'java' ] - steps: - - name: Checkout repository - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - - name: Set Swap Space - if: runner.environment == 'github-hosted' - uses: pierotofy/set-swap-space@49819abfb41bd9b44fb781159c033dba90353a7c # v1.0 - with: - swap-size-gb: 10 - - name: Initialize CodeQL - uses: github/codeql-action/init@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4.37.9 - with: - languages: ${{ matrix.language }} - - name: Set up JDK 21 - uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0 - with: - distribution: "temurin" - java-version: 21 - - name: Assemble - run: | - mkdir -p "$HOME/.gradle" - echo "org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError" > "$HOME/.gradle/gradle.properties" - ./gradlew --no-daemon assembleDebug - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4.37.9 diff --git a/.github/workflows/configNC.sh b/.github/workflows/configNC.sh deleted file mode 100644 index 966fcde64e12..000000000000 --- a/.github/workflows/configNC.sh +++ /dev/null @@ -1,86 +0,0 @@ -#!/bin/sh - -# Nextcloud Android Library -# -# SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT -# - -if [ $1 = "master" ]; then - SERVER_VERSION_MAIN="main" - SERVER_VERSION_MASTER="master" -else - SERVER_VERSION_MAIN=$1 - SERVER_VERSION_MASTER=$1 -fi - -curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash -export NVM_DIR="$HOME/.nvm" -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" - -. ~/.bashrc; nvm install node - -php /var/www/html/occ log:manage --level warning - -OC_PASS=user1 php /var/www/html/occ user:add --password-from-env --display-name='User One' user1 -OC_PASS=user2 php /var/www/html/occ user:add --password-from-env --display-name='User Two' user2 -OC_PASS=user3 php /var/www/html/occ user:add --password-from-env --display-name='User Three' user3 -OC_PASS=test php /var/www/html/occ user:add --password-from-env --display-name='Test@Test' test@test -OC_PASS=test php /var/www/html/occ user:add --password-from-env --display-name='Test Spaces' 'test test' -php /var/www/html/occ user:setting user2 files quota 1G -php /var/www/html/occ group:add users -php /var/www/html/occ group:adduser users user1 -php /var/www/html/occ group:adduser users user2 -php /var/www/html/occ group:adduser users test - -git clone --depth=1 -b $SERVER_VERSION_MASTER https://github.com/nextcloud/activity.git /var/www/html/apps/activity/ -php /var/www/html/occ app:enable -f activity - -git clone --depth=1 -b $SERVER_VERSION_MAIN https://github.com/nextcloud/text.git /var/www/html/apps/text/ -php /var/www/html/occ app:enable -f text - -git clone --depth=1 -b $SERVER_VERSION_MASTER https://github.com/nextcloud/end_to_end_encryption.git /var/www/html/apps/end_to_end_encryption/ -php /var/www/html/occ app:enable -f end_to_end_encryption - -git clone --depth=1 -b $SERVER_VERSION_MASTER https://github.com/nextcloud/password_policy.git /var/www/html/apps/password_policy/ -php /var/www/html/occ app:enable -f password_policy - -git clone --depth=1 -b $SERVER_VERSION_MASTER https://github.com/nextcloud/external.git /var/www/html/apps/external/ -cd /var/www/html/apps/external; composer install --no-dev -php /var/www/html/occ app:enable -f external -php /var/www/html/occ config:app:set external sites --value="{\"1\":{\"id\":1,\"name\":\"Nextcloud\",\"url\":\"https:\/\/www.nextcloud.com\",\"lang\":\"\",\"type\":\"link\",\"device\":\"\",\"icon\":\"external.svg\",\"groups\":[],\"redirect\":false},\"2\":{\"id\":2,\"name\":\"Forum\",\"url\":\"https:\/\/help.nextcloud.com\",\"lang\":\"\",\"type\":\"link\",\"device\":\"\",\"icon\":\"external.svg\",\"groups\":[],\"redirect\":false}}" - -git clone --depth=1 -b $SERVER_VERSION_MAIN https://github.com/nextcloud/files_lock.git /var/www/html/apps/files_lock/ -php /var/www/html/occ app:enable -f files_lock - -git clone --depth=1 -b $SERVER_VERSION_MASTER https://github.com/nextcloud/notifications.git /var/www/html/apps/notifications/ -cd /var/www/html/apps/notifications; composer install --no-dev -php /var/www/html/occ app:enable -f notifications - -if [ $1 = 'stable22' ]; then - php /var/www/html/occ notification:generate test test -else - php /var/www/html/occ notification:generate test -d test -fi - -git clone --depth=1 -b $SERVER_VERSION_MASTER https://github.com/nextcloud/photos.git /var/www/html/apps/photos/ -cd /var/www/html/apps/photos; composer install --no-dev -php /var/www/html/occ app:enable -f photos - -git clone --depth=1 -b $SERVER_VERSION_MAIN https://github.com/nextcloud/assistant.git /var/www/html/apps/assistant/ -cd /var/www/html/apps/assistant; . ~/.bashrc; make -php /var/www/html/occ app:enable -f assistant - -php /var/www/html/occ app:enable -f testing - -git clone --depth 1 -b $SERVER_VERSION_MASTER https://github.com/nextcloud/files_downloadlimit.git /var/www/html/apps/files_downloadlimit/ -php /var/www/html/occ app:enable -f files_downloadlimit - -git clone --depth 1 -b $SERVER_VERSION_MASTER https://github.com/nextcloud/recommendations.git /var/www/html/apps/recommendations/ -cd /var/www/html/apps/recommendations; composer install --no-dev -php /var/www/html/occ app:enable -f recommendations - -git clone --depth 1 -b $SERVER_VERSION_MASTER https://github.com/nextcloud/viewer.git /var/www/html/apps/viewer/ -php /var/www/html/occ app:enable -f viewer - -php /var/www/html/occ config:system:set ratelimit.protection.enabled --value false --type bool diff --git a/.github/workflows/configServer.sh b/.github/workflows/configServer.sh deleted file mode 100644 index e87cbbf0f35e..000000000000 --- a/.github/workflows/configServer.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -# Nextcloud Android Library -# -# SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT -# - -wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg -apt-get update && apt-get install -y composer -mkdir /var/www/.nvm /var/www/.npm -mkdir /var/www/.cache/ -touch /var/www/.bashrc -chown -R 33:33 /var/www/.nvm /var/www/.npm /var/www/.bashrc /var/www/.cache - -cd /var/www/html/ -rm data -rf -rm config/config.php -su www-data -c "git reset --hard" -BRANCH="$1" /usr/local/bin/initnc.sh diff --git a/.github/workflows/detectNewJavaFiles.yml b/.github/workflows/detectNewJavaFiles.yml deleted file mode 100644 index 8bcb9720d81c..000000000000 --- a/.github/workflows/detectNewJavaFiles.yml +++ /dev/null @@ -1,43 +0,0 @@ -# synced from @nextcloud/android-config - -# SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-FileCopyrightText: 2023 Andy Scherzinger -# SPDX-FileCopyrightText: 2022 Tobias Kaminsky -# SPDX-FileCopyrightText: 2022 Álvaro Brey -# SPDX-License-Identifier: GPL-3.0-or-later - -name: "Detect new java files" - -on: - pull_request: - branches: [ master, main, stable-* ] - -permissions: read-all - -concurrency: - group: detect-new-java-files-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - detectNewJavaFiles: - runs-on: ubuntu-latest-low - steps: - - id: file_changes - uses: trilom/file-changes-action@a6ca26c14274c33b15e6499323aac178af06ad4b # v1.2.4 - with: - output: ',' - - name: Detect new java files - run: | - if [ -z '${{ steps.file_changes.outputs.files_added }}' ]; then - echo "No new files added" - exit 0 - fi - new_java=$(echo '${{ steps.file_changes.outputs.files_added }}' | tr ',' '\n' | grep '\.java$' | cat) - if [ -n "$new_java" ]; then - # shellcheck disable=SC2016 - printf 'New java files detected:\n```\n%s\n```\n' "$new_java" | tee "$GITHUB_STEP_SUMMARY" - exit 1 - else - echo "No new java files detected" - exit 0 - fi diff --git a/.github/workflows/detectWrongSettings.yml b/.github/workflows/detectWrongSettings.yml deleted file mode 100644 index 880dd38f180e..000000000000 --- a/.github/workflows/detectWrongSettings.yml +++ /dev/null @@ -1,30 +0,0 @@ -# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-FileCopyrightText: 2023 Tobias Kaminsky -# SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only - -name: "Detect wrong settings" - -on: - pull_request: - branches: [ master, stable-* ] - -# Declare default permissions as read only. -permissions: read-all - -concurrency: - group: detect-wrong-settings-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - detectWrongSettings: - runs-on: ubuntu-24.04 - - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - name: Set up JDK 21 - uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0 - with: - distribution: "temurin" - java-version: 21 - - name: Detect SNAPSHOT - run: scripts/analysis/detectWrongSettings.sh diff --git a/.github/workflows/garm.yml b/.github/workflows/garm.yml deleted file mode 100644 index 945415d42073..000000000000 --- a/.github/workflows/garm.yml +++ /dev/null @@ -1,107 +0,0 @@ -# SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT - -name: "Garm" - -on: - pull_request: - branches: [ master, stable-* ] - -permissions: - contents: read - pull-requests: write - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - test: - runs-on: ubuntu-24.04 - services: - server: - image: ${{ matrix.server == 'stable22' && 'ghcr.io/nextcloud/continuous-integration-shallow-server-php8.0:1' || 'ghcr.io/nextcloud/continuous-integration-shallow-server-php8.3:latest' }} - options: --name server - ports: - - 80:80 - strategy: - fail-fast: false - matrix: - server: [ master ] # [ stable22, stable33, master ] - api-level: [ 29 ] # [ 21, 36 ] - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - - name: configure server - run: | - sudo apt-get update && sudo apt-get install unzip cpu-checker qemu-kvm --yes - sudo chmod 666 /dev/kvm - docker cp .github/workflows/configServer.sh server:/tmp/ - docker exec server chmod +x /tmp/configServer.sh - docker exec server /tmp/configServer.sh ${{ matrix.server }} - docker cp .github/workflows/configNC.sh server:/tmp/ - docker exec server chmod +x /tmp/configNC.sh - docker exec --user www-data server /tmp/configNC.sh ${{ matrix.server }} - docker exec server /usr/local/bin/run.sh - - - name: set up JDK 21 - uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0 - with: - distribution: "temurin" - java-version: 21 - - - name: Enable KVM group perms - run: | - echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules - sudo udevadm control --reload-rules - sudo udevadm trigger --name-match=kvm - - - name: Configure gradle daemon - run: | - mkdir -p $HOME/.gradle - echo "org.gradle.jvmargs=-Xmx6g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g" >> $HOME/.gradle/gradle.properties - echo "org.gradle.caching=true" >> $HOME/.gradle/gradle.properties - echo "org.gradle.parallel=true" >> $HOME/.gradle/gradle.properties - echo "org.gradle.configureondemand=true" >> $HOME/.gradle/gradle.properties - - - name: Config gplay - run: | - sed -i s#http://server#http://10.0.2.2# gradle.properties - sed -i s'#false#true#'g app/src/main/res/values/setup.xml - - - name: wait and ping server - run: | - while ! curl http://localhost/status.php 2>&1 | grep installed; do - echo "wait…" - sleep 5 - done - - - name: gplay - env: - GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }} - uses: reactivecircus/android-emulator-runner@a421e43855164a8197daf9d8d40fe71c6996bb0d # v2.38.0 - with: - api-level: ${{ matrix.api-level }} - cmake: 4.1.2 - force-avd-creation: false - arch: x86_64 - sdcard-path-or-size: 100M - target: google_apis - emulator-options: -no-metrics -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -skin 500x833 - script: scripts/runCombinedTest.sh ${{github.event.number}} ${{ secrets.LOG_USERNAME }} ${{ secrets.LOG_PASSWORD }} ${{github.event.number}} ${{ matrix.server }} - - - name: upload failing results - if: ${{ failure() }} - env: - LOG_USERNAME: ${{ secrets.LOG_USERNAME }} - LOG_PASSWORD: ${{ secrets.LOG_PASSWORD }} - GIT_USERNAME: ${{ secrets.GIT_USERNAME }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: scripts/uploadReport.sh "${{ secrets.LOG_USERNAME }}" "${{ secrets.LOG_PASSWORD }}" ${{github.event.number}} ${{ matrix.server }} "IT" ${{github.event.number}} - - name: Archive Espresso results - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - if: ${{ always() }} - with: - name: Report-${{ matrix.server }}-${{ matrix.api-level }} - path: app/build/reports - retention-days: 4 diff --git a/.github/workflows/lib.sh b/.github/workflows/lib.sh deleted file mode 100644 index 3bb8b10f7930..000000000000 --- a/.github/workflows/lib.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash -# -# SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-FileCopyrightText: 2022 Álvaro Brey -# SPDX-License-Identifier: AGPL-3.0-or-later -# - -## This file is intended to be sourced by other scripts - - -function err() { - echo >&2 "$@" -} - - -function curl_gh() { - if [[ -n "$GITHUB_TOKEN" ]] - then - curl \ - --silent \ - --header "Authorization: token $GITHUB_TOKEN" \ - "$@" - else - err "WARNING: No GITHUB_TOKEN found. Skipping API call" - fi - -} diff --git a/.github/workflows/lib.sh.license b/.github/workflows/lib.sh.license deleted file mode 100644 index 23bad5cb8a9c..000000000000 --- a/.github/workflows/lib.sh.license +++ /dev/null @@ -1,2 +0,0 @@ -SPDX-FileCopyrightText: 2019-2025 Nextcloud GmbH and Nextcloud contributors -SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/.github/workflows/lint-translations.yml b/.github/workflows/lint-translations.yml deleted file mode 100644 index dbdfd6961f74..000000000000 --- a/.github/workflows/lint-translations.yml +++ /dev/null @@ -1,39 +0,0 @@ -# SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT - -name: Lint translation files - -on: - pull_request: - branches: [ master, main, stable-* ] - push: - branches: [ master, main, stable-* ] - -permissions: - contents: read - -concurrency: - group: lint-php-cs-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - lint: - runs-on: ubuntu-latest-low - - name: translations-string-xml - - steps: - - name: Checkout - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - - - name: Check for new lines in translation strings - id: counter - run: | - grep -P '' | grep '^0$' - - - name: Output - if: failure() - run: | - grep -P '' diff --git a/.github/workflows/pr-feedback.yml b/.github/workflows/pr-feedback.yml deleted file mode 100644 index 97ed0cf9de01..000000000000 --- a/.github/workflows/pr-feedback.yml +++ /dev/null @@ -1,55 +0,0 @@ -# This workflow is provided via the organization template repository -# -# https://github.com/nextcloud/.github -# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization - -# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-FileCopyrightText: 2023 Marcel Klehr -# SPDX-FileCopyrightText: 2023 Joas Schilling <213943+nickvergessen@users.noreply.github.com> -# SPDX-FileCopyrightText: 2023 Daniel Kesselberg -# SPDX-FileCopyrightText: 2023 Florian Steffens -# SPDX-License-Identifier: MIT - -name: 'Ask for feedback on PRs' -on: - schedule: - - cron: '30 1 * * *' - -permissions: - contents: read - pull-requests: write - -jobs: - pr-feedback: - if: ${{ github.repository_owner == 'nextcloud' }} - runs-on: ubuntu-latest-low - steps: - - name: The get-github-handles-from-website action - uses: marcelklehr/get-github-handles-from-website-action@06b2239db0a48fe1484ba0bfd966a3ab81a08308 # v1.0.1 - id: scrape - with: - website: 'https://nextcloud.com/team/' - - - name: Get blocklist - id: blocklist - run: | - blocklist=$(curl https://raw.githubusercontent.com/nextcloud/.github/master/non-community-usernames.txt | paste -s -d, -) - echo "blocklist=$blocklist" >> "$GITHUB_OUTPUT" - - - uses: nextcloud/pr-feedback-action@4709fa5b3e1821559d4c312ef937b61f1567aa44 # main - with: - feedback-message: | - Hello there, - Thank you so much for taking the time and effort to create a pull request to our Nextcloud project. - - We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. - - Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 - - Thank you for contributing to Nextcloud and we hope to hear from you soon! - - (If you believe you should not receive this message, you can add yourself to the [blocklist](https://github.com/nextcloud/.github/blob/master/non-community-usernames.txt).) - days-before-feedback: 14 - start-date: '2024-04-30' - exempt-authors: '${{ steps.blocklist.outputs.blocklist }},${{ steps.scrape.outputs.users }}' - exempt-bots: true diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml deleted file mode 100644 index c981d0a56fdf..000000000000 --- a/.github/workflows/qa.yml +++ /dev/null @@ -1,85 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-FileCopyrightText: 2023 Andy Scherzinger -# SPDX-License-Identifier: MIT -name: "QA" - -on: - pull_request: - branches: [ main, master, stable-* ] - -permissions: - pull-requests: write - contents: read - -concurrency: - group: qa-build-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - qa: - runs-on: ubuntu-latest - steps: - - name: Check if secrets are available - run: echo "ok=${{ secrets.KS_PASS != '' }}" >> "$GITHUB_OUTPUT" - id: check-secrets - - - name: Checkout - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - if: ${{ steps.check-secrets.outputs.ok == 'true' }} - with: - persist-credentials: false - - - name: set up JDK 21 - uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0 - if: ${{ steps.check-secrets.outputs.ok == 'true' }} - with: - distribution: "temurin" - java-version: 21 - - - name: Build QA - if: ${{ steps.check-secrets.outputs.ok == 'true' }} - env: - KS_PASS: ${{ secrets.KS_PASS }} - KEY_PASS: ${{ secrets.KEY_PASS }} - LOG_USERNAME: ${{ secrets.LOG_USERNAME }} - LOG_PASSWORD: ${{ secrets.LOG_PASSWORD }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - mkdir -p "$HOME/.gradle" - echo "org.gradle.jvmargs=-Xmx3g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g" > "$HOME/.gradle/gradle.properties" - echo "org.gradle.caching=true; org.gradle.parallel=true; org.gradle.configureondemand=true" >> "$HOME/.gradle/gradle.properties" - [ -e app/build.gradle ] && sed -i "/qa/,/\}/ s/versionCode .*/versionCode ${{github.event.number}} /" "app/build.gradle" - [ -e app/build.gradle ] && sed -i "/qa/,/\}/ s/versionName .*/versionName \"${{github.event.number}}\"/" "app/build.gradle" - [ -e app/build.gradle.kts ] && sed -i "/qa/,/\}/ s/versionCode .*/versionCode = ${{github.event.number}} /" "app/build.gradle.kts" - [ -e app/build.gradle.kts ] && sed -i "/qa/,/\}/ s/versionName .*/versionName = \"${{github.event.number}}\"/" "app/build.gradle.kts" - ./gradlew assembleQaDebug - $(find /usr/local/lib/android/sdk/build-tools/*/apksigner | sort | tail -n1) sign --ks-pass pass:"$KS_PASS" --key-pass pass:"$KEY_PASS" --ks-key-alias key0 --ks ".github/workflows/QA_keystore.jks" app/build/outputs/apk/qa/debug/*qa-debug*.apk - - - name: Upload APK - id: upload-apk - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f - with: - path: app/build/outputs/apk/qa/debug/*qa-debug*.apk - retention-days: 7 - archive: false - - - name: Create QR Code - run: | - sudo apt-get -y install qrencode - qrencode -o qr.png "${{ steps.upload-apk.outputs.artifact-url }}" - - - name: Upload QR - id: upload-qr - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f - with: - path: qr.png - retention-days: 7 - archive: false - - - name: Comment PR - uses: thollander/actions-comment-pull-request@e4a76dd2b0a3c2027c3fd84147a67c22ee4c90fa - with: - message: | - APK file: ${{ steps.upload-apk.outputs.artifact-url }} - To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app. - ![qrcode](${{ steps.upload-qr.outputs.artifact-url }}) (please click on link to get QR code displayed) diff --git a/.github/workflows/renovate-approve-merge.yml b/.github/workflows/renovate-approve-merge.yml deleted file mode 100644 index 507ad3697552..000000000000 --- a/.github/workflows/renovate-approve-merge.yml +++ /dev/null @@ -1,61 +0,0 @@ -# This workflow is provided via the organization template repository -# -# https://github.com/nextcloud/.github -# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization -# -# SPDX-FileCopyrightText: Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT - -name: Auto approve renovate PRs - -on: - pull_request_target: # zizmor: ignore[dangerous-triggers] - branches: - - main - - master - - stable* - -permissions: - contents: read - -concurrency: - group: renovate-approve-merge-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - auto-approve-merge: - if: github.event.pull_request.user.login == 'renovate[bot]' - runs-on: ubuntu-latest-low - permissions: - # for hmarr/auto-approve-action to approve PRs - pull-requests: write - - steps: - - name: Disabled on forks - if: ${{ github.event.pull_request.head.repo.full_name != github.repository }} - run: | - echo 'Can not approve PRs from forks' - exit 1 - - - uses: mdecoleman/pr-branch-name@55795d86b4566d300d237883103f052125cc7508 # v3.0.0 - id: branchname - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - # GitHub actions bot approve - - uses: hmarr/auto-approve-action@f0939ea97e9205ef24d872e76833fa908a770363 # v4.0.0 - if: github.actor == 'renovate[bot]' - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - ref: ${{ github.head_ref }} - - # Enable GitHub auto merge - - name: Enable Pull Request Automerge - if: github.actor == 'renovate[bot]' - run: gh pr merge --merge --auto - env: - GH_TOKEN: ${{ secrets.AUTOMERGE }} - diff --git a/.github/workflows/reuse.yml b/.github/workflows/reuse.yml deleted file mode 100644 index 67fdafc440e2..000000000000 --- a/.github/workflows/reuse.yml +++ /dev/null @@ -1,27 +0,0 @@ -# This workflow is provided via the organization template repository -# -# https://github.com/nextcloud/.github -# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization - -# SPDX-FileCopyrightText: 2022 Free Software Foundation Europe e.V. -# -# SPDX-License-Identifier: CC0-1.0 - -name: REUSE Compliance Check - -on: [pull_request] - -permissions: - contents: read - -jobs: - reuse-compliance-check: - runs-on: ubuntu-latest-low - steps: - - name: Checkout - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - - - name: REUSE Compliance Check - uses: fsfe/reuse-action@676e2d560c9a403aa252096d99fcab3e1132b0f5 # v6.0.0 diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml deleted file mode 100644 index b9701da2040a..000000000000 --- a/.github/workflows/scorecard.yml +++ /dev/null @@ -1,47 +0,0 @@ -# synced from @nextcloud/android-config - -# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-FileCopyrightText: 2023 Andy Scherzinger -# SPDX-License-Identifier: GPL-3.0-or-later - -name: Scorecard supply-chain security -on: - branch_protection_rule: - schedule: - - cron: '32 23 * * 4' - push: - branches: [ "main", "master" ] - -# Declare default permissions as read only. -permissions: read-all - -concurrency: - group: scorecard-supply-chain-security-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - analysis: - name: Scorecard analysis - runs-on: ubuntu-latest - permissions: - # Needed to upload the results to code-scanning dashboard. - security-events: write - - steps: - - name: "Checkout code" - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - - - name: "Run analysis" - uses: ossf/scorecard-action@2d1146689b8cda280b9bc96326124645441f03bc # v2.4.4 - with: - results_file: results.sarif - results_format: sarif - publish_results: false - - # Upload the results to GitHub's code scanning dashboard. - - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4.37.9 - with: - sarif_file: results.sarif diff --git a/.github/workflows/screenShotTest.yml b/.github/workflows/screenShotTest.yml deleted file mode 100644 index 6bca0cc30153..000000000000 --- a/.github/workflows/screenShotTest.yml +++ /dev/null @@ -1,109 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only - -name: "Screenshot Test" - -on: - pull_request: - branches: [ master, stable-* ] - -permissions: - contents: read - pull-requests: write - -concurrency: - group: screenshot-test-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - screenshot: - runs-on: ubuntu-24.04 - strategy: - fail-fast: false - matrix: - scheme: [ Light ] - color: [ blue ] - api-level: [ 28 ] - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - - name: Gradle cache - uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} - - name: AVD cache - uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 - id: avd-cache - with: - path: | - ~/.android/avd/* - ~/.android/adb* - key: avd-${{ matrix.api-level }} - - - uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0 - with: - distribution: "temurin" - java-version: 21 - - - name: Enable KVM group perms - run: | - echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules - sudo udevadm control --reload-rules - sudo udevadm trigger --name-match=kvm - - - name: create AVD and generate snapshot for caching - if: steps.avd-cache.outputs.cache-hit != 'true' - uses: reactivecircus/android-emulator-runner@a421e43855164a8197daf9d8d40fe71c6996bb0d # v2.38.0 - with: - api-level: ${{ matrix.api-level }} - force-avd-creation: false - arch: x86 - sdcard-path-or-size: 100M - target: google_apis - emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -skin 500x833 - script: echo "Generated AVD snapshot for caching." - - - name: Configure gradle daemon - run: | - mkdir -p $HOME/.gradle - echo "org.gradle.jvmargs=-Xmx6g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g" > $HOME/.gradle/gradle.properties - echo "org.gradle.caching=true" >> $HOME/.gradle/gradle.properties - echo "org.gradle.parallel=true" >> $HOME/.gradle/gradle.properties - echo "org.gradle.configureondemand=true" >> $HOME/.gradle/gradle.properties - - - name: Build generic flavor - run: ./gradlew assembleGenericDebug - - - name: Delete old comments - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: ${{ always() }} - run: scripts/deleteOldComments.sh "${{ matrix.color }}-${{ matrix.scheme }}" "Screenshot" ${{github.event.number}} - - - name: Run screenshot tests - env: - SHOT_TEST: "true" - uses: reactivecircus/android-emulator-runner@a421e43855164a8197daf9d8d40fe71c6996bb0d # v2.38.0 - with: - api-level: ${{ matrix.api-level }} - force-avd-creation: false - arch: x86 - sdcard-path-or-size: 100M - target: google_apis - emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -skin 500x833 - script: ./gradlew uninstallAll genericDebugExecuteScreenshotTests -Dorg.gradle.jvmargs="--add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/java.nio.channels=ALL-UNNAMED --add-exports java.base/sun.nio.ch=ALL-UNNAMED" -Pandroid.testInstrumentationRunnerArguments.annotation=com.owncloud.android.utils.ScreenshotTest -Pandroid.testInstrumentationRunnerArguments.COLOR=${{ matrix.color }} -Pandroid.testInstrumentationRunnerArguments.DARKMODE=${{ matrix.scheme }} - - name: upload failing results - if: ${{ failure() }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: scripts/uploadReport.sh "${{ secrets.LOG_USERNAME }}" "${{ secrets.LOG_PASSWORD }}" ${{github.event.number}} "${{ matrix.color }}-${{ matrix.scheme }}" "Screenshot" ${{github.event.number}} - - name: Archive Espresso results - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - if: ${{ always() }} - with: - name: Report-${{ matrix.color }}-${{ matrix.scheme }} - path: app/build/reports - retention-days: 4 diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index e9c1f291b6f1..000000000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,35 +0,0 @@ -# synced from @nextcloud/android-config - -# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-FileCopyrightText: 2023 Tobias Kaminsky -# SPDX-FileCopyrightText: 2022 Álvaro Brey -# SPDX-License-Identifier: GPL-3.0-or-later - -name: 'Close stale issues' -on: - schedule: - - cron: '0 0 * * *' - -# Declare default permissions as read only. -permissions: read-all - -jobs: - stale: - runs-on: ubuntu-latest-low - permissions: - issues: write - pull-requests: write - steps: - - uses: actions/stale@4391f3da665fdf50b6810c1a66712fb9ba21aa93 # v11.0.0 - with: - days-before-stale: 28 - days-before-close: 14 - days-before-pr-close: -1 - only-labels: 'bug,needs info' - exempt-issue-labels: 'no-stale' - stale-issue-message: >- - This bug report did not receive an update in the last 4 weeks. - Please take a look again and update the issue with new details, - otherwise the issue will be automatically closed in 2 weeks. Thank you! - exempt-all-pr-milestones: true - labels-to-remove-when-unstale: 'needs info' diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml deleted file mode 100644 index ab49d12b86cc..000000000000 --- a/.github/workflows/unit-tests.yml +++ /dev/null @@ -1,64 +0,0 @@ -# SPDX-FileCopyrightText: 2022-2025 Nextcloud GmbH and contributors -# SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only - -name: Unit tests - -on: - pull_request: - branches: [ master, stable-* ] - push: - branches: [ master, stable-* ] - -permissions: - contents: read - pull-requests: write - -concurrency: - group: unit-tests-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - test: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - - name: Set up JDK 21 - uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0 - with: - distribution: "temurin" - java-version: 21 - - - name: Delete old comments - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: ${{ always() }} - run: scripts/deleteOldComments.sh "test" "Unit" ${{github.event.number}} - - - name: Setup Gradle - uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0 - - - name: Run unit tests with coverage - run: ./gradlew jacocoTestGplayDebugUnitTest - - - name: Upload failing results - if: ${{ failure() }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: scripts/uploadReport.sh "${{ secrets.LOG_USERNAME }}" "${{ secrets.LOG_PASSWORD }}" ${{github.event.number}} "test" "Unit" ${{github.event.number}} - - - name: Upload coverage to codecov - uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 - with: - token: ${{ secrets.CODECOV_TOKEN }} - flags: unit - fail_ci_if_error: true - files: app/build/reports/jacoco/jacocoTestGplayDebugUnitTestReport/jacoco.xml - - - name: Upload jacoco artifacts - if: ${{ failure() }} - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: test-results - path: app/build/reports/jacoco/jacocoTestGplayDebugUnitTestReport/html/ diff --git a/.github/workflows/uploadArtifact.sh b/.github/workflows/uploadArtifact.sh deleted file mode 100755 index bf96572045ab..000000000000 --- a/.github/workflows/uploadArtifact.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env bash - -# -# SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-FileCopyrightText: 2019-2022 Tobias Kaminsky -# SPDX-License-Identifier: AGPL-3.0-or-later -# - -#1: LOG_USERNAME -#2: LOG_PASSWORD -#3: DRONE_BUILD_NUMBER -#4: DRONE_PULL_REQUEST - - -PUBLIC_URL=https://www.kaminsky.me/nc-dev/android-artifacts -USER=$1 -PASS=$2 -BUILD=$3 -PR=$4 -GITHUB_TOKEN=$5 -DAV_URL=https://nextcloud.kaminsky.me/remote.php/dav/files/$USER/android-artifacts/ - -source .github/workflows/lib.sh -REPO=$(cat scripts/repo) - -if ! test -e app/build/outputs/apk/qa/debug/*qa-debug*.apk ; then - exit 1 -fi -echo "Uploaded artifact to $DAV_URL/$BUILD.apk" - -# delete all old comments, starting with "APK file:" -oldComments=$(curl_gh -X GET https://api.github.com/repos/nextcloud/$REPO/issues/$PR/comments | jq '.[] | (.id |tostring) + "|" + (.user.login | test("github-actions") | tostring) + "|" + (.body | test("APK file:.*") | tostring)' | grep "true|true" | tr -d "\"" | cut -f1 -d"|") - -echo $oldComments | while read comment ; do - curl_gh -X DELETE https://api.github.com/repos/nextcloud/$REPO/issues/comments/$comment -done - -sudo apt-get -y install qrencode - -qrencode -o $PR.png "$PUBLIC_URL/$BUILD.apk" - -curl -u $USER:$PASS -X PUT $DAV_URL/$BUILD.apk --upload-file app/build/outputs/apk/qa/debug/*qa-debug*.apk -curl -u $USER:$PASS -X PUT $DAV_URL/$BUILD.png --upload-file $PR.png -curl_gh -X POST https://api.github.com/repos/nextcloud/$REPO/issues/$PR/comments -d "{ \"body\" : \"APK file: $PUBLIC_URL/$BUILD.apk

![qrcode]($PUBLIC_URL/$BUILD.png)

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app. \" }" From 3f2a31b1961708a741390faeb073619b91c4251f Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Fri, 4 Sep 2026 08:19:06 +0200 Subject: [PATCH 3/8] wip Signed-off-by: tobiasKaminsky --- .github/workflows/assembleFlavors.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/assembleFlavors.yml b/.github/workflows/assembleFlavors.yml index a2469208413b..ad58761cc175 100644 --- a/.github/workflows/assembleFlavors.yml +++ b/.github/workflows/assembleFlavors.yml @@ -62,4 +62,5 @@ jobs: echo "org.gradle.caching=true" >> gradle.properties echo "org.gradle.parallel=true" >> gradle.properties echo "org.gradle.configureondemand=true" >> gradle.properties + chmod +x ./gradlew ./gradlew assemble${{ matrix.flavor }} From 0f06a59f3a02f6f99b1fc77443ecd3b087988eca Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Fri, 4 Sep 2026 08:54:25 +0200 Subject: [PATCH 4/8] wip Signed-off-by: tobiasKaminsky --- .github/workflows/assembleFlavors.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/assembleFlavors.yml b/.github/workflows/assembleFlavors.yml index ad58761cc175..43189d4391b8 100644 --- a/.github/workflows/assembleFlavors.yml +++ b/.github/workflows/assembleFlavors.yml @@ -31,7 +31,7 @@ jobs: echo "org.gradle.caching=true" >> gradle.properties echo "org.gradle.parallel=true" >> gradle.properties echo "org.gradle.configureondemand=true" >> gradle.properties - ./gradlew app:compileGenericDebugSources + ./gradlew assembleGeneric - name: Upload test build uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: From a49a6affd6b4193a0bc06d951df83aed93f74e66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Fri, 4 Sep 2026 15:56:53 +0200 Subject: [PATCH 5/8] Also upload hidden files --- .github/workflows/assembleFlavors.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/assembleFlavors.yml b/.github/workflows/assembleFlavors.yml index 43189d4391b8..72292c592dde 100644 --- a/.github/workflows/assembleFlavors.yml +++ b/.github/workflows/assembleFlavors.yml @@ -38,6 +38,8 @@ jobs: name: folder path: . retention-days: 2 + include-hidden-files: true + flavor: runs-on: ubuntu-latest needs: [compile] From 4ce89d6e58553789d6f596ee8010642482f69f86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Fri, 4 Sep 2026 15:57:20 +0200 Subject: [PATCH 6/8] use 10GB on max --- .github/workflows/assembleFlavors.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/assembleFlavors.yml b/.github/workflows/assembleFlavors.yml index 72292c592dde..494fc3dfd68e 100644 --- a/.github/workflows/assembleFlavors.yml +++ b/.github/workflows/assembleFlavors.yml @@ -27,7 +27,7 @@ jobs: - uses: gradle/actions/wrapper-validation@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0 - name: compile run: | - echo "org.gradle.jvmargs=-Xmx6g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g" >> gradle.properties + echo "org.gradle.jvmargs=-Xmx10g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g" >> gradle.properties echo "org.gradle.caching=true" >> gradle.properties echo "org.gradle.parallel=true" >> gradle.properties echo "org.gradle.configureondemand=true" >> gradle.properties From 4372bf87ea8ffc7e322aef53b99134c296862b1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Fri, 4 Sep 2026 15:57:41 +0200 Subject: [PATCH 7/8] format document --- .github/workflows/assembleFlavors.yml | 76 +++++++++++++-------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/.github/workflows/assembleFlavors.yml b/.github/workflows/assembleFlavors.yml index 494fc3dfd68e..94821865c302 100644 --- a/.github/workflows/assembleFlavors.yml +++ b/.github/workflows/assembleFlavors.yml @@ -5,7 +5,7 @@ name: "Assemble" on: pull_request: - branches: [ master, stable-* ] + branches: [master, stable-*] # Declare default permissions as read only. permissions: read-all @@ -18,27 +18,27 @@ jobs: compile: runs-on: ubuntu-latest-max steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - name: set up JDK 21 - uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0 - with: - distribution: "temurin" - java-version: 21 - - uses: gradle/actions/wrapper-validation@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0 - - name: compile - run: | - echo "org.gradle.jvmargs=-Xmx10g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g" >> gradle.properties - echo "org.gradle.caching=true" >> gradle.properties - echo "org.gradle.parallel=true" >> gradle.properties - echo "org.gradle.configureondemand=true" >> gradle.properties - ./gradlew assembleGeneric - - name: Upload test build - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: folder - path: . - retention-days: 2 - include-hidden-files: true + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - name: set up JDK 21 + uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0 + with: + distribution: "temurin" + java-version: 21 + - uses: gradle/actions/wrapper-validation@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0 + - name: compile + run: | + echo "org.gradle.jvmargs=-Xmx10g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g" >> gradle.properties + echo "org.gradle.caching=true" >> gradle.properties + echo "org.gradle.parallel=true" >> gradle.properties + echo "org.gradle.configureondemand=true" >> gradle.properties + ./gradlew assembleGeneric + - name: Upload test build + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: folder + path: . + retention-days: 2 + include-hidden-files: true flavor: runs-on: ubuntu-latest @@ -46,23 +46,23 @@ jobs: strategy: fail-fast: false matrix: - flavor: [ Generic, Gplay, Huawei ] + flavor: [Generic, Gplay, Huawei] steps: - name: Download test-build uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: - name: folder - - name: set up JDK 21 - uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0 - with: - distribution: "temurin" - java-version: 21 - - uses: gradle/actions/wrapper-validation@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0 - - name: Build ${{ matrix.flavor }} - run: | - echo "org.gradle.jvmargs=-Xmx6g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g" >> gradle.properties - echo "org.gradle.caching=true" >> gradle.properties - echo "org.gradle.parallel=true" >> gradle.properties - echo "org.gradle.configureondemand=true" >> gradle.properties - chmod +x ./gradlew - ./gradlew assemble${{ matrix.flavor }} + name: folder + - name: set up JDK 21 + uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0 + with: + distribution: "temurin" + java-version: 21 + - uses: gradle/actions/wrapper-validation@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0 + - name: Build ${{ matrix.flavor }} + run: | + echo "org.gradle.jvmargs=-Xmx6g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g" >> gradle.properties + echo "org.gradle.caching=true" >> gradle.properties + echo "org.gradle.parallel=true" >> gradle.properties + echo "org.gradle.configureondemand=true" >> gradle.properties + chmod +x ./gradlew + ./gradlew assemble${{ matrix.flavor }} From 87797fac2a21a055df53143a5a0db23b390cd015 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Fri, 4 Sep 2026 16:21:13 +0200 Subject: [PATCH 8/8] try cache --- .github/workflows/assembleFlavors.yml | 35 ++++++++++++++++++--------- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/.github/workflows/assembleFlavors.yml b/.github/workflows/assembleFlavors.yml index 94821865c302..84127cbfc9b6 100644 --- a/.github/workflows/assembleFlavors.yml +++ b/.github/workflows/assembleFlavors.yml @@ -25,6 +25,17 @@ jobs: distribution: "temurin" java-version: 21 - uses: gradle/actions/wrapper-validation@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0 + - name: Cache Gradle + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + .gradle + key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', 'gradle/libs.versions.toml', 'gradle/wrapper/gradle-wrapper.properties') }}-${{ github.run_id }} + restore-keys: | + gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', 'gradle/libs.versions.toml', 'gradle/wrapper/gradle-wrapper.properties') }}- + gradle-${{ runner.os }}- - name: compile run: | echo "org.gradle.jvmargs=-Xmx10g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g" >> gradle.properties @@ -32,13 +43,6 @@ jobs: echo "org.gradle.parallel=true" >> gradle.properties echo "org.gradle.configureondemand=true" >> gradle.properties ./gradlew assembleGeneric - - name: Upload test build - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: folder - path: . - retention-days: 2 - include-hidden-files: true flavor: runs-on: ubuntu-latest @@ -48,21 +52,28 @@ jobs: matrix: flavor: [Generic, Gplay, Huawei] steps: - - name: Download test-build - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: folder + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: set up JDK 21 uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0 with: distribution: "temurin" java-version: 21 - uses: gradle/actions/wrapper-validation@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0 + - name: Restore Gradle cache + uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + .gradle + key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', 'gradle/libs.versions.toml', 'gradle/wrapper/gradle-wrapper.properties') }}-${{ github.run_id }} + restore-keys: | + gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', 'gradle/libs.versions.toml', 'gradle/wrapper/gradle-wrapper.properties') }}- + gradle-${{ runner.os }}- - name: Build ${{ matrix.flavor }} run: | echo "org.gradle.jvmargs=-Xmx6g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g" >> gradle.properties echo "org.gradle.caching=true" >> gradle.properties echo "org.gradle.parallel=true" >> gradle.properties echo "org.gradle.configureondemand=true" >> gradle.properties - chmod +x ./gradlew ./gradlew assemble${{ matrix.flavor }}