Skip to content

Commit 2ba079b

Browse files
Merge pull request #6 from davidsmfreire/feat/roadmap-and-review-fixes
Roadmap execution: phases 0-8 + review-driven correctness fixes
2 parents e4e711c + e5baa04 commit 2ba079b

102 files changed

Lines changed: 8735 additions & 4205 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
indent_style = space
9+
indent_size = 4
10+
11+
[*.{yml,yaml,toml,json,md}]
12+
indent_size = 2
13+
14+
[Makefile]
15+
indent_style = tab
16+
17+
[*.md]
18+
trim_trailing_whitespace = false
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Bug report
2+
description: Something sqlshield does that it shouldn't (or vice versa).
3+
labels: [bug]
4+
body:
5+
- type: textarea
6+
id: what-happened
7+
attributes:
8+
label: What happened?
9+
description: Describe the unexpected behavior.
10+
placeholder: sqlshield reports ... but it should ...
11+
validations:
12+
required: true
13+
- type: textarea
14+
id: repro
15+
attributes:
16+
label: Minimal reproducer
17+
description: |
18+
Paste the source snippet, schema SQL, and command you ran.
19+
Keep it as small as possible.
20+
render: text
21+
validations:
22+
required: true
23+
- type: input
24+
id: version
25+
attributes:
26+
label: sqlshield version
27+
description: "Output of `sqlshield --version`."
28+
validations:
29+
required: true
30+
- type: input
31+
id: platform
32+
attributes:
33+
label: Platform
34+
description: "OS + architecture, e.g. `Linux x86_64`, `macOS arm64`."
35+
validations:
36+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Feature request
2+
description: Propose new functionality or a change in behavior.
3+
labels: [enhancement]
4+
body:
5+
- type: textarea
6+
id: problem
7+
attributes:
8+
label: Problem / motivation
9+
description: What can't you do today? Who is affected?
10+
validations:
11+
required: true
12+
- type: textarea
13+
id: proposal
14+
attributes:
15+
label: Proposed solution
16+
description: How should sqlshield behave? Sketch the CLI/API if relevant.
17+
validations:
18+
required: true
19+
- type: textarea
20+
id: alternatives
21+
attributes:
22+
label: Alternatives considered

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## Summary
2+
3+
<!-- What does this PR change and why? Link issues with `Fixes #NN` if applicable. -->
4+
5+
## How I tested it
6+
7+
<!-- Commands you ran, fixtures you added, manual steps. -->
8+
9+
## Checklist
10+
11+
- [ ] `cargo fmt --all --check` passes
12+
- [ ] `cargo clippy --all-targets --all-features -- -D warnings` passes
13+
- [ ] `cargo test --workspace --all-features` passes
14+
- [ ] Commit messages follow Conventional Commits
15+
- [ ] CHANGELOG entry added under `[Unreleased]` (skip if release-plz handles it)

.github/dependabot.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: cargo
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
open-pull-requests-limit: 5
8+
groups:
9+
tree-sitter:
10+
patterns:
11+
- "tree-sitter*"
12+
pyo3:
13+
patterns:
14+
- "pyo3*"
15+
16+
- package-ecosystem: github-actions
17+
directory: /
18+
schedule:
19+
interval: weekly
20+
21+
- package-ecosystem: pip
22+
directory: /
23+
schedule:
24+
interval: weekly

.github/workflows/audit.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: audit
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
schedule:
9+
- cron: "0 6 * * 1"
10+
11+
jobs:
12+
deny:
13+
name: cargo-deny
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: EmbarkStudios/cargo-deny-action@v2
18+
with:
19+
command: check

.github/workflows/ci.yml

Lines changed: 113 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# This file is autogenerated by maturin v1.4.0
2-
# To update, run
1+
# This file is autogenerated by maturin v1.9.0
2+
# To update, run (from sqlshield-py/)
33
#
4-
# maturin generate-ci github
4+
# maturin generate-ci github -o ../.github/workflows/ci.yml
55
#
66
name: CI
77

@@ -20,101 +20,171 @@ permissions:
2020

2121
jobs:
2222
linux:
23-
runs-on: ubuntu-latest
23+
runs-on: ${{ matrix.platform.runner }}
2424
strategy:
2525
matrix:
26-
target: [x86_64, x86, aarch64, armv7, s390x, ppc64le]
26+
platform:
27+
- runner: ubuntu-22.04
28+
target: x86_64
29+
- runner: ubuntu-22.04
30+
target: x86
31+
- runner: ubuntu-22.04
32+
target: aarch64
33+
- runner: ubuntu-22.04
34+
target: armv7
35+
- runner: ubuntu-22.04
36+
target: s390x
37+
- runner: ubuntu-22.04
38+
target: ppc64le
2739
steps:
28-
- uses: actions/checkout@v3
29-
- uses: actions/setup-python@v4
40+
- uses: actions/checkout@v4
41+
- uses: actions/setup-python@v5
3042
with:
31-
python-version: '3.10'
43+
python-version: 3.x
3244
- name: Build wheels
3345
uses: PyO3/maturin-action@v1
46+
env:
47+
CFLAGS: "-std=gnu11"
3448
with:
35-
target: ${{ matrix.target }}
36-
args: --release --out dist --find-interpreter
37-
sccache: 'true'
49+
working-directory: sqlshield-py
50+
target: ${{ matrix.platform.target }}
51+
args: --release --out ../dist --find-interpreter
52+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
3853
manylinux: auto
3954
- name: Upload wheels
40-
uses: actions/upload-artifact@v3
55+
uses: actions/upload-artifact@v4
56+
with:
57+
name: wheels-linux-${{ matrix.platform.target }}
58+
path: dist
59+
60+
musllinux:
61+
runs-on: ${{ matrix.platform.runner }}
62+
strategy:
63+
matrix:
64+
platform:
65+
- runner: ubuntu-22.04
66+
target: x86_64
67+
- runner: ubuntu-22.04
68+
target: x86
69+
- runner: ubuntu-22.04
70+
target: aarch64
71+
- runner: ubuntu-22.04
72+
target: armv7
73+
steps:
74+
- uses: actions/checkout@v4
75+
- uses: actions/setup-python@v5
76+
with:
77+
python-version: 3.x
78+
- name: Build wheels
79+
uses: PyO3/maturin-action@v1
80+
env:
81+
CFLAGS: "-std=gnu11"
82+
with:
83+
working-directory: sqlshield-py
84+
target: ${{ matrix.platform.target }}
85+
args: --release --out ../dist --find-interpreter
86+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
87+
manylinux: musllinux_1_2
88+
- name: Upload wheels
89+
uses: actions/upload-artifact@v4
4190
with:
42-
name: wheels
91+
name: wheels-musllinux-${{ matrix.platform.target }}
4392
path: dist
4493

4594
windows:
46-
runs-on: windows-latest
95+
runs-on: ${{ matrix.platform.runner }}
4796
strategy:
4897
matrix:
49-
target: [x64, x86]
98+
platform:
99+
- runner: windows-latest
100+
target: x64
101+
- runner: windows-latest
102+
target: x86
50103
steps:
51-
- uses: actions/checkout@v3
52-
- uses: actions/setup-python@v4
104+
- uses: actions/checkout@v4
105+
- uses: actions/setup-python@v5
53106
with:
54-
python-version: '3.10'
55-
architecture: ${{ matrix.target }}
107+
python-version: 3.x
108+
architecture: ${{ matrix.platform.target }}
56109
- name: Build wheels
57110
uses: PyO3/maturin-action@v1
58111
with:
59-
target: ${{ matrix.target }}
60-
args: --release --out dist --find-interpreter
61-
sccache: 'true'
112+
working-directory: sqlshield-py
113+
target: ${{ matrix.platform.target }}
114+
args: --release --out ../dist --find-interpreter
115+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
62116
- name: Upload wheels
63-
uses: actions/upload-artifact@v3
117+
uses: actions/upload-artifact@v4
64118
with:
65-
name: wheels
119+
name: wheels-windows-${{ matrix.platform.target }}
66120
path: dist
67121

68122
macos:
69-
runs-on: macos-latest
123+
runs-on: ${{ matrix.platform.runner }}
70124
strategy:
71125
matrix:
72-
target: [x86_64, aarch64]
126+
platform:
127+
- runner: macos-13
128+
target: x86_64
129+
- runner: macos-14
130+
target: aarch64
73131
steps:
74-
- uses: actions/checkout@v3
75-
- uses: actions/setup-python@v4
132+
- uses: actions/checkout@v4
133+
- uses: actions/setup-python@v5
76134
with:
77-
python-version: '3.10'
135+
python-version: 3.x
78136
- name: Build wheels
79137
uses: PyO3/maturin-action@v1
80138
with:
81-
target: ${{ matrix.target }}
82-
args: --release --out dist --find-interpreter
83-
sccache: 'true'
139+
working-directory: sqlshield-py
140+
target: ${{ matrix.platform.target }}
141+
args: --release --out ../dist --find-interpreter
142+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
84143
- name: Upload wheels
85-
uses: actions/upload-artifact@v3
144+
uses: actions/upload-artifact@v4
86145
with:
87-
name: wheels
146+
name: wheels-macos-${{ matrix.platform.target }}
88147
path: dist
89148

90149
sdist:
91150
runs-on: ubuntu-latest
92151
steps:
93-
- uses: actions/checkout@v3
152+
- uses: actions/checkout@v4
94153
- name: Build sdist
95154
uses: PyO3/maturin-action@v1
96155
with:
156+
working-directory: sqlshield-py
97157
command: sdist
98-
args: --out dist
158+
args: --out ../dist
99159
- name: Upload sdist
100-
uses: actions/upload-artifact@v3
160+
uses: actions/upload-artifact@v4
101161
with:
102-
name: wheels
162+
name: wheels-sdist
103163
path: dist
104164

105165
release:
106166
name: Release
107167
runs-on: ubuntu-latest
108-
if: "startsWith(github.ref, 'refs/tags/')"
109-
needs: [linux, windows, macos, sdist]
168+
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
169+
needs: [linux, musllinux, windows, macos, sdist]
170+
permissions:
171+
# Use to sign the release artifacts
172+
id-token: write
173+
# Used to upload release artifacts
174+
contents: write
175+
# Used to generate artifact attestation
176+
attestations: write
110177
steps:
111-
- uses: actions/download-artifact@v3
178+
- uses: actions/download-artifact@v4
179+
- name: Generate artifact attestation
180+
uses: actions/attest-build-provenance@v2
112181
with:
113-
name: wheels
182+
subject-path: 'wheels-*/*'
114183
- name: Publish to PyPI
184+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
115185
uses: PyO3/maturin-action@v1
116186
env:
117187
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
118188
with:
119189
command: upload
120-
args: --non-interactive --skip-existing *
190+
args: --non-interactive --skip-existing wheels-*/*

.github/workflows/release-plz.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: release-plz
2+
3+
permissions:
4+
pull-requests: write
5+
contents: write
6+
7+
on:
8+
push:
9+
branches:
10+
- main
11+
12+
jobs:
13+
release-plz:
14+
name: release-plz
15+
runs-on: ubuntu-latest
16+
if: ${{ github.repository_owner == 'davidsmfreire' }}
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
- uses: dtolnay/rust-toolchain@stable
22+
- name: release-plz
23+
uses: MarcoIeni/release-plz-action@v0.5
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

0 commit comments

Comments
 (0)