Skip to content

Commit

Permalink
rewrite file filter
Browse files Browse the repository at this point in the history
  • Loading branch information
fedordikarev committed Jan 6, 2025
1 parent 56cd3d2 commit 664cdec
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 39 deletions.
40 changes: 2 additions & 38 deletions .github/file-filters.yaml
Original file line number Diff line number Diff line change
@@ -1,45 +1,9 @@
# From Cargo.toml
Cargo_toml_members: &Cargo_toml_members [
"compute_tools",
"control_plane",
"control_plane/storcon_cli",
"pageserver",
"pageserver/compaction",
"pageserver/ctl",
"pageserver/client",
"pageserver/pagebench",
"proxy",
"safekeeper",
"storage_broker",
"storage_controller",
"storage_controller/client",
"storage_scrubber",
"workspace_hack",
"libs/compute_api",
"libs/pageserver_api",
"libs/postgres_ffi",
"libs/safekeeper_api",
"libs/desim",
"libs/utils",
"libs/consumption_metrics",
"libs/postgres_backend",
"libs/pq_proto",
"libs/tenant_size_model",
"libs/metrics",
"libs/postgres_connection",
"libs/remote_storage",
"libs/tracing-utils",
"libs/postgres_ffi/wal_craft",
"libs/vm_monitor",
"libs/walproposer",
"libs/wal_decoder",
"libs/postgres_initdb",
]
rust_code: ['**/*.rs', '**/Cargo.toml', '**/Cargo.lock']

v14: ['vendor/postgres-v14/**', 'Makefile', 'pgxn/**']
v15: ['vendor/postgres-v15/**', 'Makefile', 'pgxn/**']
v16: ['vendor/postgres-v16/**', 'Makefile', 'pgxn/**']
v17: ['vendor/postgres-v17/**', 'Makefile', 'pgxn/**', *Cargo_toml_members]
v17: ['vendor/postgres-v17/**', 'Makefile', 'pgxn/**']

rebuild_neon_extra:
- .github/workflows/neon_extra_builds.yml
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ on:
type: string
default: '[]'
required: false
rebuild_rust_code:
description: "Rebuild Rust code"
type: boolean
default: false
required: false
rebuild_everything:
description: "If true, rebuild for all versions"
type: boolean
Expand Down Expand Up @@ -147,7 +152,7 @@ jobs:

cargo-build:
if: |

Check failure on line 154 in .github/workflows/build-macos.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] .github/workflows/build-macos.yml#L154

property "rust_code" is not defined in object type {pg_versions: string; rebuild_everything: bool; rebuild_rust_code: bool} [expression]
Raw output
.github/workflows/build-macos.yml:154:40: property "rust_code" is not defined in object type {pg_versions: string; rebuild_everything: bool; rebuild_rust_code: bool} [expression]
(inputs.pg_versions != '[]' || inputs.rebuild_everything) && (
(inputs.pg_versions != '[]' || inputs.rust_code || inputs.rebuild_everything) && (
contains(github.event.pull_request.labels.*.name, 'run-extra-build-macos') ||
contains(github.event.pull_request.labels.*.name, 'run-extra-build-*') ||
github.ref_name == 'main'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/neon_extra_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
outputs:
v17: ${{ steps.files_changed.outputs.v17 }}
postgres_changes: ${{ steps.postgres_changes.outputs.changes }}
rebuild_rust_code: ${{ steps.files_changed.outputs.rust_code }}
rebuild_everything: ${{ steps.files_changed.outputs.rebuild_neon_extra || steps.files_changed.outputs.rebuild_macos }}

steps:
Expand Down Expand Up @@ -70,6 +71,7 @@ jobs:
uses: ./.github/workflows/build-macos.yml
with:
pg_versions: ${{ needs.files-changed.outputs.postgres_changes }}
rebuild_rust_code: ${{ needs.files-changed.outputs.rust_code }}

Check failure on line 74 in .github/workflows/neon_extra_builds.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] .github/workflows/neon_extra_builds.yml#L74

property "rust_code" is not defined in object type {postgres_changes: string; rebuild_everything: string; rebuild_rust_code: string; v17: string} [expression]
Raw output
.github/workflows/neon_extra_builds.yml:74:30: property "rust_code" is not defined in object type {postgres_changes: string; rebuild_everything: string; rebuild_rust_code: string; v17: string} [expression]
rebuild_everything: ${{ fromJson(needs.files-changed.outputs.rebuild_everything) }}

gather-rust-build-stats:
Expand Down

0 comments on commit 664cdec

Please sign in to comment.