-
Notifications
You must be signed in to change notification settings - Fork 3
77 lines (68 loc) · 2.5 KB
/
Windows.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Windows
on: [push, pull_request]
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>"]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: "true"
- uses: actions/setup-python@v5
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: Build extension
run: |
dir duckdb-ext/duckdb/src/include
make release
- uses: actions/upload-artifact@v4
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@v4
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