Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
41 changes: 10 additions & 31 deletions .github/workflows/build.yml → .github/workflows/ci-rust.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
name: CI
name: Rust CI

on:
push:
branches: [main]
branches-ignore: [main]
paths:
- 'src/**'
- 'build.rs'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/build.yml'
- '.github/workflows/ci-rust.yml'
pull_request:
branches: [main]
paths:
- 'src/**'
- 'build.rs'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/build.yml'
- '.github/workflows/ci-rust.yml'

env:
CARGO_TERM_COLOR: always
Expand All @@ -25,7 +27,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
Expand All @@ -35,12 +37,12 @@ jobs:
- name: Check formatting
run: cargo fmt --all -- --check

lint:
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
Expand All @@ -58,7 +60,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
Expand All @@ -68,26 +70,3 @@ jobs:

- name: Run tests
run: cargo test

build:
name: Build
runs-on: ubuntu-latest
needs: [fmt, lint, test]
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Cache dependencies
uses: Swatinem/rust-cache@v2

- name: Build release binary
run: cargo build --release

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: stackql-deploy-linux-x86_64
path: target/release/stackql-deploy
37 changes: 37 additions & 0 deletions .github/workflows/ci-website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Website CI

on:
push:
branches-ignore: [main]
paths:
- 'website/**'
- '.github/workflows/ci-website.yml'
pull_request:
branches: [main]
paths:
- 'website/**'
- '.github/workflows/ci-website.yml'

jobs:
build:
name: Yarn Build
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'yarn'
cache-dependency-path: website/yarn.lock

- name: Install dependencies
working-directory: website
run: yarn install --frozen-lockfile

- name: Build website
working-directory: website
run: yarn build
2 changes: 1 addition & 1 deletion .github/workflows/deploy-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
echo "This is a placeholder step - actual implementation pending"

# - name: Checkout repository
# uses: actions/checkout@v4
# uses: actions/checkout@v6
# with:
# fetch-depth: 0

Expand Down
49 changes: 0 additions & 49 deletions .github/workflows/deploy-website.yml

This file was deleted.

137 changes: 137 additions & 0 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
name: Release Build

on:
push:
branches: [main]
paths:
- 'src/**'
- 'build.rs'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/release-build.yml'

env:
CARGO_TERM_COLOR: always

jobs:
# Fetch contributor list via StackQL and upload as a workflow artifact so all
# matrix build jobs can embed it into the binary at compile time.
prepare:
name: Prepare
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Fetch contributors
id: get-contributors
uses: stackql/stackql-exec@v2.2.3
with:
query_file_path: ci-scripts/get-contributors.iql
query_output: csv

- name: Save contributors CSV
run: echo "${{ steps.get-contributors.outputs.stackql-query-results }}" > contributors.csv

- name: Upload contributors artifact
uses: actions/upload-artifact@v4
with:
name: contributors-csv
path: contributors.csv

build:
name: Build (${{ matrix.target }})
needs: prepare
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
artifact-name: stackql-deploy-linux-x86_64
archive: tar.gz
use-cross: false

- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
artifact-name: stackql-deploy-linux-arm64
archive: tar.gz
use-cross: true

- target: x86_64-pc-windows-msvc
os: windows-latest
artifact-name: stackql-deploy-windows-x86_64
archive: zip
use-cross: false

- target: aarch64-apple-darwin
os: macos-latest
artifact-name: stackql-deploy-macos-arm64
archive: tar.gz
use-cross: false

- target: x86_64-apple-darwin
os: macos-13
artifact-name: stackql-deploy-macos-x86_64
archive: tar.gz
use-cross: false

runs-on: ${{ matrix.os }}

steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Download contributors CSV
uses: actions/download-artifact@v4
with:
name: contributors-csv

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}

- name: Cache dependencies
uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.target }}

- name: Install cross
if: matrix.use-cross == true
run: cargo install cross --git https://github.com/cross-rs/cross

- name: Build (cross)
if: matrix.use-cross == true
run: cross build --release --target ${{ matrix.target }}

- name: Build (native)
if: matrix.use-cross == false
run: cargo build --release --target ${{ matrix.target }}

# Strip Linux and macOS binaries to reduce size.
# Cross-compiled ARM64 Linux is stripped by cross automatically.
- name: Strip binary (native Linux / macOS)
if: matrix.os != 'windows-latest' && matrix.use-cross == false
run: strip target/${{ matrix.target }}/release/stackql-deploy

- name: Package (tar.gz)
if: matrix.archive == 'tar.gz'
run: |
tar -czf ${{ matrix.artifact-name }}.tar.gz \
-C target/${{ matrix.target }}/release stackql-deploy

- name: Package (zip) — Windows
if: matrix.archive == 'zip'
shell: pwsh
run: |
Compress-Archive `
-Path target/${{ matrix.target }}/release/stackql-deploy.exe `
-DestinationPath ${{ matrix.artifact-name }}.zip

- name: Upload binary artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact-name }}
path: ${{ matrix.artifact-name }}.*
if-no-files-found: error
2 changes: 1 addition & 1 deletion .github/workflows/test-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
echo "🚀 Testing Demos (placeholder)"
echo "This is a placeholder step - actual implementation pending"
# - name: Checkout repository
# uses: actions/checkout@v4
# uses: actions/checkout@v6

# - name: Install Rust toolchain
# uses: dtolnay/rust-toolchain@stable
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ stackql_history.txt
stackql.log
.env
nohup.out
contributors.csv
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Changelog

## 2.0.0 (2026-03-14)

### Initial Rust Release

This is the first release of **stackql-deploy** as a native Rust binary, replacing the Python implementation.

**Key changes from v1.x (Python):**
- Complete rewrite in Rust — single static binary, no Python runtime required
- Same CLI interface: `build`, `test`, `teardown`, `init`, `info`, `shell`, `upgrade`, `plan`
- Multi-platform binaries: Linux x86_64/ARM64, macOS Apple Silicon/Intel, Windows x86_64
- Available on [crates.io](https://crates.io/crates/stackql-deploy) via `cargo install stackql-deploy`

**The Python package (v1.x) is now archived.** See the [Python package changelog](https://github.com/stackql/stackql-deploy/blob/main/CHANGELOG.md) for the v1.x release history (last Python release: v1.9.4).
11 changes: 10 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
[package]
name = "stackql-deploy"
version = "0.1.0"
version = "2.0.0"
edition = "2021"
rust-version = "1.75"
description = "Infrastructure-as-code framework for declarative cloud resource management using StackQL"
authors = ["StackQL Studios <info@stackql.io>"]
license = "MIT"
homepage = "https://stackql.io"
repository = "https://github.com/stackql/stackql-deploy"
keywords = ["stackql", "infrastructure", "iac", "cloud", "devops"]
categories = ["command-line-utilities", "development-tools"]
readme = "README.md"

[dependencies]
clap = { version = "4.3", features = ["derive"] }
Expand Down
Loading
Loading