From 0355b5fd17bde99ef59b3d4386e911e39885d932 Mon Sep 17 00:00:00 2001 From: Carlo Piovesan Date: Mon, 23 Sep 2024 17:51:07 +0200 Subject: [PATCH 1/2] Allow passing extra duckdb_tag and extension_tag internal options --- .github/workflows/_extension_distribution.yml | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/.github/workflows/_extension_distribution.yml b/.github/workflows/_extension_distribution.yml index c16f569..9c0d109 100644 --- a/.github/workflows/_extension_distribution.yml +++ b/.github/workflows/_extension_distribution.yml @@ -85,6 +85,16 @@ on: required: false type: boolean default: false + # Optional tag the build extension should have -- this is easy to misuse, and subject to change, for internal use only + extension_tag: + required: false + type: string + default: "" + # Optional tag the referenced duckdb should have -- this is a easy to misuse, and subject to change, for internal use only + duckdb_tag: + required: false + type: string + default: "" # DEPRECATED: use extra_toolchains instead enable_rust: required: false @@ -121,6 +131,17 @@ jobs: cd duckdb git checkout ${{ inputs.duckdb_version }} + - name: Tag extension + if: ${{inputs.extension_tag != ''}} + run: | + git tag ${{ inputs.extension_tag }} + + - name: Tag DuckDB extension + if: ${{inputs.duckdb_tag != ''}} + run: | + cd duckdb + git tag ${{ inputs.duckdb_tag }} + - id: parse-matrices run: | python3 ${{ inputs.matrix_parse_script }} --input ./duckdb/.github/config/distribution_matrix.json --select_os linux --output linux_matrix.json --exclude "${{ inputs.exclude_archs }}" --pretty @@ -188,6 +209,17 @@ jobs: cd duckdb git checkout ${{ inputs.duckdb_version }} + - name: Tag extension + if: ${{inputs.extension_tag != ''}} + run: | + git tag ${{ inputs.extension_tag }} + + - name: Tag DuckDB extension + if: ${{inputs.duckdb_tag != ''}} + run: | + cd duckdb + git tag ${{ inputs.duckdb_tag }} + - uses: actions/checkout@v4 name: Checkout Extension CI tools with: @@ -319,6 +351,18 @@ jobs: cd duckdb git checkout ${{ inputs.duckdb_version }} + - name: Tag extension + if: ${{inputs.extension_tag != ''}} + run: | + git tag ${{ inputs.extension_tag }} + + - name: Tag DuckDB extension + if: ${{inputs.duckdb_tag != ''}} + run: | + cd duckdb + git tag ${{ inputs.duckdb_tag }} + + - name: Setup vcpkg uses: lukka/run-vcpkg@v11.1 with: @@ -481,6 +525,18 @@ jobs: cd duckdb git checkout ${{ inputs.duckdb_version }} + - name: Tag extension + if: ${{inputs.extension_tag != ''}} + run: | + git tag ${{ inputs.extension_tag }} + + - name: Tag DuckDB extension + if: ${{inputs.duckdb_tag != ''}} + run: | + cd duckdb + git tag ${{ inputs.duckdb_tag }} + + - name: Setup Ccache uses: hendrikmuhs/ccache-action@main continue-on-error: true @@ -565,6 +621,17 @@ jobs: cd duckdb git checkout ${{ inputs.duckdb_version }} + - name: Tag extension + if: ${{inputs.extension_tag != ''}} + run: | + git tag ${{ inputs.extension_tag }} + + - name: Tag DuckDB extension + if: ${{inputs.duckdb_tag != ''}} + run: | + cd duckdb + git tag ${{ inputs.duckdb_tag }} + - uses: mymindstorm/setup-emsdk@v13 with: version: 'latest' From ffc53155d7943c53907639059f8abf5d29edede2 Mon Sep 17 00:00:00 2001 From: Carlo Piovesan Date: Tue, 24 Sep 2024 08:02:39 +0200 Subject: [PATCH 2/2] Add checks on duckdb_tag not being provided on 'main' or on vX.X.X --- .github/workflows/_extension_distribution.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/_extension_distribution.yml b/.github/workflows/_extension_distribution.yml index 9c0d109..0663553 100644 --- a/.github/workflows/_extension_distribution.yml +++ b/.github/workflows/_extension_distribution.yml @@ -136,6 +136,11 @@ jobs: run: | git tag ${{ inputs.extension_tag }} + - name: Tag DuckDB extension + if: ${{inputs.duckdb_tag != '' && (inputs.duckdb_version == 'main' || inputs.duckdb_version[0] == 'v') }} + run: | + echo "When duckdb_tag is provied an explcit git ref is expected" && exit 1 + - name: Tag DuckDB extension if: ${{inputs.duckdb_tag != ''}} run: |