Skip to content

Commit

Permalink
checkou
Browse files Browse the repository at this point in the history
  • Loading branch information
Hannes Mühleisen committed Jun 3, 2024
1 parent aad96da commit 32ab121
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 5 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Get all changed description files
id: changed-description-files
id: changed-files
uses: tj-actions/changed-files@v44
with:
files: |
Expand All @@ -19,11 +19,19 @@ jobs:

- name: Parse description files
env:
ALL_CHANGED_FILES: ${{ steps.changed-description-files.outputs.all_changed_files }}
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
ls -R .
pip install pyyaml
python scripts/build.py
- uses: actions/checkout@v4
env:
with:
repository: ${{ env.COMMUNITY_EXTENSION_URL }}
ref: ${{ env.COMMUNITY_EXTENSION_REF }}
path: extension-build
fetch-depth: 0

# - name: Build extension binaries
# uses: duckdb/extension-ci-tools/.github/workflows/_extension_distribution.yml@main
# with:
Expand Down
2 changes: 1 addition & 1 deletion extensions/demo/description.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ extension:

repo:
url: https://github.com/duckdb/extension-template
revision: a86093f6abd711620b49af29a7e621728d275e00
ref: a86093f6abd711620b49af29a7e621728d275e00
21 changes: 20 additions & 1 deletion scripts/build.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,21 @@
import os
print(os.environ['ALL_CHANGED_FILES'])
import yaml

# TODO: check prefix, needs to be in installation dir

desc_files = os.environ['ALL_CHANGED_FILES'].split(' ')
if len(desc_files) != 1:
raise ValueError('cannot have multiple descriptors changed or packages with spaces in their names')
desc_file = desc_files[0]

with open(desc_file, 'r') as stream:
desc = yaml.safe_load(stream)

print(desc)

# todo check other stuff like build system etc.


os.environ['COMMUNITY_EXTENSION_URL'] = desc['repo']['url']
os.environ['COMMUNITY_EXTENSION_REVISION'] = desc['repo']['revision']
os.environ['COMMUNITY_EXTENSION_NAME'] = desc['extension']['name']

0 comments on commit 32ab121

Please sign in to comment.