Cache Bloaty, use PR number (#1771)
This commit is contained in:
56
.github/workflows/ios-ci.yml
vendored
56
.github/workflows/ios-ci.yml
vendored
@@ -21,34 +21,40 @@ jobs:
|
||||
pre_job:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
||||
should_skip: steps.changed-files-yaml.outputs.ios_any_changed != 'true'
|
||||
steps:
|
||||
- id: skip_check
|
||||
uses: fkirc/skip-duplicate-actions@v5
|
||||
- name: Get all iOS files that have changed
|
||||
id: changed-files-yaml
|
||||
uses: tj-actions/changed-files@v39
|
||||
with:
|
||||
do_not_skip: '["workflow_dispatch", "push"]'
|
||||
paths: |
|
||||
["CMakeLists.txt",
|
||||
"platform/ios/**",
|
||||
"platform/darwin/**",
|
||||
".github/workflows/ios-ci.yml",
|
||||
"bin/**",
|
||||
"expression-test/**",
|
||||
"include/**",
|
||||
"metrics/**",
|
||||
"platform/default/**",
|
||||
"render-test/**",
|
||||
"scripts/**",
|
||||
"src/**",
|
||||
"test/**",
|
||||
"vendor/**",
|
||||
".gitmodules",
|
||||
"!**/*.md",
|
||||
"WORKSPACE",
|
||||
"BUILD.bazel",
|
||||
".bazelrc",
|
||||
".bazelversion"]
|
||||
files_yaml: |
|
||||
ios:
|
||||
- 'platform/ios/**'
|
||||
- 'platform/darwin/**'
|
||||
- '.github/workflows/ios-ci.yml'
|
||||
- 'bin/**'
|
||||
- 'expression-test/**'
|
||||
- 'include/**'
|
||||
- 'metrics/**'
|
||||
- 'platform/default/**'
|
||||
- 'render-test/**'
|
||||
- 'scripts/**'
|
||||
- 'src/**'
|
||||
- 'test/**'
|
||||
- 'vendor/**'
|
||||
- '.gitmodules'
|
||||
- '!**/*.md'
|
||||
- 'WORKSPACE'
|
||||
- 'BUILD.bazel'
|
||||
- '.bazelrc'
|
||||
- '.bazelversion'
|
||||
|
||||
- name: Run step if test file(s) change
|
||||
if: steps.changed-files-yaml.outputs.ios_any_changed == 'true'
|
||||
run: |
|
||||
echo "One or more iOS file(s) has changed."
|
||||
echo "List of changes: ${{ steps.changed-files-yaml.outputs.ios_all_changed_files }}"
|
||||
|
||||
ios-build:
|
||||
needs: pre_job
|
||||
if: needs.pre_job.outputs.should_skip != 'true'
|
||||
|
||||
10
.github/workflows/pr-bloaty.yml
vendored
10
.github/workflows/pr-bloaty.yml
vendored
@@ -11,12 +11,14 @@ env:
|
||||
# built with commit d38709084a9865fe0bb8300aec70ebf8243b3d43
|
||||
legacy_download_url: https://maplibre-native.s3.eu-central-1.amazonaws.com/mbgl-render-legacy
|
||||
main_download_url: https://maplibre-native.s3.eu-central-1.amazonaws.com/mbgl-render-main
|
||||
bloaty_sha: 8be8b448550b37c978e8defd9d421c0464c52cc7
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
pr-bloaty:
|
||||
if: github.event.workflow_run.pull_requests.length
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -42,9 +44,16 @@ jobs:
|
||||
- name: Compile Bloaty
|
||||
run: |
|
||||
git clone https://github.com/google/bloaty.git
|
||||
git checkout "$bloaty_sha"
|
||||
cmake -B bloaty/build -G Ninja -S bloaty
|
||||
cmake --build bloaty/build
|
||||
|
||||
- name: Cache Bloaty
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: bloaty/build/bloaty
|
||||
key: bloaty-${{ env.bloaty_sha }}
|
||||
|
||||
- name: Download legacy and main mbgl-render
|
||||
run: |
|
||||
wget -O mbgl-render-legacy "$legacy_download_url"
|
||||
@@ -73,5 +82,6 @@ jobs:
|
||||
- name: Leave a comment with Bloaty results
|
||||
uses: marocchino/sticky-pull-request-comment@v2
|
||||
with:
|
||||
number: ${{ github.event.workflow_run.pull_requests[0].number }}
|
||||
header: bloaty
|
||||
path: message.md
|
||||
|
||||
Reference in New Issue
Block a user