Skip to content

Add additional versions #41

Add additional versions

Add additional versions #41

Workflow file for this run

name: Windows
on: [push, pull_request,repository_dispatch]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/main' || github.sha }}
cancel-in-progress: true
defaults:
run:
shell: bash
# TODO: checkout duckdb-ext/duckdb
jobs:
windows:
name: Release
runs-on: windows-latest
# These permissions are needed to interact with GitHub's OIDC Token endpoint.
permissions:
id-token: write
strategy:
matrix:
# Add commits/tags to build against other DuckDB versions
duckdb_version: [ '<submodule_version>', 'v0.9.2', 'v0.10.0' ]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'true'
- uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Checkout DuckDB to version
# Add commits/tags to build against other DuckDB versions
if: ${{ matrix.duckdb_version != '<submodule_version>'}}
run: |
cd duckdb
git checkout ${{ matrix.duckdb_version }}
cd ../duckdb-ext/duckdb
git checkout ${{ matrix.duckdb_version }}
- name: Patch DuckDB with named parameter support
run: |
cd duckdb
git apply ../duckdb-namedparams.patch
cd ../duckdb-ext/duckdb
git apply ../../duckdb-namedparams.patch
- name: Build extension
run: |
dir duckdb-ext/duckdb/src/include
make release
- uses: actions/upload-artifact@v2
with:
name: linux-extensions-64-aarch64
path: |
build/release/extension/duckdb-athena-extension/athena.duckdb_extension
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.OIDC_ROLE_ARN }}
aws-region: ${{ secrets.S3_REGION }}
- name: Deploy
env:
BUCKET_NAME: ${{ secrets.S3_BUCKET }}
run: |
cd duckdb
git fetch --tags
export DUCKDB_VERSION=`git tag --points-at HEAD`
export DUCKDB_VERSION=${DUCKDB_VERSION:=`git log -1 --format=%h`}
cd ..
if [[ "$BUCKET_NAME" == "" ]] ; then
echo 'No bucket set, skipping'
elif [[ "$GITHUB_REF" =~ ^(refs/tags/v.+)$ ]] ; then
python -m pip install awscli
./scripts/extension-upload.sh athena ${{ github.ref_name }} $DUCKDB_VERSION windows_amd64 $BUCKET_NAME true
elif [[ "$GITHUB_REF" =~ ^(refs/heads/main)$ ]] ; then
python -m pip install awscli
./scripts/extension-upload.sh athena `git log -1 --format=%h` $DUCKDB_VERSION windows_amd64 $BUCKET_NAME false
fi