From b93dee14b4b48e55fae98353c75ce00fd31e497b Mon Sep 17 00:00:00 2001 From: Carlo Piovesan Date: Tue, 10 Dec 2024 16:10:46 +0100 Subject: [PATCH] Try to test _extension_code_quality in CI --- .github/workflows/TestCITools.yml | 7 +++-- .github/workflows/_extension_code_quality.yml | 29 +++++++++++++++++-- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/.github/workflows/TestCITools.yml b/.github/workflows/TestCITools.yml index 37f9845..4989044 100644 --- a/.github/workflows/TestCITools.yml +++ b/.github/workflows/TestCITools.yml @@ -66,5 +66,8 @@ jobs: name: Code quality check uses: ./.github/workflows/_extension_code_quality.yml with: - override_ci_tools_repository: "Dtenwolde/extension-ci-tools" - ci_tools_version: main + override_repository: duckdb/extension-template + override_ref: main + duckdb_version: v1.1.3 + override_ci_tools_repository: ${{ github.repository }} + ci_tools_version: ${{ github.sha }} diff --git a/.github/workflows/_extension_code_quality.yml b/.github/workflows/_extension_code_quality.yml index c123286..99f9f43 100644 --- a/.github/workflows/_extension_code_quality.yml +++ b/.github/workflows/_extension_code_quality.yml @@ -6,8 +6,9 @@ on: explicit_checks: required: false type: string - # The version of the https://github.com/duckdb/extension-ci-tools submodule of the extension. In most cases will be identical to `duckdb_version`. - # Passing this explicitly is required because of https://github.com/actions/toolkit/issues/1264 + duckdb_version: + required: true + type: string ci_tools_version: required: true type: string @@ -16,6 +17,15 @@ on: required: false type: string default: "duckdb/extension-ci-tools" + override_repository: + required: false + type: string + default: "" + # The git ref used for the override_repository + override_ref: + required: false + type: string + default: "" jobs: @@ -29,8 +39,18 @@ jobs: GEN: ninja steps: + - uses: actions/checkout@v4 + name: Checkout override repository + if: ${{inputs.override_repository != ''}} + with: + repository: ${{ inputs.override_repository }} + ref: ${{ inputs.override_ref }} + fetch-depth: 0 + submodules: 'true' + - uses: actions/checkout@v4 name: Checkout current repository + if: ${{inputs.override_repository == ''}} with: fetch-depth: 0 submodules: 'true' @@ -42,6 +62,11 @@ jobs: ref: ${{ inputs.ci_tools_version }} repository: ${{ inputs.override_ci_tools_repository }} + - name: Checkout DuckDB to version + if: ${{inputs.duckdb_version != ''}} + run: | + DUCKDB_GIT_VERSION=${{ inputs.duckdb_version }} make set_duckdb_version + - name: Install shell: bash run: sudo apt-get update -y -qq && sudo apt-get install -y -qq ninja-build clang-format-11 && sudo pip3 install cmake-format black cxxheaderparser pcpp