Skip to content

Commit

Permalink
Attempting to change pipeline to create releases (if tagged). Also up…
Browse files Browse the repository at this point in the history
…loading release artifacts.
  • Loading branch information
prmoore77 committed Jan 24, 2024
1 parent 3b80f2c commit 0fe2ace
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 6 deletions.
32 changes: 28 additions & 4 deletions .github/workflows/build-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ name: ci

on:
workflow_dispatch:
release:
types:
- published
push:

env:
DOCKER_IMAGE_NAME: voltrondata/flight-sql
Expand Down Expand Up @@ -120,15 +118,40 @@ jobs:
context: .
platforms: linux/${{ matrix.platform }}
file: Dockerfile.ci
push: true
push: ${{ startsWith(github.ref, 'refs/tags/') }}
tags: |
${{ env.DOCKER_IMAGE_NAME }}:latest-${{ matrix.platform }}
${{ env.DOCKER_IMAGE_NAME }}:${{ github.ref_name }}-${{ matrix.platform }}
no-cache: true
provenance: false

create-release:
if: startsWith(github.ref, 'refs/tags/')
name: Create a release
needs: [build-project-macos, build-project-linux]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]

- name: Download All Artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
pattern: flight_sql_cli_*.zip
merge-multiple: true

- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
artifacts/flight_sql_cli_*.zip
LICENSE
update-image-manifest:
name: Update DockerHub image manifest to include all built platforms
if: startsWith(github.ref, 'refs/tags/')
needs: build-project-linux
runs-on: ubuntu-latest
steps:
Expand All @@ -137,6 +160,7 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Create and push manifest images
uses: Noelware/docker-manifest-action@master # or use a pinned version in the Releases tab
with:
Expand Down
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,27 @@ Stop the docker image with:
docker stop flight-sql
```

## Option 2 - Steps to build the solution manually
## Option 2 - Download and run the flight_sql CLI executable

In order to run build the solution manually, and run SQLite and DuckDB Flight SQL server, you need to set up a new Python 3.8+ virtual environment on your machine.
Download (and unzip) the latest release of the **flight_sql** CLI executable from these currently supported platforms:
[Linux x86-64](https://github.com/voltrondata/flight-sql-server-example/releases/latest/download/flight_sql_cli_linux_amd64.zip)
[Linux arm64](https://github.com/voltrondata/flight-sql-server-example/releases/latest/download/flight_sql_cli_linux_arm64.zip)
[MacOS x86-64](https://github.com/voltrondata/flight-sql-server-example/releases/latest/download/flight_sql_cli_linux_amd64.zip)
[MacOS arm64](https://github.com/voltrondata/flight-sql-server-example/releases/latest/download/flight_sql_cli_linux_arm64.zip)

Then from a terminal - you can run:
```bash
FLIGHT_PASSWORD="flight_password" flight_sql --database-filename data/some_db.duckdb --print-queries
```

To see all program options - run:
```bash
flight_sql --help
```

## Option 3 - Steps to build the solution manually

In order to run build the solution manually, and run SQLite and DuckDB Flight SQL server, you need to set up a new Python 3.9+ virtual environment on your machine.
Follow these steps to do so (thanks to David Li!).

1. Clone the repo and build the static library and executable
Expand Down

0 comments on commit 0fe2ace

Please sign in to comment.