Skip to content

Commit a598181

Browse files
committed
feat: initial release of safe-migrate engine v0.1.0
0 parents  commit a598181

8 files changed

Lines changed: 2194 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
test:
14+
name: Build and Test
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
21+
- name: Install Rust toolchain
22+
uses: dtolnay/rust-toolchain@stable
23+
with:
24+
components: clippy, rustfmt
25+
26+
- name: Cache dependencies
27+
uses: Swatinem/rust-cache@v2
28+
29+
- name: Check formatting
30+
run: cargo fmt -- --check
31+
32+
- name: Run tests
33+
run: cargo test --verbose
34+
35+
- name: Run Clippy (Linter)
36+
run: cargo clippy -- -D warnings

.github/workflows/release.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v[0-9]+.[0-9]+.[0-9]+'
7+
8+
jobs:
9+
create-release:
10+
name: Create GitHub Release
11+
runs-on: ubuntu-latest
12+
outputs:
13+
upload_url: ${{ steps.create_release.outputs.upload_url }}
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Create Release
19+
id: create_release
20+
uses: softprops/action-gh-release@v2
21+
with:
22+
generate_release_notes: true
23+
24+
build-release:
25+
name: Build and Upload Binaries
26+
needs: create-release
27+
strategy:
28+
matrix:
29+
include:
30+
# Standard Linux (Ubuntu/Debian)
31+
- target: x86_64-unknown-linux-gnu
32+
os: ubuntu-latest
33+
# ARM64 Linux (AWS Graviton, ARM CI runners)
34+
- target: aarch64-unknown-linux-gnu
35+
os: ubuntu-latest
36+
# Statically linked Linux (Alpine containers - CRITICAL for CI)
37+
- target: x86_64-unknown-linux-musl
38+
os: ubuntu-latest
39+
- target: aarch64-unknown-linux-musl
40+
os: ubuntu-latest
41+
# macOS Intel
42+
- target: x86_64-apple-darwin
43+
os: macos-latest
44+
# macOS Apple Silicon (M1/M2/M3)
45+
- target: aarch64-apple-darwin
46+
os: macos-latest
47+
# Windows x86_64
48+
- target: x86_64-pc-windows-msvc
49+
os: windows-latest
50+
# Windows ARM64
51+
- target: aarch64-pc-windows-msvc
52+
os: windows-latest
53+
runs-on: ${{ matrix.os }}
54+
55+
steps:
56+
- name: Checkout repository
57+
uses: actions/checkout@v4
58+
59+
- name: Install Rust toolchain
60+
uses: dtolnay/rust-toolchain@stable
61+
with:
62+
targets: ${{ matrix.target }}
63+
64+
- name: Build and Upload Binary
65+
uses: taiki-e/upload-rust-binary-action@v1
66+
with:
67+
bin: safe-migrate
68+
target: ${{ matrix.target }}
69+
token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/target
2+
Cargo.lock
3+
.safe-migrate-stats.json
4+
.aider*
5+
.env
6+
.vscode/
7+
.idea/
8+
*.swp
9+
*.swo
10+
.DS_Store
11+
*.sql
12+
*.db
13+
*.sqlite
14+
*.sqlite3

0 commit comments

Comments
 (0)