Skip to content

Dashes in target names are replaced with underscores starting with Ru… #137

Dashes in target names are replaced with underscores starting with Ru…

Dashes in target names are replaced with underscores starting with Ru… #137

Workflow file for this run

name: MacOS
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:
macos:
name: MacOS Release
strategy:
matrix:
# Add commits/tags to build against other DuckDB versions
duckdb_version: [ '<submodule_version>' ]
# Universal build (OSX_BUILD_UNIVERSAL: 1) not possible, see: https://github.com/corrosion-rs/corrosion/issues/115
arch: ['osx_amd64', 'osx_arm64']
runs-on: ${{ matrix.arch == 'osx_amd64' && 'macos-latest' || 'macos-14' }}
env:
GEN: ninja
DUCKDB_PLATFORM: ${{ matrix.arch }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'true'
- name: Install Ninja
run: brew install ninja
- uses: actions/setup-python@v2
with:
python-version: '3.12'
- name: Checkout DuckDB to version
if: ${{ matrix.duckdb_version != '<submodule_version>'}}
run: |
cd duckdb
git checkout ${{ matrix.duckdb_version }}
# Build extension
- name: Build extension
env:
# Static build on OS X breaks prql plugin, see https://github.com/duckdb/duckdb/issues/6521
EXTENSION_STATIC_BUILD: 1
shell: bash
run: make release
- name: Build extension
run: make test
- 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