From 43945ed0776f69eaf1a7b16f41051a2e21823669 Mon Sep 17 00:00:00 2001 From: Kaido Kert Date: Fri, 5 Jan 2024 09:23:58 -0800 Subject: [PATCH 01/26] Remove expensive workflows --- .github/workflows/coverage.yaml | 30 ------------ .github/workflows/evergreen.yaml | 78 -------------------------------- .github/workflows/linux.yaml | 60 ------------------------ .github/workflows/raspi-2.yaml | 40 ---------------- .github/workflows/win32.yaml | 32 ------------- 5 files changed, 240 deletions(-) delete mode 100644 .github/workflows/coverage.yaml delete mode 100644 .github/workflows/evergreen.yaml delete mode 100644 .github/workflows/linux.yaml delete mode 100644 .github/workflows/raspi-2.yaml delete mode 100644 .github/workflows/win32.yaml diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml deleted file mode 100644 index 834696dcd1123..0000000000000 --- a/.github/workflows/coverage.yaml +++ /dev/null @@ -1,30 +0,0 @@ -name: coverage - -on: - pull_request: - types: - - opened - - edited - - reopened - - synchronize - push: - branches: - - main - - feature/* - -jobs: - linux-coverage: - # TODO(b/286302961): Move back and re-enable this check once sharding is supported. - # Run on main branch for pushes, PRs and manual invocations. - # if: | - # ${{ github.ref == 'refs/heads/main' && - # (github.event_name == 'push' || - # github.event_name == 'pull_request' || - # (github.event_name == 'workflow_dispatch' && inputs.nightly == 'false')) }} - uses: ./.github/workflows/main.yaml - permissions: - packages: write - pull-requests: write - with: - platform: linux-coverage - nightly: ${{ github.event.inputs.nightly }} diff --git a/.github/workflows/evergreen.yaml b/.github/workflows/evergreen.yaml deleted file mode 100644 index bc9a0567f3332..0000000000000 --- a/.github/workflows/evergreen.yaml +++ /dev/null @@ -1,78 +0,0 @@ -name: evergreen - -on: - pull_request: - types: [opened, reopened, synchronize, labeled] - branches: - - main - - feature/* - push: - branches: - - main - - feature/* - schedule: - # GMT timezone. - - cron: '0 5 * * *' - workflow_dispatch: - inputs: - nightly: - description: 'Nightly workflow.' - required: true - type: boolean - default: false - -jobs: - evergreen-x64: - uses: ./.github/workflows/main.yaml - permissions: - packages: write - pull-requests: write - with: - platform: evergreen-x64 - nightly: ${{ github.event.inputs.nightly }} - run_api_leak_detector: true - evergreen-arm-hardfp: - uses: ./.github/workflows/main.yaml - permissions: - packages: write - pull-requests: write - with: - platform: evergreen-arm-hardfp - nightly: ${{ github.event.inputs.nightly }} - run_api_leak_detector: true - evergreen-arm-softfp: - uses: ./.github/workflows/main.yaml - permissions: - packages: write - pull-requests: write - with: - platform: evergreen-arm-softfp - nightly: ${{ github.event.inputs.nightly }} - run_api_leak_detector: true - evergreen-arm-softfp-no-loader: - uses: ./.github/workflows/main.yaml - permissions: - packages: write - pull-requests: write - with: - platform: evergreen-arm-softfp-no-loader - nightly: ${{ github.event.inputs.nightly }} - run_api_leak_detector: true - evergreen-arm64: - uses: ./.github/workflows/main.yaml - permissions: - packages: write - pull-requests: write - with: - platform: evergreen-arm64 - nightly: ${{ github.event.inputs.nightly }} - run_api_leak_detector: true - evergreen-x86: - uses: ./.github/workflows/main.yaml - permissions: - packages: write - pull-requests: write - with: - platform: evergreen-x86 - nightly: ${{ github.event.inputs.nightly }} - run_api_leak_detector: true diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml deleted file mode 100644 index 43db38a332d2c..0000000000000 --- a/.github/workflows/linux.yaml +++ /dev/null @@ -1,60 +0,0 @@ -name: linux - -on: - pull_request: - types: [opened, reopened, synchronize, labeled] - branches: - - main - - feature/* - push: - branches: - - main - - feature/* - schedule: - # GMT timezone. - - cron: '0 4 * * *' - workflow_dispatch: - inputs: - nightly: - description: 'Nightly workflow.' - required: true - type: boolean - default: false - -jobs: - linux-x64: - uses: ./.github/workflows/main.yaml - permissions: - packages: write - pull-requests: write - with: - platform: linux - nightly: ${{ github.event.inputs.nightly }} - linux-clang-3-9: - uses: ./.github/workflows/main.yaml - permissions: - packages: write - pull-requests: write - with: - platform: linux-clang-3-9 - nightly: ${{ github.event.inputs.nightly }} - modular: true - linux-gcc-6-3: - uses: ./.github/workflows/main.yaml - permissions: - packages: write - pull-requests: write - with: - platform: linux-gcc-6-3 - nightly: ${{ github.event.inputs.nightly }} - modular: true - # TODO(b/285632780): Enable blackbox tests for modular linux workflows. - linux-modular: - uses: ./.github/workflows/main.yaml - permissions: - packages: write - pull-requests: write - with: - platform: linux-modular - nightly: ${{ github.event.inputs.nightly }} - modular: true diff --git a/.github/workflows/raspi-2.yaml b/.github/workflows/raspi-2.yaml deleted file mode 100644 index ac42ac8cfeb83..0000000000000 --- a/.github/workflows/raspi-2.yaml +++ /dev/null @@ -1,40 +0,0 @@ -name: raspi-2 - -on: - pull_request: - types: [opened, reopened, synchronize, labeled] - branches: - - main - - feature/* - push: - branches: - - main - - feature/* - schedule: - # GMT timezone. - - cron: '0 4 * * *' - workflow_dispatch: - inputs: - nightly: - description: 'Nightly workflow.' - required: true - type: boolean - default: false - -jobs: - raspi-2: - uses: ./.github/workflows/main.yaml - permissions: - packages: write - pull-requests: write - with: - platform: raspi-2 - nightly: ${{ github.event.inputs.nightly }} - raspi-2-skia: - uses: ./.github/workflows/main.yaml - permissions: - packages: write - pull-requests: write - with: - platform: raspi-2-skia - nightly: ${{ github.event.inputs.nightly }} diff --git a/.github/workflows/win32.yaml b/.github/workflows/win32.yaml deleted file mode 100644 index b52299224dd6e..0000000000000 --- a/.github/workflows/win32.yaml +++ /dev/null @@ -1,32 +0,0 @@ -name: win32 - -on: - pull_request: - types: [opened, reopened, synchronize, labeled] - branches: - - main - - feature/* - push: - branches: - - main - - feature/* - schedule: - # GTM timezone. - - cron: '0 4 * * *' - workflow_dispatch: - inputs: - nightly: - description: 'Nightly workflow.' - required: true - type: boolean - default: false - -jobs: - win32: - uses: ./.github/workflows/main_win.yaml - permissions: - packages: write - pull-requests: write - with: - platform: win32 - nightly: ${{ github.event.inputs.nightly }} From cafa15925e35574d2eeed6e92028b93d751c96fb Mon Sep 17 00:00:00 2001 From: Kaido Kert Date: Fri, 5 Jan 2024 09:26:48 -0800 Subject: [PATCH 02/26] Limit to single android --- .github/workflows/android.yaml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/.github/workflows/android.yaml b/.github/workflows/android.yaml index 4622201f626f2..0caa584eab363 100644 --- a/.github/workflows/android.yaml +++ b/.github/workflows/android.yaml @@ -22,22 +22,6 @@ on: default: false jobs: - android-arm64: - uses: ./.github/workflows/main.yaml - permissions: - packages: write - pull-requests: write - with: - platform: android-arm64 - nightly: ${{ github.event.inputs.nightly }} - android-x86: - uses: ./.github/workflows/main.yaml - permissions: - packages: write - pull-requests: write - with: - platform: android-x86 - nightly: ${{ github.event.inputs.nightly }} android-arm: uses: ./.github/workflows/main.yaml permissions: From 7a3eb3256590e72308c1ae01e19408fb4d1b4271 Mon Sep 17 00:00:00 2001 From: Kaido Kert Date: Fri, 5 Jan 2024 09:31:22 -0800 Subject: [PATCH 03/26] Also run on release --- .github/workflows/android.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/android.yaml b/.github/workflows/android.yaml index 0caa584eab363..685dfa4542b3b 100644 --- a/.github/workflows/android.yaml +++ b/.github/workflows/android.yaml @@ -1,6 +1,8 @@ name: android on: + release: + types: [prereleased, released, published] pull_request: types: [opened, reopened, synchronize, labeled] branches: From 11c283a440237c4312e89c28b5f95933e128aa4a Mon Sep 17 00:00:00 2001 From: Kaido Kert Date: Fri, 5 Jan 2024 15:13:19 -0800 Subject: [PATCH 04/26] Test action step --- .github/workflows/android.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/android.yaml b/.github/workflows/android.yaml index 685dfa4542b3b..50c15cd08e98a 100644 --- a/.github/workflows/android.yaml +++ b/.github/workflows/android.yaml @@ -32,3 +32,6 @@ jobs: with: platform: android-arm nightly: ${{ github.event.inputs.nightly }} + steps: + - name: foobar + run: echo testme From 6e2776ff8784df8ef2e8b1973c6d11fd2f462d44 Mon Sep 17 00:00:00 2001 From: Kaido Kert Date: Fri, 5 Jan 2024 17:52:49 -0800 Subject: [PATCH 05/26] Pass variables --- .github/workflows/android.yaml | 8 ++++++-- .github/workflows/main.yaml | 9 +++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/android.yaml b/.github/workflows/android.yaml index 50c15cd08e98a..38256d6e33a74 100644 --- a/.github/workflows/android.yaml +++ b/.github/workflows/android.yaml @@ -32,6 +32,10 @@ jobs: with: platform: android-arm nightly: ${{ github.event.inputs.nightly }} + + final_android_job: + runs-on: ubuntu-latest + needs: android-arm steps: - - name: foobar - run: echo testme + - name: Final collections + run: echo ${{ needs.android-arm.outputs.first_output }} diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 17be783463c93..6613a93d15949 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -29,6 +29,10 @@ on: required: false type: boolean default: false + outputs: + first_output: + description: "My random output" + value: ${{ jobs.build.outputs.output1 }} # Global env vars. env: @@ -225,6 +229,8 @@ jobs: # However, dind container ends up having / folder mounted on overlay # filesystem, whereas /__w which contains Cobalt source code is on tmpfs. TMPDIR: /__w/_temp + outputs: + output1: ${{ steps.output_step_1.outputs.firstword }} steps: - name: Checkout uses: kaidokert/checkout@v3.5.999 @@ -237,6 +243,9 @@ jobs: uses: ./.github/actions/gn - name: Build Cobalt uses: ./.github/actions/build + - id: output_step_1 + name: Set output + run: echo "firstword=hello" >> $GITHUB_OUTPUT - name: Run API Leak Detector uses: ./.github/actions/api_leak_detector if: inputs.run_api_leak_detector From dbd2512b8151c415740ba850476aa073e7a39e2d Mon Sep 17 00:00:00 2001 From: Kaido Kert Date: Fri, 5 Jan 2024 17:56:46 -0800 Subject: [PATCH 06/26] Remove devel/debug --- .github/workflows/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 6613a93d15949..25c59b98d80ef 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -222,7 +222,7 @@ jobs: matrix: platform: ${{ fromJson(needs.initialize.outputs.platforms) }} include: ${{ fromJson(needs.initialize.outputs.includes) }} - config: [devel, debug, qa, gold] + config: [qa, gold] container: ${{ needs.docker-build-image.outputs.docker_tag }} env: # We want temp folder to be on tmpfs which makes workloads faster. From 5d2b2d8b3f64257ce372bba62fb82480b94cbfe6 Mon Sep 17 00:00:00 2001 From: Kaido Kert Date: Fri, 5 Jan 2024 18:52:22 -0800 Subject: [PATCH 07/26] Find the APKs --- .github/workflows/main.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 25c59b98d80ef..cca778bee12bf 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -245,7 +245,9 @@ jobs: uses: ./.github/actions/build - id: output_step_1 name: Set output - run: echo "firstword=hello" >> $GITHUB_OUTPUT + run: | + find . -name "*.apk" + echo "firstword=hello" >> $GITHUB_OUTPUT - name: Run API Leak Detector uses: ./.github/actions/api_leak_detector if: inputs.run_api_leak_detector From 9f662e9d60c0db2f8eb48945aa13943f9d5c4ec3 Mon Sep 17 00:00:00 2001 From: Kaido Kert Date: Fri, 5 Jan 2024 19:00:07 -0800 Subject: [PATCH 08/26] Try passing inputs --- .github/workflows/android.yaml | 1 + .github/workflows/main.yaml | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/.github/workflows/android.yaml b/.github/workflows/android.yaml index 38256d6e33a74..5265be71adc8c 100644 --- a/.github/workflows/android.yaml +++ b/.github/workflows/android.yaml @@ -32,6 +32,7 @@ jobs: with: platform: android-arm nightly: ${{ github.event.inputs.nightly }} + keep_artifacts: foo_bar final_android_job: runs-on: ubuntu-latest diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index cca778bee12bf..48ab86e111ea5 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -29,6 +29,11 @@ on: required: false type: boolean default: false + keep_artifacts: + description: 'Which artifacts to keep for releases' + required: false + type: string + default: '' outputs: first_output: description: "My random output" @@ -246,6 +251,7 @@ jobs: - id: output_step_1 name: Set output run: | + echo "The artifacts we need to keep:" ${{ inputs.keep_artifacts }} find . -name "*.apk" echo "firstword=hello" >> $GITHUB_OUTPUT - name: Run API Leak Detector From a40edcafc16aad1ac340805cabfe9ebacfef7588 Mon Sep 17 00:00:00 2001 From: Kaido Kert Date: Fri, 5 Jan 2024 19:27:26 -0800 Subject: [PATCH 09/26] Check full path --- .github/workflows/android.yaml | 2 +- .github/workflows/main.yaml | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/android.yaml b/.github/workflows/android.yaml index 5265be71adc8c..296573b665d0f 100644 --- a/.github/workflows/android.yaml +++ b/.github/workflows/android.yaml @@ -32,7 +32,7 @@ jobs: with: platform: android-arm nightly: ${{ github.event.inputs.nightly }} - keep_artifacts: foo_bar + keep_artifacts: cobalt.apk final_android_job: runs-on: ubuntu-latest diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 48ab86e111ea5..12bd77bb93dc5 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -252,8 +252,17 @@ jobs: name: Set output run: | echo "The artifacts we need to keep:" ${{ inputs.keep_artifacts }} + echo "Full spec" out/${{ matrix.platform}}-${{ matrix.config }}/${{ inputs.keep_artifacts }} find . -name "*.apk" + ls -la out/${{ matrix.platform}}-${{ matrix.config }}/${{ inputs.keep_artifacts }} echo "firstword=hello" >> $GITHUB_OUTPUT + - name: 'Upload Artifact' + uses: actions/upload-artifact@v3 + if: inputs.keep_artifacts + with: + name: buildoutput + path: out/${{ matrix.platform}}-${{ matrix.config }}/${{ inputs.keep_artifacts }} + retention-days: 5 - name: Run API Leak Detector uses: ./.github/actions/api_leak_detector if: inputs.run_api_leak_detector From c2b7373411c0cfbac45ae239cd2bc0a3415be228 Mon Sep 17 00:00:00 2001 From: Kaido Kert Date: Fri, 5 Jan 2024 19:31:07 -0800 Subject: [PATCH 10/26] Try to dump all artefacts --- .github/workflows/android.yaml | 10 ++++++++++ .github/workflows/main.yaml | 6 +++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/android.yaml b/.github/workflows/android.yaml index 296573b665d0f..77189fcd451b5 100644 --- a/.github/workflows/android.yaml +++ b/.github/workflows/android.yaml @@ -40,3 +40,13 @@ jobs: steps: - name: Final collections run: echo ${{ needs.android-arm.outputs.first_output }} + - name: Download the gold thing + uses: actions/download-artifact@v3 + with: + name: buildoutput-gold + - name: Download the qa thing + uses: actions/download-artifact@v3 + with: + name: buildoutput-qa + - name: Doublecheck if all is there + run: find . -type f diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 12bd77bb93dc5..1eace978de9e9 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -254,14 +254,14 @@ jobs: echo "The artifacts we need to keep:" ${{ inputs.keep_artifacts }} echo "Full spec" out/${{ matrix.platform}}-${{ matrix.config }}/${{ inputs.keep_artifacts }} find . -name "*.apk" - ls -la out/${{ matrix.platform}}-${{ matrix.config }}/${{ inputs.keep_artifacts }} + ls -la out/${{ matrix.platform}}_${{ matrix.config }}/${{ inputs.keep_artifacts }} echo "firstword=hello" >> $GITHUB_OUTPUT - name: 'Upload Artifact' uses: actions/upload-artifact@v3 if: inputs.keep_artifacts with: - name: buildoutput - path: out/${{ matrix.platform}}-${{ matrix.config }}/${{ inputs.keep_artifacts }} + name: buildoutput-${{ matrix.config }} + path: out/${{ matrix.platform}}_${{ matrix.config }}/${{ inputs.keep_artifacts }} retention-days: 5 - name: Run API Leak Detector uses: ./.github/actions/api_leak_detector From e0efd4ea210e76be368c9138b6e6d4fb77040651 Mon Sep 17 00:00:00 2001 From: Kaido Kert Date: Sat, 6 Jan 2024 10:18:27 -0800 Subject: [PATCH 11/26] Separate paths --- .github/workflows/android.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/android.yaml b/.github/workflows/android.yaml index 77189fcd451b5..239fd073ec2b1 100644 --- a/.github/workflows/android.yaml +++ b/.github/workflows/android.yaml @@ -44,9 +44,11 @@ jobs: uses: actions/download-artifact@v3 with: name: buildoutput-gold + path: gold - name: Download the qa thing uses: actions/download-artifact@v3 with: name: buildoutput-qa + path: qa - name: Doublecheck if all is there run: find . -type f From 0b2b7e63f64df64653fee44191d171cdc888c700 Mon Sep 17 00:00:00 2001 From: Kaido Kert Date: Sat, 6 Jan 2024 10:22:12 -0800 Subject: [PATCH 12/26] Make sure all downloads happen --- .github/workflows/android.yaml | 8 ++++---- .github/workflows/main.yaml | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/android.yaml b/.github/workflows/android.yaml index 239fd073ec2b1..ac77e36785dff 100644 --- a/.github/workflows/android.yaml +++ b/.github/workflows/android.yaml @@ -43,12 +43,12 @@ jobs: - name: Download the gold thing uses: actions/download-artifact@v3 with: - name: buildoutput-gold - path: gold + name: buildoutput-android-arm-gold + path: android-arm-gold - name: Download the qa thing uses: actions/download-artifact@v3 with: - name: buildoutput-qa - path: qa + name: buildoutput-android-arm-qa + path: anrdoid-arm-qa - name: Doublecheck if all is there run: find . -type f diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 1eace978de9e9..25ea2dce93c28 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -260,8 +260,8 @@ jobs: uses: actions/upload-artifact@v3 if: inputs.keep_artifacts with: - name: buildoutput-${{ matrix.config }} - path: out/${{ matrix.platform}}_${{ matrix.config }}/${{ inputs.keep_artifacts }} + name: buildoutput-${{ matrix.platform }}-${{ matrix.config }} + path: out/${{ matrix.platform }}_${{ matrix.config }}/${{ inputs.keep_artifacts }} retention-days: 5 - name: Run API Leak Detector uses: ./.github/actions/api_leak_detector From cc1ec1dbbf73e5b61d014003163201d01cc294cc Mon Sep 17 00:00:00 2001 From: Kaido Kert Date: Sat, 6 Jan 2024 10:26:06 -0800 Subject: [PATCH 13/26] Try pulling multiple architectures --- .github/workflows/android.yaml | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/.github/workflows/android.yaml b/.github/workflows/android.yaml index ac77e36785dff..d279690c779e8 100644 --- a/.github/workflows/android.yaml +++ b/.github/workflows/android.yaml @@ -24,6 +24,22 @@ on: default: false jobs: + android-arm64: + uses: ./.github/workflows/main.yaml + permissions: + packages: write + pull-requests: write + with: + platform: android-arm64 + nightly: ${{ github.event.inputs.nightly }} + android-x86: + uses: ./.github/workflows/main.yaml + permissions: + packages: write + pull-requests: write + with: + platform: android-x86 + nightly: ${{ github.event.inputs.nightly }} android-arm: uses: ./.github/workflows/main.yaml permissions: @@ -36,19 +52,29 @@ jobs: final_android_job: runs-on: ubuntu-latest - needs: android-arm + needs: [ android-arm, android-arm64] steps: - name: Final collections run: echo ${{ needs.android-arm.outputs.first_output }} - - name: Download the gold thing + - name: Download the gold arm thing uses: actions/download-artifact@v3 with: name: buildoutput-android-arm-gold path: android-arm-gold - - name: Download the qa thing + - name: Download the qa arm thing uses: actions/download-artifact@v3 with: name: buildoutput-android-arm-qa path: anrdoid-arm-qa + - name: Download the gold arm64 thing + uses: actions/download-artifact@v3 + with: + name: buildoutput-android-arm64-gold + path: android-arm64-gold + - name: Download the qa arm64 thing + uses: actions/download-artifact@v3 + with: + name: buildoutput-android-arm64-gold + path: android-arm64-qa - name: Doublecheck if all is there run: find . -type f From 197f6fe391ca0eb552c55c37f1fe154b6bea2ac8 Mon Sep 17 00:00:00 2001 From: Kaido Kert Date: Sat, 6 Jan 2024 12:20:06 -0800 Subject: [PATCH 14/26] Also keep arm/x86 --- .github/workflows/android.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/android.yaml b/.github/workflows/android.yaml index d279690c779e8..b97276a2b680b 100644 --- a/.github/workflows/android.yaml +++ b/.github/workflows/android.yaml @@ -32,6 +32,7 @@ jobs: with: platform: android-arm64 nightly: ${{ github.event.inputs.nightly }} + keep_artifacts: cobalt.apk android-x86: uses: ./.github/workflows/main.yaml permissions: @@ -40,6 +41,7 @@ jobs: with: platform: android-x86 nightly: ${{ github.event.inputs.nightly }} + keep_artifacts: cobalt.apk android-arm: uses: ./.github/workflows/main.yaml permissions: From 9a9c6ecff4f16dd3bd8ee4f67a5c63a0454189a7 Mon Sep 17 00:00:00 2001 From: Kaido Kert Date: Sat, 6 Jan 2024 12:23:12 -0800 Subject: [PATCH 15/26] Reduce compression --- .github/workflows/main.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 25ea2dce93c28..5945234d4abc7 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -263,6 +263,8 @@ jobs: name: buildoutput-${{ matrix.platform }}-${{ matrix.config }} path: out/${{ matrix.platform }}_${{ matrix.config }}/${{ inputs.keep_artifacts }} retention-days: 5 + compression-level: 0 # We expect kept artifacts to be already compressed + if-no-files-found: error - name: Run API Leak Detector uses: ./.github/actions/api_leak_detector if: inputs.run_api_leak_detector From 80aa3633f338023a238977ac3583dc3aee8692ac Mon Sep 17 00:00:00 2001 From: Kaido Kert Date: Sat, 6 Jan 2024 12:39:16 -0800 Subject: [PATCH 16/26] Fix the uploads --- .github/workflows/android.yaml | 19 +++++++++++++++++++ .github/workflows/main.yaml | 4 ++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/workflows/android.yaml b/.github/workflows/android.yaml index b97276a2b680b..3530049412f94 100644 --- a/.github/workflows/android.yaml +++ b/.github/workflows/android.yaml @@ -78,5 +78,24 @@ jobs: with: name: buildoutput-android-arm64-gold path: android-arm64-qa + - name: Download the gold x86 thing + uses: actions/download-artifact@v3 + with: + name: buildoutput-android-x86-gold + path: android-x86-gold + - name: Download the qa x86 thing + uses: actions/download-artifact@v3 + with: + name: buildoutput-android-x86-gold + path: android-x86-qa - name: Doublecheck if all is there run: find . -type f + - name: 'Upload Adnroid APKs' + uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4 + if: inputs.keep_artifacts + with: + name: Android APKs + path: ./* + retention-days: 90 + compression-level: 0 # We expect kept artifacts to be already compressed + if-no-files-found: error diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 5945234d4abc7..c88a9279e726a 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -257,12 +257,12 @@ jobs: ls -la out/${{ matrix.platform}}_${{ matrix.config }}/${{ inputs.keep_artifacts }} echo "firstword=hello" >> $GITHUB_OUTPUT - name: 'Upload Artifact' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4 if: inputs.keep_artifacts with: name: buildoutput-${{ matrix.platform }}-${{ matrix.config }} path: out/${{ matrix.platform }}_${{ matrix.config }}/${{ inputs.keep_artifacts }} - retention-days: 5 + retention-days: 7 compression-level: 0 # We expect kept artifacts to be already compressed if-no-files-found: error - name: Run API Leak Detector From fa028563258a572639eaef5b729acb529b4a916d Mon Sep 17 00:00:00 2001 From: Kaido Kert Date: Sat, 6 Jan 2024 12:56:05 -0800 Subject: [PATCH 17/26] Modern downloads?? --- .github/workflows/android.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/android.yaml b/.github/workflows/android.yaml index 3530049412f94..37ddc97da503d 100644 --- a/.github/workflows/android.yaml +++ b/.github/workflows/android.yaml @@ -59,32 +59,32 @@ jobs: - name: Final collections run: echo ${{ needs.android-arm.outputs.first_output }} - name: Download the gold arm thing - uses: actions/download-artifact@v3 + uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 with: name: buildoutput-android-arm-gold path: android-arm-gold - name: Download the qa arm thing - uses: actions/download-artifact@v3 + uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 with: name: buildoutput-android-arm-qa path: anrdoid-arm-qa - name: Download the gold arm64 thing - uses: actions/download-artifact@v3 + uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 with: name: buildoutput-android-arm64-gold path: android-arm64-gold - name: Download the qa arm64 thing - uses: actions/download-artifact@v3 + uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 with: name: buildoutput-android-arm64-gold path: android-arm64-qa - name: Download the gold x86 thing - uses: actions/download-artifact@v3 + uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 with: name: buildoutput-android-x86-gold path: android-x86-gold - name: Download the qa x86 thing - uses: actions/download-artifact@v3 + uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 with: name: buildoutput-android-x86-gold path: android-x86-qa From 59f48baeeaddca557bceac58f800a457a2dc4732 Mon Sep 17 00:00:00 2001 From: Kaido Kert Date: Sat, 6 Jan 2024 13:07:33 -0800 Subject: [PATCH 18/26] Obviously, just do it --- .github/workflows/android.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/android.yaml b/.github/workflows/android.yaml index 37ddc97da503d..313f8c62867c1 100644 --- a/.github/workflows/android.yaml +++ b/.github/workflows/android.yaml @@ -92,7 +92,6 @@ jobs: run: find . -type f - name: 'Upload Adnroid APKs' uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4 - if: inputs.keep_artifacts with: name: Android APKs path: ./* From 1d3214558e2dfe99b9756e63036939b8400fbbe1 Mon Sep 17 00:00:00 2001 From: Kaido Kert Date: Sat, 6 Jan 2024 13:09:16 -0800 Subject: [PATCH 19/26] Clean up names --- .github/workflows/android.yaml | 12 ++++++------ .github/workflows/main.yaml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/android.yaml b/.github/workflows/android.yaml index 313f8c62867c1..77b37c706f412 100644 --- a/.github/workflows/android.yaml +++ b/.github/workflows/android.yaml @@ -61,32 +61,32 @@ jobs: - name: Download the gold arm thing uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 with: - name: buildoutput-android-arm-gold + name: android-arm-gold path: android-arm-gold - name: Download the qa arm thing uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 with: - name: buildoutput-android-arm-qa + name: android-arm-qa path: anrdoid-arm-qa - name: Download the gold arm64 thing uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 with: - name: buildoutput-android-arm64-gold + name: android-arm64-gold path: android-arm64-gold - name: Download the qa arm64 thing uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 with: - name: buildoutput-android-arm64-gold + name: android-arm64-gold path: android-arm64-qa - name: Download the gold x86 thing uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 with: - name: buildoutput-android-x86-gold + name: android-x86-gold path: android-x86-gold - name: Download the qa x86 thing uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 with: - name: buildoutput-android-x86-gold + name: android-x86-gold path: android-x86-qa - name: Doublecheck if all is there run: find . -type f diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index c88a9279e726a..2b9c22c7c1a0c 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -260,7 +260,7 @@ jobs: uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4 if: inputs.keep_artifacts with: - name: buildoutput-${{ matrix.platform }}-${{ matrix.config }} + name: ${{ matrix.platform }}-${{ matrix.config }} path: out/${{ matrix.platform }}_${{ matrix.config }}/${{ inputs.keep_artifacts }} retention-days: 7 compression-level: 0 # We expect kept artifacts to be already compressed From 425bd75d054aeb8556b7b8922966aec1d11a0868 Mon Sep 17 00:00:00 2001 From: Kaido Kert Date: Sat, 6 Jan 2024 13:25:31 -0800 Subject: [PATCH 20/26] Fix dependencies --- .github/workflows/android.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/android.yaml b/.github/workflows/android.yaml index 77b37c706f412..cc9742c618deb 100644 --- a/.github/workflows/android.yaml +++ b/.github/workflows/android.yaml @@ -54,7 +54,7 @@ jobs: final_android_job: runs-on: ubuntu-latest - needs: [ android-arm, android-arm64] + needs: [ android-arm, android-arm64, android-x86 ] steps: - name: Final collections run: echo ${{ needs.android-arm.outputs.first_output }} From 38dddcd64a227586408ce362406836ddb50c13f1 Mon Sep 17 00:00:00 2001 From: Kaido Kert Date: Sat, 6 Jan 2024 15:38:24 -0800 Subject: [PATCH 21/26] Simplify --- .github/workflows/android.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/android.yaml b/.github/workflows/android.yaml index cc9742c618deb..cd7971d593ca8 100644 --- a/.github/workflows/android.yaml +++ b/.github/workflows/android.yaml @@ -62,32 +62,32 @@ jobs: uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 with: name: android-arm-gold - path: android-arm-gold + path: arm-gold - name: Download the qa arm thing uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 with: name: android-arm-qa - path: anrdoid-arm-qa + path: arm-qa - name: Download the gold arm64 thing uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 with: name: android-arm64-gold - path: android-arm64-gold + path: arm64-gold - name: Download the qa arm64 thing uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 with: name: android-arm64-gold - path: android-arm64-qa + path: arm64-qa - name: Download the gold x86 thing uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 with: name: android-x86-gold - path: android-x86-gold + path: x86-gold - name: Download the qa x86 thing uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 with: name: android-x86-gold - path: android-x86-qa + path: x86-qa - name: Doublecheck if all is there run: find . -type f - name: 'Upload Adnroid APKs' From 6f7945b02eff461012a4edc9f430258be2a913ea Mon Sep 17 00:00:00 2001 From: Kaido Kert Date: Sat, 6 Jan 2024 15:52:35 -0800 Subject: [PATCH 22/26] Also delete artifacts --- .github/workflows/android.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/android.yaml b/.github/workflows/android.yaml index cd7971d593ca8..e3ddc53e6457d 100644 --- a/.github/workflows/android.yaml +++ b/.github/workflows/android.yaml @@ -98,3 +98,8 @@ jobs: retention-days: 90 compression-level: 0 # We expect kept artifacts to be already compressed if-no-files-found: error + - name: 'Delete intermediates' + uses: geekyeggo/delete-artifact@9d15d164b1dcd538ff1b1a2984bc2c0240986c3b # v4.0.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + name: android-* From be99ce70b312f6b6b00cc6a910523f07ca1acecd Mon Sep 17 00:00:00 2001 From: Kaido Kert Date: Sat, 6 Jan 2024 15:55:30 -0800 Subject: [PATCH 23/26] Switch all upload-artifacts. --- .github/actions/on_host_test/action.yaml | 4 ++-- .github/workflows/scorecards.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/on_host_test/action.yaml b/.github/actions/on_host_test/action.yaml index 20469f76ee077..a7e92b54af6e9 100644 --- a/.github/actions/on_host_test/action.yaml +++ b/.github/actions/on_host_test/action.yaml @@ -104,14 +104,14 @@ runs: tags="${tags},os:${{ inputs.os }}" echo $tags > ${TEST_RESULTS_DIR}/${{ matrix.platform }}/TAGS - name: Archive unit test results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4 if: (success() || failure()) && steps.run-tests.outputs.test_type == 'unit_tests' with: name: unit-test-results path: ${{env.TEST_RESULTS_DIR}}/ - name: Archive coverage html report if: success() && matrix.shard == 'coverage' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4 with: name: coverage-report path: ${{env.COVERAGE_DIR}}/html diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml index 4514e18291e0b..b2688b048fe5e 100644 --- a/.github/workflows/scorecards.yml +++ b/.github/workflows/scorecards.yml @@ -45,7 +45,7 @@ jobs: # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF # format to the repository Actions tab. - name: "Upload artifact" - uses: actions/upload-artifact@v3.1.1 + uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4 with: name: SARIF file path: results.sarif From 88e7e6a1a99481c44993819f9440f0c6ef84d947 Mon Sep 17 00:00:00 2001 From: Kaido Kert Date: Sat, 6 Jan 2024 16:18:30 -0800 Subject: [PATCH 24/26] Fix permissions ? --- .github/workflows/android.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/android.yaml b/.github/workflows/android.yaml index e3ddc53e6457d..c7f3c67e65286 100644 --- a/.github/workflows/android.yaml +++ b/.github/workflows/android.yaml @@ -55,6 +55,8 @@ jobs: final_android_job: runs-on: ubuntu-latest needs: [ android-arm, android-arm64, android-x86 ] + permissions: + actions: write steps: - name: Final collections run: echo ${{ needs.android-arm.outputs.first_output }} @@ -103,3 +105,4 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} name: android-* + failOnError: true From 3ad51756fe163402e048bf52fe833603feecc329 Mon Sep 17 00:00:00 2001 From: Kaido Kert Date: Sat, 6 Jan 2024 17:23:46 -0800 Subject: [PATCH 25/26] Moar permissions --- .github/workflows/android.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/android.yaml b/.github/workflows/android.yaml index c7f3c67e65286..91a503da4073e 100644 --- a/.github/workflows/android.yaml +++ b/.github/workflows/android.yaml @@ -57,6 +57,8 @@ jobs: needs: [ android-arm, android-arm64, android-x86 ] permissions: actions: write + contents: write + packages: write steps: - name: Final collections run: echo ${{ needs.android-arm.outputs.first_output }} From a132994deeda635b4aaeb0191484bd1205c97801 Mon Sep 17 00:00:00 2001 From: Kaido Kert Date: Sat, 6 Jan 2024 17:46:42 -0800 Subject: [PATCH 26/26] Try --- .github/workflows/android.yaml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/android.yaml b/.github/workflows/android.yaml index 91a503da4073e..c94b6d7042a98 100644 --- a/.github/workflows/android.yaml +++ b/.github/workflows/android.yaml @@ -57,11 +57,7 @@ jobs: needs: [ android-arm, android-arm64, android-x86 ] permissions: actions: write - contents: write - packages: write steps: - - name: Final collections - run: echo ${{ needs.android-arm.outputs.first_output }} - name: Download the gold arm thing uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 with: @@ -92,9 +88,7 @@ jobs: with: name: android-x86-gold path: x86-qa - - name: Doublecheck if all is there - run: find . -type f - - name: 'Upload Adnroid APKs' + - name: 'Upload Android APKs' uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4 with: name: Android APKs @@ -105,6 +99,6 @@ jobs: - name: 'Delete intermediates' uses: geekyeggo/delete-artifact@9d15d164b1dcd538ff1b1a2984bc2c0240986c3b # v4.0.0 with: - token: ${{ secrets.GITHUB_TOKEN }} - name: android-* + token: ${{ github.token }} + name: android-arm-qa failOnError: true