Skip to content
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

Changes to CI, build by default on all platforms, but allow overrides #12

Merged
merged 2 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ jobs:
COMMUNITY_EXTENSION_NAME: ${{ steps.parse.outputs.COMMUNITY_EXTENSION_NAME }}
COMMUNITY_EXTENSION_GITHUB: ${{ steps.parse.outputs.COMMUNITY_EXTENSION_GITHUB }}
COMMUNITY_EXTENSION_REF: ${{ steps.parse.outputs.COMMUNITY_EXTENSION_REF }}
COMMUNITY_EXTENSION_DEPLOY: ${{ steps.parse.outputs.COMMUNITY_EXTENSION_DEPLOY }}
COMMUNITY_EXTENSION_EXCLUDE_PLATFORMS: ${{ steps.parse.outputs.COMMUNITY_EXTENSION_EXCLUDE_PLATFORMS }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -38,8 +40,8 @@ jobs:
if: ${{ needs.prepare.outputs.COMMUNITY_EXTENSION_NAME != '' }}
with:
duckdb_version: v1.0.0
exclude_archs: ${{ needs.prepare.outputs.COMMUNITY_EXTENSION_EXCLUDE_PLATFORMS }}
extension_name: ${{ needs.prepare.outputs.COMMUNITY_EXTENSION_NAME }}
exclude_archs: 'wasm_mvp;wasm_eh;wasm_threads;windows_amd64_rtools'
repository: ${{ needs.prepare.outputs.COMMUNITY_EXTENSION_GITHUB }}
ref: ${{ needs.prepare.outputs.COMMUNITY_EXTENSION_REF }}

Expand All @@ -48,12 +50,13 @@ jobs:
- prepare
- build
uses: ./.github/workflows/_extension_deploy.yml
if: ${{ needs.prepare.outputs.COMMUNITY_EXTENSION_DEPLOY != '' }}
secrets: inherit
with:
deploy_latest: true
duckdb_version: v1.0.0
exclude_archs: ${{ needs.prepare.outputs.COMMUNITY_EXTENSION_EXCLUDE_PLATFORMS }}
extension_name: ${{ needs.prepare.outputs.COMMUNITY_EXTENSION_NAME }}
exclude_archs: 'wasm_mvp;wasm_eh;wasm_threads;windows_amd64_rtools'
repository: ${{ needs.prepare.outputs.COMMUNITY_EXTENSION_GITHUB }}
ref: ${{ needs.prepare.outputs.COMMUNITY_EXTENSION_REF }}

16 changes: 10 additions & 6 deletions scripts/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@
if len(desc_files) > 1:
raise ValueError('cannot have multiple descriptors changed or packages with spaces in their names')

deploy = True

if len(desc_files) == 0 or len(desc_files[0]) == 0:
print("No changed files, nothing will be built")
with open('env.sh', 'w+') as hdl:
hdl.write(f"COMMUNITY_EXTENSION_GITHUB=\n")
hdl.write(f"COMMUNITY_EXTENSION_REF=\n")
hdl.write(f"COMMUNITY_EXTENSION_NAME=\n")
sys.exit(os.EX_OK)
print("No changed files, only quack will be built as a test")
desc_files = ['extensions/quack/description.yml']
deploy = False

desc_file = desc_files[0]

Expand All @@ -35,3 +34,8 @@
hdl.write(f"COMMUNITY_EXTENSION_GITHUB={desc['repo']['github']}\n")
hdl.write(f"COMMUNITY_EXTENSION_REF={desc['repo']['ref']}\n")
hdl.write(f"COMMUNITY_EXTENSION_NAME={desc['extension']['name']}\n")
excluded_platforms = desc['extension'].get('excluded_platforms')
if excluded_platforms:
hdl.write(f"COMMUNITY_EXTENSION_EXCLUDE_PLATFORMS={excluded_platforms}\n")
if deploy:
hdl.write(f"COMMUNITY_EXTENSION_DEPLOY=1\n")
Loading