diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9cd8329..b0be771 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 @@ -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 }} @@ -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 }} diff --git a/scripts/build.py b/scripts/build.py index 0bf4db1..8c3bd66 100644 --- a/scripts/build.py +++ b/scripts/build.py @@ -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] @@ -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")