-
Notifications
You must be signed in to change notification settings - Fork 491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: use reusable workflow for MacOs build #9392
Closed
Closed
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
9814b7c
Add workflow for MacOS build
fedordikarev f977a62
disable build_and_test for now, run build-macos from neon_extra_build
fedordikarev 10be4cb
fix mistype and remove unnecessary checks
fedordikarev bd517b1
fix build-macos.yml
fedordikarev fbc6b7f
Merge branch 'main' into feat/ci_workflow_build_macos_2
fedordikarev e47c846
trigger changes in pgxs
fedordikarev f5e21b9
trigger changes
fedordikarev 44c1f52
remove concurrency from build-macos
fedordikarev 350ae9a
try to sparse-checkout
fedordikarev 9da0b4d
actually run makes
fedordikarev e86abd8
trigger changes to test build
fedordikarev b2cf879
Merge branch 'main' into feat/ci_workflow_build_macos_2
fedordikarev 3ab7297
fix workflow syntax
fedordikarev fb05a2e
fix workflow syntax
fedordikarev 22963c7
checkout repo for build
fedordikarev 57f5880
just checkout with submodules
fedordikarev 7ee766c
runs-on: macos-15
fedordikarev 73f494a
will it compile on macos-14?
fedordikarev 3bb61ce
don't build and run on ubuntu for tests
fedordikarev c4ddac3
Merge branch 'main' into feat/ci_workflow_build_macos_2
fedordikarev 8c9bf3e
checkout only required submodule
fedordikarev eb8a87d
use sparse checkout
fedordikarev 1bf8857
run git submodule command
fedordikarev 441e769
submodule update --depth 1
fedordikarev 3a3fcb3
now all together and check for build on macos-15
fedordikarev 8d81c83
revert changes from pgxn/neon/Makefile
fedordikarev aa19a41
dont depend on itself and check that doesn;t rebuild when no changes
fedordikarev d133f83
check that changes not empty for build matrix
fedordikarev 723a791
check for empty array '[]' not empty string []
fedordikarev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
name: Check neon with MacOS builds | ||
|
||
on: | ||
workflow_call: | ||
|
||
env: | ||
RUST_BACKTRACE: 1 | ||
COPT: '-Werror' | ||
|
||
# TODO: move `check-*` and `files-changed` jobs to the "Caller" Workflow | ||
# We should care about that as Github has limitations: | ||
# - You can connect up to four levels of workflows | ||
# - You can call a maximum of 20 unique reusable workflows from a single workflow file. | ||
# https://docs.github.com/en/actions/sharing-automations/reusing-workflows#limitations | ||
jobs: | ||
files-changed: | ||
name: Detect what files changed | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 3 | ||
outputs: | ||
postgres_changes: ${{ steps.postgres_changes.outputs.changes }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@6ccd57f4c5d15bdc2fef309bd9fb6cc9db2ef1c6 # v4.1.7 | ||
with: | ||
submodules: true | ||
|
||
- name: Check for Postgres changes | ||
uses: dorny/paths-filter@1441771bbfdd59dcd748680ee64ebd8faab1a242 #v3 | ||
id: postgres_changes | ||
with: | ||
token: ${{ github.token }} | ||
filters: | | ||
v14: ['vendor/postgres-v14/**', 'Makefile', 'pgxn/**'] | ||
v15: ['vendor/postgres-v15/**', 'Makefile', 'pgxn/**'] | ||
v16: ['vendor/postgres-v16/**', 'Makefile', 'pgxn/**'] | ||
v17: ['vendor/postgres-v17/**', 'Makefile', 'pgxn/**'] | ||
base: ${{ github.event_name != 'pull_request' && (github.event.merge_group.base_ref || github.ref_name) || '' }} | ||
ref: ${{ github.event_name != 'pull_request' && (github.event.merge_group.head_ref || github.ref) || ''}} | ||
|
||
check-macos-build: | ||
needs: [ files-changed ] | ||
if: | | ||
needs.files-changed.outputs.postgres_changes != '[]' && ( | ||
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' | ||
) | ||
timeout-minutes: 30 | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
postgres-version: ${{ fromJSON(needs.files-changed.outputs.postgres_changes) }} | ||
env: | ||
# Use release build only, to have less debug info around | ||
# Hence keeping target/ (and general cache size) smaller | ||
BUILD_TYPE: release | ||
steps: | ||
- name: Checkout main repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Checkout submodule vendor/postgres-${{ matrix.postgres-version }} | ||
run: | | ||
git submodule init vendor/postgres-${{ matrix.postgres-version }} | ||
git submodule update --depth 1 | ||
|
||
- name: Install build dependencies | ||
run: | | ||
echo brew install flex bison openssl protobuf icu4c | ||
|
||
- name: Build Postgres ${{ matrix.postgres-version }} | ||
run: | | ||
echo make postgres-${{ matrix.postgres-version }} | ||
|
||
- name: Build Neon Pg Ext ${{ matrix.postgres-version }} | ||
run: | | ||
echo make "neon-pg-ext-${{ matrix.postgres-version }}" | ||
|
||
- name: Build walproposer-lib (only for v17) | ||
if: matrix.postgres-version == 'v17' | ||
run: | ||
echo make walproposer-lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ on: | |
- main | ||
- release | ||
- release-proxy | ||
pull_request: | ||
# pull_request: | ||
|
||
defaults: | ||
run: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're ok to use the latest tag (like
@v4
) for "official" actions fromactions
org