Skip to content

Commit 7b3d5cd

Browse files
committed
fix: make build for the time being
1 parent bdea9e9 commit 7b3d5cd

File tree

4 files changed

+45
-29
lines changed

4 files changed

+45
-29
lines changed

.github/workflows/python-ci.yaml

Lines changed: 40 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
1-
# This file is autogenerated by maturin v1.7.1
1+
# This file is autogenerated by maturin v1.7.4
22
# To update, run
33
#
4-
# maturin generate-ci github
4+
# maturin generate-ci github --manifest-path crates/cli/Cargo.toml --output .github/workflows/python-ci.yaml
55
#
66
name: CI
77

88
on:
99
push:
10+
branches:
11+
- main
12+
- master
1013
tags:
11-
- "v*.*.*"
14+
- '*'
15+
pull_request:
1216
workflow_dispatch:
1317

1418
permissions:
@@ -28,21 +32,24 @@ jobs:
2832
target: aarch64
2933
- runner: ubuntu-latest
3034
target: armv7
35+
# - runner: ubuntu-latest
36+
# target: s390x
37+
- runner: ubuntu-latest
38+
target: ppc64le
3139
steps:
3240
- uses: actions/checkout@v4
3341
- name: Build wheels
3442
uses: PyO3/maturin-action@v1
3543
with:
36-
working-directory: crates/cli
3744
target: ${{ matrix.platform.target }}
38-
args: --release --out dist
39-
sccache: "true"
45+
args: --release --out dist --manifest-path crates/cli/Cargo.toml
46+
sccache: 'true'
4047
manylinux: auto
4148
- name: Upload wheels
4249
uses: actions/upload-artifact@v4
4350
with:
4451
name: wheels-linux-${{ matrix.platform.target }}
45-
path: crates/cli/dist
52+
path: dist
4653

4754
musllinux:
4855
runs-on: ${{ matrix.platform.runner }}
@@ -62,16 +69,15 @@ jobs:
6269
- name: Build wheels
6370
uses: PyO3/maturin-action@v1
6471
with:
65-
working-directory: crates/cli
6672
target: ${{ matrix.platform.target }}
67-
args: --release --out dist
68-
sccache: "true"
73+
args: --release --out dist --manifest-path crates/cli/Cargo.toml
74+
sccache: 'true'
6975
manylinux: musllinux_1_2
7076
- name: Upload wheels
7177
uses: actions/upload-artifact@v4
7278
with:
7379
name: wheels-musllinux-${{ matrix.platform.target }}
74-
path: crates/cli/dist
80+
path: dist
7581

7682
windows:
7783
runs-on: ${{ matrix.platform.runner }}
@@ -87,15 +93,15 @@ jobs:
8793
- name: Build wheels
8894
uses: PyO3/maturin-action@v1
8995
with:
90-
working-directory: crates/cli
9196
target: ${{ matrix.platform.target }}
92-
args: --release --out dist
93-
sccache: "true"
97+
args: --release --out dist --manifest-path crates/cli/Cargo.toml
98+
sccache: 'true'
9499
- name: Upload wheels
95100
uses: actions/upload-artifact@v4
96101
with:
97102
name: wheels-windows-${{ matrix.platform.target }}
98-
path: crates/cli/dist
103+
path: dist
104+
99105
macos:
100106
runs-on: ${{ matrix.platform.runner }}
101107
strategy:
@@ -110,44 +116,50 @@ jobs:
110116
- name: Build wheels
111117
uses: PyO3/maturin-action@v1
112118
with:
113-
working-directory: crates/cli
114119
target: ${{ matrix.platform.target }}
115-
args: --release --out dist
116-
sccache: "true"
120+
args: --release --out dist --manifest-path crates/cli/Cargo.toml
121+
sccache: 'true'
117122
- name: Upload wheels
118123
uses: actions/upload-artifact@v4
119124
with:
120125
name: wheels-macos-${{ matrix.platform.target }}
121-
path: crates/cli/dist
126+
path: dist
122127

123-
## For some reason the sdist command fails with an error when running the github action.
124-
## Not sure if thisnis actually needed for sqruff???
125128
sdist:
126129
runs-on: ubuntu-latest
127130
steps:
128131
- uses: actions/checkout@v4
129132
- name: Build sdist
130-
uses: PyO3/maturin-action@v1.44.0
133+
uses: PyO3/maturin-action@v1
131134
with:
132-
working-directory: crates/cli
133-
target: x86_64
134135
command: sdist
135-
args: --out dist
136+
args: --out dist --manifest-path crates/cli/Cargo.toml
136137
- name: Upload sdist
137138
uses: actions/upload-artifact@v4
138139
with:
139140
name: wheels-sdist
140-
path: crates/cli/dist
141+
path: dist
141142

142143
release:
143144
name: Release
144145
runs-on: ubuntu-latest
145-
environment: production
146-
#if: "startsWith(github.ref, 'refs/tags/')"
146+
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
147147
needs: [linux, musllinux, windows, macos, sdist]
148+
permissions:
149+
# Use to sign the release artifacts
150+
id-token: write
151+
# Used to upload release artifacts
152+
contents: write
153+
# Used to generate artifact attestation
154+
attestations: write
148155
steps:
149156
- uses: actions/download-artifact@v4
157+
- name: Generate artifact attestation
158+
uses: actions/attest-build-provenance@v1
159+
with:
160+
subject-path: 'wheels-*/*'
150161
- name: Publish to PyPI
162+
if: "startsWith(github.ref, 'refs/tags/')"
151163
uses: PyO3/maturin-action@v1
152164
env:
153165
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
playground/src/pkg
2+
.github/workflows/python-ci.yaml

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,9 @@ python_test: ## Run python tests
1818
python_install: ## Install python dev dependencies
1919
pip install -e ".[dev]"
2020

21+
.PHONY: python_generate_gha
22+
python_generate_gha: ## Generate GitHub Actions workflow
23+
maturin generate-ci github --manifest-path "crates/cli/Cargo.toml" --output .github/workflows/python-ci.yaml
24+
2125
.PHONY: ci
2226
ci: python_fmt python_lint python_test ## Run all CI checks

crates/cli/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@ requires-python = ">=3.9"
1010
[tool.maturin]
1111
bindings = "bin"
1212
strip = true
13-
features = ["python"]

0 commit comments

Comments
 (0)