as_character #568
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# This workflow calls the main distribution pipeline from DuckDB to build, test and (optionally) release the extension | |
# | |
name: Main Extension Distribution Pipeline | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
repository_dispatch: | |
schedule: | |
- cron: "20 0 * * *" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/main' || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
matrix: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- uses: actions/checkout@v2 | |
- id: set-matrix | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
matrix=$( | |
{ | |
echo | |
gh api \ | |
/repos/cran/duckdb/contents/src/duckdb/src/function/table/version/pragma_version.cpp \ | |
-H "Accept: application/vnd.github+json" --jq '.content' | base64 -d | \ | |
sed -nr '/^#define DUCKDB_SOURCE_ID "(.*)"/s//\1/p' | |
gh api \ | |
/repos/duckdb/duckdb-r/contents/src/duckdb/src/function/table/version/pragma_version.cpp \ | |
-H "Accept: application/vnd.github+json" --jq '.content' | base64 -d | \ | |
sed -nr '/^#define DUCKDB_SOURCE_ID "(.*)"/s//\1/p' | |
gh api /repos/duckdb/duckdb/tags --jq '.[].commit.sha' | head -n 2 | |
} | cut -c-10 | sort | uniq | jq -c -R '{version: [inputs|scan(".+")]}' | |
) | |
echo $matrix | |
echo $matrix | jq . | |
echo "matrix=$matrix" >> $GITHUB_OUTPUT | |
check-matrix: | |
runs-on: ubuntu-latest | |
needs: matrix | |
steps: | |
- name: Install json2yaml | |
run: | | |
sudo npm install -g json2yaml | |
- name: Check matrix definition | |
run: | | |
matrix='${{ needs.matrix.outputs.matrix }}' | |
echo $matrix | |
echo $matrix | jq . | |
echo $matrix | json2yaml | |
duckdb-stable-build: | |
name: Build extension binaries | |
needs: matrix | |
uses: krlmlr/extension-ci-tools/.github/workflows/_extension_distribution.yml@b-13-python | |
strategy: | |
fail-fast: false | |
matrix: ${{fromJson(needs.matrix.outputs.matrix)}} | |
with: | |
vcpkg_commit: a42af01b72c28a8e1d7b48107b33e4f286a55ef6 | |
duckdb_version: ${{ matrix.version }} | |
extension_name: rfuns | |
duckdb-stable-deploy: | |
name: Deploy extension binaries | |
needs: | |
- duckdb-stable-build | |
- matrix | |
uses: ./.github/workflows/_extension_deploy.yml | |
secrets: inherit | |
if: github.event_name != 'pull_request' | |
strategy: | |
fail-fast: false | |
matrix: ${{fromJson(needs.matrix.outputs.matrix)}} | |
with: | |
duckdb_version: ${{ matrix.version }} | |
extension_name: rfuns | |
deploy_latest: ${{ startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' }} | |
deploy_versioned: ${{ startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' }} |