Skip to content

Commit 8701562

Browse files
Add GitHub Actions workflow for cross-platform binary builds and Linux binaries
1 parent 6502423 commit 8701562

13 files changed

Lines changed: 485 additions & 28 deletions

File tree

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
name: Build Binaries
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
workflow_dispatch:
8+
9+
jobs:
10+
build-linux:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: dtolnay/rust-toolchain@stable
15+
- name: Build Linux binaries
16+
run: |
17+
cd pangolin
18+
cargo build --release --bin pangolin_api --bin pangolin-admin --bin pangolin-user
19+
- name: Copy binaries
20+
run: |
21+
mkdir -p deployment_assets/bin/linux-x86_64
22+
cp pangolin/target/release/pangolin_api deployment_assets/bin/linux-x86_64/
23+
cp pangolin/target/release/pangolin-admin deployment_assets/bin/linux-x86_64/
24+
cp pangolin/target/release/pangolin-user deployment_assets/bin/linux-x86_64/
25+
- name: Upload artifacts
26+
uses: actions/upload-artifact@v4
27+
with:
28+
name: linux-binaries
29+
path: deployment_assets/bin/linux-x86_64/*
30+
31+
build-macos-intel:
32+
runs-on: macos-13 # Intel runner
33+
steps:
34+
- uses: actions/checkout@v4
35+
- uses: dtolnay/rust-toolchain@stable
36+
- name: Build macOS Intel binaries
37+
run: |
38+
cd pangolin
39+
cargo build --release --bin pangolin_api --bin pangolin-admin --bin pangolin-user
40+
- name: Copy binaries
41+
run: |
42+
mkdir -p deployment_assets/bin/macos-x86_64
43+
cp pangolin/target/release/pangolin_api deployment_assets/bin/macos-x86_64/
44+
cp pangolin/target/release/pangolin-admin deployment_assets/bin/macos-x86_64/
45+
cp pangolin/target/release/pangolin-user deployment_assets/bin/macos-x86_64/
46+
- name: Upload artifacts
47+
uses: actions/upload-artifact@v4
48+
with:
49+
name: macos-intel-binaries
50+
path: deployment_assets/bin/macos-x86_64/*
51+
52+
build-macos-arm:
53+
runs-on: macos-14 # ARM runner (M1/M2)
54+
steps:
55+
- uses: actions/checkout@v4
56+
- uses: dtolnay/rust-toolchain@stable
57+
- name: Build macOS ARM binaries
58+
run: |
59+
cd pangolin
60+
cargo build --release --bin pangolin_api --bin pangolin-admin --bin pangolin-user
61+
- name: Copy binaries
62+
run: |
63+
mkdir -p deployment_assets/bin/macos-arm64
64+
cp pangolin/target/release/pangolin_api deployment_assets/bin/macos-arm64/
65+
cp pangolin/target/release/pangolin-admin deployment_assets/bin/macos-arm64/
66+
cp pangolin/target/release/pangolin-user deployment_assets/bin/macos-arm64/
67+
- name: Upload artifacts
68+
uses: actions/upload-artifact@v4
69+
with:
70+
name: macos-arm-binaries
71+
path: deployment_assets/bin/macos-arm64/*
72+
73+
build-windows:
74+
runs-on: windows-latest
75+
steps:
76+
- uses: actions/checkout@v4
77+
- uses: dtolnay/rust-toolchain@stable
78+
- name: Build Windows binaries
79+
run: |
80+
cd pangolin
81+
cargo build --release --bin pangolin_api --bin pangolin-admin --bin pangolin-user
82+
- name: Copy binaries
83+
run: |
84+
mkdir -p deployment_assets/bin/windows-x86_64
85+
cp pangolin/target/release/pangolin_api.exe deployment_assets/bin/windows-x86_64/
86+
cp pangolin/target/release/pangolin-admin.exe deployment_assets/bin/windows-x86_64/
87+
cp pangolin/target/release/pangolin-user.exe deployment_assets/bin/windows-x86_64/
88+
- name: Upload artifacts
89+
uses: actions/upload-artifact@v4
90+
with:
91+
name: windows-binaries
92+
path: deployment_assets/bin/windows-x86_64/*
93+
94+
create-release:
95+
needs: [build-linux, build-macos-intel, build-macos-arm, build-windows]
96+
runs-on: ubuntu-latest
97+
if: startsWith(github.ref, 'refs/tags/')
98+
steps:
99+
- uses: actions/download-artifact@v4
100+
- name: Create Release
101+
uses: softprops/action-gh-release@v1
102+
with:
103+
files: |
104+
linux-binaries/*
105+
macos-intel-binaries/*
106+
macos-arm-binaries/*
107+
windows-binaries/*
108+
env:
109+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

deployment_assets/README.md

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,45 @@ This directory contains resources for deploying Pangolin to various environments
66

77
### `demo/`
88
Contains quick-start configurations for evaluating Pangolin.
9-
- **`evaluate_single_tenant/`**: Simple SQLite-based setup.
10-
- **`evaluate_multi_tenant/`**: Full setup with MinIO and SQLite/Postgres options.
9+
- **`evaluate_single_tenant/`**: No-auth mode with memory storage for rapid testing.
10+
- **`evaluate_multi_tenant/`**: Full authentication with SQLite for persistent evaluation.
11+
12+
Both demo scenarios include:
13+
- **Jupyter Notebook** (port 8888) with PyIceberg pre-installed for interactive testing
14+
- **MinIO** for S3-compatible local storage
15+
- **Pangolin UI** for visual management
16+
- **Pangolin API** for REST catalog operations
1117

1218
### `helm/`
1319
Helm charts for Kubernetes deployments.
20+
- Production-ready templates with configurable values
21+
- Support for various cloud providers (AWS, Azure, GCP)
22+
- Includes example value files for different scenarios
1423

1524
### `production/`
16-
Production-grade configurations (e.g., proper logging, metrics, security settings).
25+
Production-grade Docker Compose configurations for different cloud + database combinations:
26+
- `s3_postgres/`, `s3_mongo/` - AWS S3 with PostgreSQL or MongoDB
27+
- `azure_postgres/`, `azure_mongo/` - Azure Blob Storage with PostgreSQL or MongoDB
28+
- `gcp_postgres/`, `gcp_mongo/` - Google Cloud Storage with PostgreSQL or MongoDB
1729

1830
### `terraform/`
1931
Terraform modules for provisioning cloud infrastructure (AWS, Azure, GCP).
32+
- Provisions object storage (S3, Blob, GCS)
33+
- Provisions managed databases (RDS, Azure Database, Cloud SQL)
34+
- Outputs connection details for Pangolin configuration
35+
36+
## Quick Start
37+
38+
For evaluation, use the demo scenarios:
39+
```bash
40+
cd demo/evaluate_single_tenant
41+
docker compose up -d
42+
```
43+
44+
Access:
45+
- **Pangolin UI**: http://localhost:3000
46+
- **Jupyter Notebook**: http://localhost:8888
47+
- **MinIO Console**: http://localhost:9001
2048

2149
## Usage
2250
Refer to the [Getting Started Guide](../docs/getting-started/getting_started.md) for detailed deployment instructions.

deployment_assets/bin/README.md

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# Pangolin Pre-compiled Binaries
2+
3+
This directory contains pre-compiled binaries for Pangolin API server and CLI tools across different platforms.
4+
5+
## Available Binaries
6+
7+
### ✅ Linux (x86_64)
8+
- **pangolin_api** - REST API server (60MB)
9+
- **pangolin-admin** - Admin CLI tool (9.8MB)
10+
- **pangolin-user** - User CLI tool (10MB)
11+
12+
**Usage:**
13+
```bash
14+
# Make executable (if needed)
15+
chmod +x linux-x86_64/*
16+
17+
# Run API server
18+
./linux-x86_64/pangolin_api
19+
20+
# Use CLI tools
21+
./linux-x86_64/pangolin-admin --help
22+
./linux-x86_64/pangolin-user --help
23+
```
24+
25+
### 🔧 macOS & Windows Binaries
26+
27+
**Note**: Cross-compiling to macOS and Windows from Linux requires specialized toolchains:
28+
- **macOS**: Requires macOS SDK and osxcross toolchain
29+
- **Windows**: Requires MinGW-w64 with system permissions
30+
31+
## Recommended Approach: GitHub Actions
32+
33+
The easiest way to build binaries for all platforms is using GitHub Actions, which provides native runners for each platform.
34+
35+
A workflow file is provided at [.github/workflows/build-binaries.yml](../../.github/workflows/build-binaries.yml) that will:
36+
1. Build binaries on native runners (Ubuntu, macOS Intel, macOS ARM, Windows)
37+
2. Upload artifacts for each platform
38+
3. Create GitHub releases with all binaries attached
39+
40+
**To use:**
41+
```bash
42+
# Push a tag to trigger the workflow
43+
git tag v0.1.0
44+
git push origin v0.1.0
45+
46+
# Or manually trigger via GitHub Actions UI
47+
```
48+
49+
## Manual Cross-Compilation (Advanced)
50+
51+
### macOS (requires macOS machine or osxcross)
52+
```bash
53+
# On a Mac:
54+
cargo build --release --target x86_64-apple-darwin
55+
cargo build --release --target aarch64-apple-darwin
56+
57+
# On Linux with osxcross (complex setup):
58+
# See: https://github.com/tpoechtrager/osxcross
59+
```
60+
61+
### Windows (requires MinGW)
62+
```bash
63+
# Install MinGW
64+
sudo apt-get install mingw-w64
65+
66+
# Add target
67+
rustup target add x86_64-pc-windows-gnu
68+
69+
# Build
70+
cargo build --release --target x86_64-pc-windows-gnu
71+
```
72+
73+
## Environment Variables
74+
75+
All binaries respect the same environment variables documented in [docs/getting-started/env_vars.md](../../docs/getting-started/env_vars.md).
76+
77+
### Common Variables:
78+
- `RUST_LOG` - Logging level (info, debug, warn, error)
79+
- `PANGOLIN_STORAGE_TYPE` - Backend storage (memory, postgres, mongodb, sqlite)
80+
- `DATABASE_URL` - Database connection string
81+
- `PANGOLIN_NO_AUTH` - Enable no-auth mode for evaluation (true/false)
82+
- `AWS_*` / `AZURE_*` / `GCP_*` - Cloud provider credentials
83+
84+
## Binary Sizes
85+
86+
The binaries are statically linked and include all dependencies:
87+
- **API Server**: ~60MB (includes all storage backends, cloud SDKs, and Iceberg REST implementation)
88+
- **CLI Tools**: ~10MB each (includes HTTP client and JSON processing)
89+
90+
## Security Notes
91+
92+
1. **Verify Checksums**: Always verify binary checksums before deployment
93+
2. **Use HTTPS**: Run API server behind a reverse proxy with TLS in production
94+
3. **Secrets Management**: Never hardcode credentials; use environment variables or secret managers
95+
4. **Regular Updates**: Keep binaries updated to receive security patches
96+
97+
## Building from Source
98+
99+
To build binaries yourself on any platform:
100+
101+
```bash
102+
cd pangolin/
103+
cargo build --release --bin pangolin_api --bin pangolin-admin --bin pangolin-user
104+
105+
# Binaries will be in target/release/
106+
```
107+
108+
## Docker Alternative
109+
110+
If you prefer containerized deployments, use our Docker images:
111+
- `alexmerced/pangolin-api:0.1.0`
112+
- `alexmerced/pangolin-cli:0.1.0`
113+
- `alexmerced/pangolin-ui:0.1.0`
114+
115+
See [deployment_assets/demo/](../demo/) for Docker Compose examples.
9.78 MB
Binary file not shown.
9.99 MB
Binary file not shown.
59.7 MB
Binary file not shown.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# macOS Apple Silicon (ARM64) Binaries
2+
3+
To build binaries for macOS Apple Silicon:
4+
5+
```bash
6+
rustup target add aarch64-apple-darwin
7+
cd pangolin/
8+
cargo build --release --target aarch64-apple-darwin --bin pangolin_api --bin pangolin-admin --bin pangolin-user
9+
```
10+
11+
Binaries will be in `target/aarch64-apple-darwin/release/`
12+
13+
Copy them here for distribution.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# macOS Intel (x86_64) Binaries
2+
3+
To build binaries for macOS Intel:
4+
5+
```bash
6+
rustup target add x86_64-apple-darwin
7+
cd pangolin/
8+
cargo build --release --target x86_64-apple-darwin --bin pangolin_api --bin pangolin-admin --bin pangolin-user
9+
```
10+
11+
Binaries will be in `target/x86_64-apple-darwin/release/`
12+
13+
Copy them here for distribution.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Windows (x86_64) Binaries
2+
3+
To build binaries for Windows:
4+
5+
```bash
6+
# Install Windows target
7+
rustup target add x86_64-pc-windows-gnu
8+
9+
# Install MinGW (on Ubuntu/Debian)
10+
sudo apt-get install mingw-w64
11+
12+
# Build
13+
cd pangolin/
14+
cargo build --release --target x86_64-pc-windows-gnu --bin pangolin_api --bin pangolin-admin --bin pangolin-user
15+
```
16+
17+
Binaries will be in `target/x86_64-pc-windows-gnu/release/` with `.exe` extensions.
18+
19+
Copy them here for distribution.
20+
21+
## Note
22+
Windows binaries may require additional DLL files. Consider using Docker for Windows deployments as an alternative.

0 commit comments

Comments
 (0)