From b40032ea0605e5b9d5c0adbb30887e2b8e7f0850 Mon Sep 17 00:00:00 2001 From: Bart Louwers Date: Wed, 18 Oct 2023 14:06:58 +0200 Subject: [PATCH] cd in bloaty compile step (#1775) --- .github/changed-files.yml | 50 ++++++++++++++++++++++++++++++++ .github/workflows/android-ci.yml | 21 ++------------ .github/workflows/ios-ci.yml | 25 ++-------------- .github/workflows/linux-ci.yml | 19 ++---------- .github/workflows/pr-bloaty.yml | 5 ++-- 5 files changed, 59 insertions(+), 61 deletions(-) create mode 100644 .github/changed-files.yml diff --git a/.github/changed-files.yml b/.github/changed-files.yml new file mode 100644 index 000000000..0579d709f --- /dev/null +++ b/.github/changed-files.yml @@ -0,0 +1,50 @@ +linux: + - 'src/**' + - 'test/**' + - 'render-test/**' + - 'expression-test/**' + - 'include/**' + - '.github/workflows/linux-ci.yml' + - 'vendor/**' + - 'CMakeLists.txt' + - 'metrics/linux-gcc8-release-style.json' + - 'WORKSPACE' + - 'BUILD.bazel' + - '.bazelrc' + - '.bazelversion' +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' +android: + - 'CMakeLists.txt' + - 'platform/android/**' + - '.github/workflows/android-ci.yml' + - 'bin/**' + - 'expression-test/**' + - 'include/**' + - 'metrics/**' + - 'platform/default/**' + - 'render-test/**' + - 'scripts/**' + - 'src/**' + - 'test/**' + - 'vendor/**' + - '.gitmodules' + - '!**/*.md' \ No newline at end of file diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml index 6a1558573..9463c2ddf 100644 --- a/.github/workflows/android-ci.yml +++ b/.github/workflows/android-ci.yml @@ -20,33 +20,16 @@ jobs: pre_job: runs-on: ubuntu-latest outputs: - should_skip: github.event_name != 'workflow_dispatch' && steps.changed-files.outputs.android_any_changed != 'true' + should_skip: ${{ github.event_name != 'workflow_dispatch' && steps.changed-files.outputs.android_any_changed != 'true' }} steps: - uses: actions/checkout@v4 - if: github.event_name == 'push' - name: Get all Android files that have changed if: github.event_name != 'workflow_dispatch' id: changed-files uses: tj-actions/changed-files@v39 with: - files_yaml: | - android: - - 'CMakeLists.txt' - - 'platform/android/**' - - '.github/workflows/android-ci.yml' - - 'bin/**' - - 'expression-test/**' - - 'include/**' - - 'metrics/**' - - 'platform/default/**' - - 'render-test/**' - - 'scripts/**' - - 'src/**' - - 'test/**' - - 'vendor/**' - - '.gitmodules' - - '!**/*.md' + files_yaml_from_source_file: .github/changed-files.yml android-build: runs-on: ${{ github.event.pull_request && !github.event.pull_request.draft && 'MapLibre_Native_Linux_16_core' || 'ubuntu-22.04' }} diff --git a/.github/workflows/ios-ci.yml b/.github/workflows/ios-ci.yml index 292713d10..c43b82961 100644 --- a/.github/workflows/ios-ci.yml +++ b/.github/workflows/ios-ci.yml @@ -21,37 +21,16 @@ jobs: pre_job: runs-on: ubuntu-latest outputs: - should_skip: github.event_name != 'workflow_dispatch' && steps.changed-files-yaml.outputs.ios_any_changed != 'true' + should_skip: ${{ github.event_name != 'workflow_dispatch' && steps.changed-files-yaml.outputs.ios_any_changed != 'true' }} steps: - uses: actions/checkout@v4 - if: github.event_name == 'push' - name: Get all iOS files that have changed if: github.event_name != 'workflow_dispatch' id: changed-files-yaml uses: tj-actions/changed-files@v39 with: - 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' + files_yaml_from_source_file: .github/changed-files.yml - name: Run step if test file(s) change if: steps.changed-files-yaml.outputs.ios_any_changed == 'true' diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml index 314829b4a..138ac5366 100644 --- a/.github/workflows/linux-ci.yml +++ b/.github/workflows/linux-ci.yml @@ -19,31 +19,16 @@ jobs: pre_job: runs-on: ubuntu-22.04 outputs: - should_skip: github.event_name != 'workflow_dispatch' && steps.changed-files.outputs.linux_any_changed != 'true' + should_skip: ${{ github.event_name != 'workflow_dispatch' && steps.changed-files.outputs.linux_any_changed != 'true' }} steps: - uses: actions/checkout@v4 - if: github.event_name == 'push' - name: Get all Linux files that have changed if: github.event_name != 'workflow_dispatch' id: changed-files uses: tj-actions/changed-files@v39 with: - files_yaml: | - linux: - - 'src/**' - - 'test/**' - - 'render-test/**' - - 'expression-test/**' - - 'include/**' - - '.github/workflows/linux-ci.yml' - - 'vendor/**' - - 'CMakeLists.txt' - - 'metrics/linux-gcc8-release-style.json' - - 'WORKSPACE' - - 'BUILD.bazel' - - '.bazelrc' - - '.bazelversion' + files_yaml_from_source_file: .github/changed-files.yml - name: List changed files if: steps.changed-files.outputs.linux_any_changed == 'true' diff --git a/.github/workflows/pr-bloaty.yml b/.github/workflows/pr-bloaty.yml index 0a888b8a6..5e36e84b2 100644 --- a/.github/workflows/pr-bloaty.yml +++ b/.github/workflows/pr-bloaty.yml @@ -46,9 +46,10 @@ jobs: - name: Compile Bloaty run: | git clone https://github.com/google/bloaty.git + cd bloaty git checkout "$bloaty_sha" - cmake -B bloaty/build -G Ninja -S bloaty - cmake --build bloaty/build + cmake -B build -G Ninja -S . + cmake --build build - name: Cache Bloaty uses: actions/cache@v3