no arm cross-comop #88
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: 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: | |
os: [macos-latest, macos-14] | |
# 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'] | |
include: | |
- os: 'macos-latest' | |
arch: 'osx_amd64' | |
- os: 'macos-14' | |
arch: 'osx_arm64' | |
runs-on: ${{ matrix.os }} | |
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 |