Dashes in target names are replaced with underscores starting with Ru… #137
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
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 | |
jobs: | |
windows: | |
name: Release | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
# Add commits/tags to build against other DuckDB versions | |
duckdb_version: [ '<submodule_version>' ] | |
arch: ['windows_amd64'] | |
env: | |
DUCKDB_PLATFORM: ${{ matrix.arch }} | |
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 }} | |
- name: Build extension | |
env: | |
EXTENSION_STATIC_BUILD: 1 | |
run: | | |
make release | |
build/release/test/Release/unittest.exe | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: ${{matrix.arch}}-extensions | |
path: | | |
build/release/extension/prql/prql.duckdb_extension | |
- name: Install SSH Key | |
uses: shimataro/[email protected] | |
with: | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }} | |
- name: Deploy | |
env: | |
SSH_USER: ${{ secrets.SSH_USER }} | |
SSH_HOST: ${{ secrets.SSH_HOST }} | |
UPLOAD_BASE_PATH: ${{ secrets.UPLOAD_BASE_PATH }} | |
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 [[ "$SSH_HOST" == "" ]] ; then | |
echo 'No key set, skipping' | |
elif [[ "$GITHUB_REF" =~ ^(refs/tags/v.+)$ ]] ; then | |
./scripts/extension-upload.sh prql ${{ github.ref_name }} $DUCKDB_VERSION ${{matrix.arch}} true | |
elif [[ "$GITHUB_REF" =~ ^(refs/heads/main)$ ]] ; then | |
./scripts/extension-upload.sh prql `git log -1 --format=%h` $DUCKDB_VERSION ${{matrix.arch}} false | |
fi |