Skip to content

Commit

Permalink
Merge pull request #12 from carlopi/main
Browse files Browse the repository at this point in the history
Changes to CI, build by default on all platforms, but allow overrides
  • Loading branch information
samansmink committed Jun 25, 2024
2 parents 9277a0a + 4c4e82d commit d375184
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
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")

0 comments on commit d375184

Please sign in to comment.