quint-connect-py 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- quint_connect_py-0.1.0/.github/scripts/build-manylinux-wheel.sh +11 -0
- quint_connect_py-0.1.0/.github/scripts/build-sdist.sh +15 -0
- quint_connect_py-0.1.0/.github/scripts/check-release-version.sh +13 -0
- quint_connect_py-0.1.0/.github/scripts/install-quint.sh +17 -0
- quint_connect_py-0.1.0/.github/scripts/stage-release-attestation.sh +10 -0
- quint_connect_py-0.1.0/.github/workflows/ci.yml +144 -0
- quint_connect_py-0.1.0/.github/workflows/release.yml +300 -0
- quint_connect_py-0.1.0/.gitignore +14 -0
- quint_connect_py-0.1.0/Cargo.lock +1494 -0
- quint_connect_py-0.1.0/Cargo.toml +48 -0
- quint_connect_py-0.1.0/LICENSE +201 -0
- quint_connect_py-0.1.0/PKG-INFO +36 -0
- quint_connect_py-0.1.0/README.md +20 -0
- quint_connect_py-0.1.0/clippy.toml +2 -0
- quint_connect_py-0.1.0/docs/development/index.md +48 -0
- quint_connect_py-0.1.0/docs/development/work/initial-design/design.md +140 -0
- quint_connect_py-0.1.0/docs/development/work/initial-design/plan.md +96 -0
- quint_connect_py-0.1.0/docs/development/work/initial-design/spec-review.md +108 -0
- quint_connect_py-0.1.0/docs/index.md +4 -0
- quint_connect_py-0.1.0/docs/user/guides/usage.md +74 -0
- quint_connect_py-0.1.0/docs/user/index.md +3 -0
- quint_connect_py-0.1.0/examples/counter.qnt +10 -0
- quint_connect_py-0.1.0/pyproject.toml +94 -0
- quint_connect_py-0.1.0/python/quint_connect/__init__.py +181 -0
- quint_connect_py-0.1.0/python/quint_connect/_native.pyi +81 -0
- quint_connect_py-0.1.0/python/quint_connect/py.typed +0 -0
- quint_connect_py-0.1.0/spec/fixtures/README.md +103 -0
- quint_connect_py-0.1.0/spec/fixtures/runner-conformance.json +7058 -0
- quint_connect_py-0.1.0/spec/package-lock.json +882 -0
- quint_connect_py-0.1.0/spec/package.json +10 -0
- quint_connect_py-0.1.0/spec/quint_argument_snapshot_test.qnt +93 -0
- quint_connect_py-0.1.0/spec/quint_artifact_directory_test.qnt +134 -0
- quint_connect_py-0.1.0/spec/quint_cli.qnt +292 -0
- quint_connect_py-0.1.0/spec/quint_cli_test.qnt +432 -0
- quint_connect_py-0.1.0/spec/quint_conformance.qnt +461 -0
- quint_connect_py-0.1.0/spec/quint_connect.qnt +2480 -0
- quint_connect_py-0.1.0/spec/quint_connect_test.qnt +439 -0
- quint_connect_py-0.1.0/spec/quint_executor_test.qnt +85 -0
- quint_connect_py-0.1.0/spec/quint_filesystem.qnt +672 -0
- quint_connect_py-0.1.0/spec/quint_filesystem_test.qnt +332 -0
- quint_connect_py-0.1.0/spec/quint_itf.qnt +431 -0
- quint_connect_py-0.1.0/spec/quint_itf_test.qnt +434 -0
- quint_connect_py-0.1.0/spec/quint_json.qnt +342 -0
- quint_connect_py-0.1.0/spec/quint_json_test.qnt +148 -0
- quint_connect_py-0.1.0/spec/quint_parallel.qnt +53 -0
- quint_connect_py-0.1.0/spec/quint_parallel_test.qnt +60 -0
- quint_connect_py-0.1.0/spec/quint_path_search.qnt +46 -0
- quint_connect_py-0.1.0/spec/quint_path_search_test.qnt +75 -0
- quint_connect_py-0.1.0/spec/quint_path_search_verify.qnt +54 -0
- quint_connect_py-0.1.0/spec/quint_process_io_test.qnt +132 -0
- quint_connect_py-0.1.0/spec/quint_process_test.qnt +66 -0
- quint_connect_py-0.1.0/spec/quint_progress_test.qnt +61 -0
- quint_connect_py-0.1.0/spec/quint_runner_io_test.qnt +206 -0
- quint_connect_py-0.1.0/spec/quint_saved_replay_test.qnt +177 -0
- quint_connect_py-0.1.0/spec/quint_values.qnt +179 -0
- quint_connect_py-0.1.0/spec/quint_values_test.qnt +289 -0
- quint_connect_py-0.1.0/src/cli.rs +360 -0
- quint_connect_py-0.1.0/src/conformance/generated.rs +842 -0
- quint_connect_py-0.1.0/src/conformance.rs +402 -0
- quint_connect_py-0.1.0/src/itf/json.rs +236 -0
- quint_connect_py-0.1.0/src/itf.rs +302 -0
- quint_connect_py-0.1.0/src/lib.rs +16 -0
- quint_connect_py-0.1.0/src/python/error.rs +291 -0
- quint_connect_py-0.1.0/src/python/mod.rs +134 -0
- quint_connect_py-0.1.0/src/python/value.rs +251 -0
- quint_connect_py-0.1.0/src/replay.rs +245 -0
- quint_connect_py-0.1.0/src/runner/process.rs +116 -0
- quint_connect_py-0.1.0/src/runner.rs +401 -0
- quint_connect_py-0.1.0/src/value.rs +133 -0
- quint_connect_py-0.1.0/tests/fixtures/README.md +3 -0
- quint_connect_py-0.1.0/tests/fixtures/tictactoe.qnt +187 -0
- quint_connect_py-0.1.0/tests/test_quint_integration.py +222 -0
- quint_connect_py-0.1.0/tests/test_replay.py +161 -0
- quint_connect_py-0.1.0/tests/test_xdist.py +48 -0
- quint_connect_py-0.1.0/tests/upstream_reference.rs +51 -0
- quint_connect_py-0.1.0/tools/check_wheel.py +108 -0
- quint_connect_py-0.1.0/tools/export_quint_fixtures.py +383 -0
- quint_connect_py-0.1.0/tools/verify_release.py +207 -0
- quint_connect_py-0.1.0/uv.lock +1057 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
docker run --rm --volume "$PWD:/io" --workdir /io \
|
|
5
|
+
--env RUSTUP_TOOLCHAIN --env CARGO_TARGET_DIR=/tmp/wheel-target \
|
|
6
|
+
--entrypoint /bin/bash "$MATURIN_IMAGE" -euc '
|
|
7
|
+
rustup toolchain install "$RUSTUP_TOOLCHAIN" --profile minimal
|
|
8
|
+
maturin build --release --locked --compatibility manylinux2014 \
|
|
9
|
+
--target x86_64-unknown-linux-gnu --out dist
|
|
10
|
+
'
|
|
11
|
+
sudo chown -R "$(id -u):$(id -g)" dist
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
rustup toolchain install "$RUSTUP_TOOLCHAIN" --profile minimal
|
|
5
|
+
uvx --from "maturin==$MATURIN_VERSION" maturin sdist --out dist
|
|
6
|
+
git diff --exit-code -- Cargo.lock
|
|
7
|
+
tar -xzf dist/*.tar.gz -C "$RUNNER_TEMP"
|
|
8
|
+
source_tree=("$RUNNER_TEMP"/quint_connect_py-*/)
|
|
9
|
+
test "${#source_tree[@]}" = 1
|
|
10
|
+
uvx --from "maturin==$MATURIN_VERSION" maturin build --release --locked \
|
|
11
|
+
--manifest-path "${source_tree[0]}Cargo.toml" --compatibility linux \
|
|
12
|
+
--interpreter python --out "$RUNNER_TEMP/sdist-wheel"
|
|
13
|
+
wheels=("$RUNNER_TEMP"/sdist-wheel/*.whl)
|
|
14
|
+
test "${#wheels[@]}" = 1
|
|
15
|
+
python tools/check_wheel.py "${wheels[0]}"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
version=$(python3 -c 'import tomllib; from pathlib import Path; p, c = (tomllib.loads(Path(f).read_text()) for f in ("pyproject.toml", "Cargo.toml")); assert p["project"]["version"] == c["package"]["version"]; print(p["project"]["version"])')
|
|
5
|
+
[[ "$version" =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$ ]]
|
|
6
|
+
echo "version=$version" >> "$GITHUB_OUTPUT"
|
|
7
|
+
if [[ -n "$PUBLISH_VERSION" ]]; then
|
|
8
|
+
test "$PUBLISH_VERSION" = "$version"
|
|
9
|
+
test "$GITHUB_REPOSITORY" = HayaoSuzuki/quint-connect-py
|
|
10
|
+
test "$GITHUB_REF" = refs/heads/main
|
|
11
|
+
test "$(gh run list --workflow ci.yml --branch main --commit "$GITHUB_SHA" --event push --status success --limit 1 --json databaseId --jq length)" = 1
|
|
12
|
+
echo "publish=true" >> "$GITHUB_OUTPUT"
|
|
13
|
+
fi
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
npm ci --prefix spec --ignore-scripts --no-audit --no-fund
|
|
5
|
+
quint_home="$RUNNER_TEMP/quint"
|
|
6
|
+
# Quint 0.34.0 uses evaluator v0.8.0 and downloads it on first use.
|
|
7
|
+
evaluator_dir="$quint_home/rust-evaluator-v0.8.0"
|
|
8
|
+
asset="quint_evaluator-x86_64-unknown-linux-gnu.tar.gz"
|
|
9
|
+
archive="$RUNNER_TEMP/$asset"
|
|
10
|
+
curl --fail --silent --show-error --location --retry 3 --output "$archive" \
|
|
11
|
+
"https://github.com/quint-co/quint/releases/download/evaluator/v0.8.0/$asset"
|
|
12
|
+
echo "774020b648a887f511d040fd564a8223c62a996b80f8dc50ea24d8630235be51 $archive" | sha256sum -c -
|
|
13
|
+
mkdir -p "$evaluator_dir"
|
|
14
|
+
tar -xzf "$archive" -C "$evaluator_dir" quint_evaluator
|
|
15
|
+
test -x "$evaluator_dir/quint_evaluator"
|
|
16
|
+
echo "QUINT_HOME=$quint_home" >> "$GITHUB_ENV"
|
|
17
|
+
echo "$GITHUB_WORKSPACE/spec/node_modules/.bin" >> "$GITHUB_PATH"
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
files=(dist/*)
|
|
5
|
+
test "${#files[@]}" = 1
|
|
6
|
+
file="${files[0]}"
|
|
7
|
+
gh attestation verify "$file" --bundle "$BUNDLE" --repo "$GITHUB_REPOSITORY" \
|
|
8
|
+
--signer-workflow "$GITHUB_REPOSITORY/.github/workflows/release.yml" \
|
|
9
|
+
--source-digest "$GITHUB_SHA" --signer-digest "$GITHUB_SHA" --deny-self-hosted-runners
|
|
10
|
+
uv run --locked --no-sync pypi-attestations convert "$BUNDLE" --output-file "$file.slsa.attestation"
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
merge_group:
|
|
6
|
+
types: [checks_requested]
|
|
7
|
+
push:
|
|
8
|
+
branches: [main]
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
|
|
14
|
+
concurrency:
|
|
15
|
+
group: ci-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_id }}
|
|
16
|
+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
17
|
+
|
|
18
|
+
env:
|
|
19
|
+
RUSTUP_TOOLCHAIN: '1.100.0'
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
workflow-lint:
|
|
23
|
+
name: Workflow lint
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
timeout-minutes: 5
|
|
26
|
+
steps:
|
|
27
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
28
|
+
with:
|
|
29
|
+
persist-credentials: false
|
|
30
|
+
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
|
|
31
|
+
with:
|
|
32
|
+
version: '0.13.10'
|
|
33
|
+
enable-cache: false
|
|
34
|
+
- name: Check workflow syntax and shell scripts
|
|
35
|
+
run: |
|
|
36
|
+
uvx --python 3.14 --from actionlint-py==1.7.12.25 --with shellcheck-py==0.11.0.1 actionlint
|
|
37
|
+
uvx --python 3.14 --from shellcheck-py==0.11.0.1 shellcheck .github/scripts/*.sh
|
|
38
|
+
- name: Audit workflows
|
|
39
|
+
run: uvx --python 3.14 --from zizmor==1.32.0 zizmor --offline --persona auditor .github/workflows
|
|
40
|
+
|
|
41
|
+
lint:
|
|
42
|
+
name: Python and Rust lint
|
|
43
|
+
runs-on: ubuntu-latest
|
|
44
|
+
timeout-minutes: 15
|
|
45
|
+
env:
|
|
46
|
+
UV_PYTHON: '3.14'
|
|
47
|
+
steps:
|
|
48
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
49
|
+
with:
|
|
50
|
+
persist-credentials: false
|
|
51
|
+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
52
|
+
id: python
|
|
53
|
+
with:
|
|
54
|
+
python-version: '3.14'
|
|
55
|
+
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
|
|
56
|
+
with:
|
|
57
|
+
version: '0.13.10'
|
|
58
|
+
enable-cache: false
|
|
59
|
+
- name: Install lint and test dependencies
|
|
60
|
+
run: uv sync --locked --group lint --group test --group release --no-install-project
|
|
61
|
+
- run: uv run --locked --no-sync ruff format --check
|
|
62
|
+
- run: uv run --locked --no-sync ruff check --no-fix
|
|
63
|
+
- run: uv run --locked --no-sync ty check
|
|
64
|
+
- name: Install Rust lint components
|
|
65
|
+
run: rustup toolchain install "$RUSTUP_TOOLCHAIN" --profile minimal --component clippy --component rustfmt
|
|
66
|
+
- run: cargo fmt --all -- --check
|
|
67
|
+
- run: cargo clippy --locked --no-default-features --all-targets -- -D warnings
|
|
68
|
+
- run: cargo clippy --locked --all-features --all-targets -- -D warnings
|
|
69
|
+
env:
|
|
70
|
+
PYO3_PYTHON: ${{ steps.python.outputs.python-path }}
|
|
71
|
+
|
|
72
|
+
rust-test:
|
|
73
|
+
name: Rust and Quint tests
|
|
74
|
+
runs-on: ubuntu-latest
|
|
75
|
+
timeout-minutes: 20
|
|
76
|
+
steps:
|
|
77
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
78
|
+
with:
|
|
79
|
+
persist-credentials: false
|
|
80
|
+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
81
|
+
id: python
|
|
82
|
+
with:
|
|
83
|
+
python-version: '3.14'
|
|
84
|
+
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
|
85
|
+
with:
|
|
86
|
+
node-version: '22'
|
|
87
|
+
package-manager-cache: false
|
|
88
|
+
- name: Install Quint and its Rust evaluator
|
|
89
|
+
run: bash .github/scripts/install-quint.sh
|
|
90
|
+
- name: Install Rust toolchain
|
|
91
|
+
run: rustup toolchain install "$RUSTUP_TOOLCHAIN" --profile minimal
|
|
92
|
+
- run: cargo test --locked --no-default-features
|
|
93
|
+
- run: cargo test --locked --all-features
|
|
94
|
+
env:
|
|
95
|
+
PYO3_PYTHON: ${{ steps.python.outputs.python-path }}
|
|
96
|
+
- name: Run upstream quint-connect reference tests
|
|
97
|
+
run: cargo test --locked --test upstream_reference -- --ignored
|
|
98
|
+
- name: Check Quint conformance fixtures with both evaluators
|
|
99
|
+
run: python tools/export_quint_fixtures.py --check
|
|
100
|
+
- name: Run Quint model tests with both evaluators
|
|
101
|
+
shell: bash
|
|
102
|
+
run: |
|
|
103
|
+
for backend in rust typescript; do
|
|
104
|
+
for test_file in spec/*_test.qnt; do
|
|
105
|
+
quint test "$test_file" --backend="$backend" --match='Test$' --seed=42
|
|
106
|
+
done
|
|
107
|
+
done
|
|
108
|
+
|
|
109
|
+
python-test:
|
|
110
|
+
name: Python tests (${{ matrix.python }})
|
|
111
|
+
runs-on: ubuntu-latest
|
|
112
|
+
timeout-minutes: 15
|
|
113
|
+
strategy:
|
|
114
|
+
fail-fast: false
|
|
115
|
+
matrix:
|
|
116
|
+
python: ['3.14', '3.15']
|
|
117
|
+
env:
|
|
118
|
+
UV_PYTHON: ${{ matrix.python }}
|
|
119
|
+
steps:
|
|
120
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
121
|
+
with:
|
|
122
|
+
persist-credentials: false
|
|
123
|
+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
124
|
+
with:
|
|
125
|
+
python-version: ${{ matrix.python }}
|
|
126
|
+
allow-prereleases: ${{ matrix.python == '3.15' }}
|
|
127
|
+
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
|
|
128
|
+
with:
|
|
129
|
+
version: '0.13.10'
|
|
130
|
+
enable-cache: false
|
|
131
|
+
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
|
132
|
+
with:
|
|
133
|
+
node-version: '22'
|
|
134
|
+
package-manager-cache: false
|
|
135
|
+
- name: Install Quint and its Rust evaluator
|
|
136
|
+
run: bash .github/scripts/install-quint.sh
|
|
137
|
+
- name: Install Rust toolchain
|
|
138
|
+
run: rustup toolchain install "$RUSTUP_TOOLCHAIN" --profile minimal
|
|
139
|
+
- name: Build the extension and install test dependencies
|
|
140
|
+
run: uv sync --locked --group test
|
|
141
|
+
- name: Run pytest with Quint on PATH
|
|
142
|
+
run: |
|
|
143
|
+
quint --version
|
|
144
|
+
uv run --locked --no-sync pytest -q
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
name: Release distributions
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
paths:
|
|
6
|
+
- '.github/workflows/release.yml'
|
|
7
|
+
- '.github/scripts/**'
|
|
8
|
+
- 'Cargo.*'
|
|
9
|
+
- 'pyproject.toml'
|
|
10
|
+
- 'uv.lock'
|
|
11
|
+
- 'LICENSE'
|
|
12
|
+
- 'README.md'
|
|
13
|
+
- 'python/**'
|
|
14
|
+
- 'src/**'
|
|
15
|
+
- 'tools/check_wheel.py'
|
|
16
|
+
- 'tools/verify_release.py'
|
|
17
|
+
workflow_dispatch:
|
|
18
|
+
inputs:
|
|
19
|
+
publish_version:
|
|
20
|
+
description: 'Version to publish to TestPyPI and PyPI. Leave empty for a build preview.'
|
|
21
|
+
type: string
|
|
22
|
+
default: ''
|
|
23
|
+
|
|
24
|
+
permissions:
|
|
25
|
+
contents: read
|
|
26
|
+
|
|
27
|
+
concurrency:
|
|
28
|
+
group: release-${{ github.event_name }}-${{ github.ref }}
|
|
29
|
+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
30
|
+
|
|
31
|
+
env:
|
|
32
|
+
RUSTUP_TOOLCHAIN: '1.100.0'
|
|
33
|
+
MATURIN_VERSION: '1.15.0'
|
|
34
|
+
|
|
35
|
+
jobs:
|
|
36
|
+
version:
|
|
37
|
+
name: Check release version
|
|
38
|
+
runs-on: ubuntu-latest
|
|
39
|
+
timeout-minutes: 5
|
|
40
|
+
outputs:
|
|
41
|
+
version: ${{ steps.version.outputs.version }}
|
|
42
|
+
publish: ${{ steps.version.outputs.publish }}
|
|
43
|
+
steps:
|
|
44
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
45
|
+
with:
|
|
46
|
+
persist-credentials: false
|
|
47
|
+
- name: Validate manifests and publishing ref
|
|
48
|
+
id: version
|
|
49
|
+
env:
|
|
50
|
+
PUBLISH_VERSION: ${{ inputs.publish_version }}
|
|
51
|
+
GH_TOKEN: ${{ github.token }}
|
|
52
|
+
GH_REPO: ${{ github.repository }}
|
|
53
|
+
shell: bash
|
|
54
|
+
run: bash .github/scripts/check-release-version.sh
|
|
55
|
+
permissions:
|
|
56
|
+
contents: read
|
|
57
|
+
actions: read # Check CI for the exact release commit.
|
|
58
|
+
|
|
59
|
+
wheel:
|
|
60
|
+
name: Build and test wheel (${{ matrix.platform }})
|
|
61
|
+
needs: version
|
|
62
|
+
runs-on: ${{ matrix.runner }}
|
|
63
|
+
timeout-minutes: 30
|
|
64
|
+
strategy:
|
|
65
|
+
fail-fast: false
|
|
66
|
+
matrix:
|
|
67
|
+
include:
|
|
68
|
+
- platform: linux-x86_64
|
|
69
|
+
runner: ubuntu-latest
|
|
70
|
+
- platform: macos-arm64
|
|
71
|
+
runner: macos-26
|
|
72
|
+
- platform: windows-x86_64
|
|
73
|
+
runner: windows-latest
|
|
74
|
+
steps:
|
|
75
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
76
|
+
with:
|
|
77
|
+
persist-credentials: false
|
|
78
|
+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
79
|
+
with:
|
|
80
|
+
python-version: |
|
|
81
|
+
3.15
|
|
82
|
+
3.14
|
|
83
|
+
allow-prereleases: true
|
|
84
|
+
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
|
|
85
|
+
with:
|
|
86
|
+
version: '0.13.10'
|
|
87
|
+
enable-cache: false
|
|
88
|
+
- name: Build manylinux wheel
|
|
89
|
+
if: runner.os == 'Linux'
|
|
90
|
+
env:
|
|
91
|
+
MATURIN_IMAGE: ghcr.io/pyo3/maturin:v1.15.0@sha256:1c897d72a79c083cdea8829662f7b28e7657cf5b0d7f44fb4231e55998cf52ed
|
|
92
|
+
shell: bash
|
|
93
|
+
run: bash .github/scripts/build-manylinux-wheel.sh
|
|
94
|
+
- name: Build native wheel
|
|
95
|
+
if: runner.os != 'Linux'
|
|
96
|
+
shell: bash
|
|
97
|
+
run: |
|
|
98
|
+
rustup toolchain install "$RUSTUP_TOOLCHAIN" --profile minimal
|
|
99
|
+
uvx --from "maturin==$MATURIN_VERSION" maturin build --release --locked \
|
|
100
|
+
--compatibility pypi --interpreter python --out dist
|
|
101
|
+
- name: Install and replay offline on both Python versions
|
|
102
|
+
shell: bash
|
|
103
|
+
run: |
|
|
104
|
+
wheels=(dist/*.whl)
|
|
105
|
+
test "${#wheels[@]}" = 1
|
|
106
|
+
python tools/check_wheel.py "${wheels[0]}"
|
|
107
|
+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
108
|
+
with:
|
|
109
|
+
name: dist-${{ matrix.platform }}
|
|
110
|
+
path: dist/*.whl
|
|
111
|
+
if-no-files-found: error
|
|
112
|
+
|
|
113
|
+
sdist:
|
|
114
|
+
name: Build and test source distribution
|
|
115
|
+
needs: version
|
|
116
|
+
runs-on: ubuntu-latest
|
|
117
|
+
timeout-minutes: 20
|
|
118
|
+
steps:
|
|
119
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
120
|
+
with:
|
|
121
|
+
persist-credentials: false
|
|
122
|
+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
123
|
+
with:
|
|
124
|
+
python-version: |
|
|
125
|
+
3.15
|
|
126
|
+
3.14
|
|
127
|
+
allow-prereleases: true
|
|
128
|
+
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
|
|
129
|
+
with:
|
|
130
|
+
version: '0.13.10'
|
|
131
|
+
enable-cache: false
|
|
132
|
+
- name: Build sdist and smoke-test a wheel made from it
|
|
133
|
+
shell: bash
|
|
134
|
+
run: bash .github/scripts/build-sdist.sh
|
|
135
|
+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
136
|
+
with:
|
|
137
|
+
name: dist-sdist
|
|
138
|
+
path: dist/*.tar.gz
|
|
139
|
+
if-no-files-found: error
|
|
140
|
+
|
|
141
|
+
validate:
|
|
142
|
+
name: Validate package metadata and inventory
|
|
143
|
+
needs: [version, wheel, sdist]
|
|
144
|
+
runs-on: ubuntu-latest
|
|
145
|
+
timeout-minutes: 10
|
|
146
|
+
steps:
|
|
147
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
148
|
+
with:
|
|
149
|
+
persist-credentials: false
|
|
150
|
+
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
|
|
151
|
+
with:
|
|
152
|
+
version: '0.13.10'
|
|
153
|
+
enable-cache: false
|
|
154
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
|
|
155
|
+
with:
|
|
156
|
+
pattern: dist-*
|
|
157
|
+
merge-multiple: true
|
|
158
|
+
path: dist
|
|
159
|
+
- run: uv sync --locked --python 3.14 --only-group release --no-install-project
|
|
160
|
+
- run: uv run --locked --no-sync twine check --strict dist/*
|
|
161
|
+
- name: Check distribution names and version
|
|
162
|
+
env:
|
|
163
|
+
RELEASE_VERSION: ${{ needs.version.outputs.version }}
|
|
164
|
+
run: uv run --locked --no-sync python tools/verify_release.py files "$RELEASE_VERSION" dist
|
|
165
|
+
|
|
166
|
+
attest:
|
|
167
|
+
name: Attest ${{ matrix.part }}
|
|
168
|
+
needs: [version, validate]
|
|
169
|
+
if: ${{ needs.version.outputs.publish == 'true' && github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' && github.repository == 'HayaoSuzuki/quint-connect-py' }}
|
|
170
|
+
runs-on: ubuntu-latest
|
|
171
|
+
timeout-minutes: 10
|
|
172
|
+
strategy:
|
|
173
|
+
fail-fast: false
|
|
174
|
+
matrix:
|
|
175
|
+
part: [linux-x86_64, macos-arm64, windows-x86_64, sdist]
|
|
176
|
+
permissions:
|
|
177
|
+
contents: read
|
|
178
|
+
id-token: write # Sign the build using the workflow identity.
|
|
179
|
+
attestations: write # Store the build provenance on GitHub.
|
|
180
|
+
steps:
|
|
181
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
182
|
+
with:
|
|
183
|
+
persist-credentials: false
|
|
184
|
+
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
|
|
185
|
+
with:
|
|
186
|
+
version: '0.13.10'
|
|
187
|
+
enable-cache: false
|
|
188
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
|
|
189
|
+
with:
|
|
190
|
+
name: dist-${{ matrix.part }}
|
|
191
|
+
path: dist
|
|
192
|
+
- uses: actions/attest@1e69f48acb82d1966a394da916b4c1698aa569d6 # v4
|
|
193
|
+
id: build
|
|
194
|
+
with:
|
|
195
|
+
subject-path: 'dist/*'
|
|
196
|
+
- run: uv sync --locked --python 3.14 --only-group release --no-install-project
|
|
197
|
+
- name: Verify build provenance and convert it to PEP 740
|
|
198
|
+
env:
|
|
199
|
+
GH_TOKEN: ${{ github.token }}
|
|
200
|
+
BUNDLE: ${{ steps.build.outputs.bundle-path }}
|
|
201
|
+
shell: bash
|
|
202
|
+
run: bash .github/scripts/stage-release-attestation.sh
|
|
203
|
+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
204
|
+
with:
|
|
205
|
+
name: signed-${{ matrix.part }}
|
|
206
|
+
path: dist/*
|
|
207
|
+
if-no-files-found: error
|
|
208
|
+
|
|
209
|
+
testpypi:
|
|
210
|
+
name: Publish on TestPyPI
|
|
211
|
+
needs: attest
|
|
212
|
+
runs-on: ubuntu-latest
|
|
213
|
+
timeout-minutes: 10
|
|
214
|
+
environment:
|
|
215
|
+
name: testpypi
|
|
216
|
+
url: https://test.pypi.org/p/quint-connect-py
|
|
217
|
+
permissions:
|
|
218
|
+
id-token: write # Exchange the workflow identity for a PyPI upload token.
|
|
219
|
+
steps:
|
|
220
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
|
|
221
|
+
with:
|
|
222
|
+
pattern: signed-*
|
|
223
|
+
merge-multiple: true
|
|
224
|
+
path: dist
|
|
225
|
+
- uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # release/v1
|
|
226
|
+
with:
|
|
227
|
+
packages-dir: dist/
|
|
228
|
+
repository-url: https://test.pypi.org/legacy/
|
|
229
|
+
attestations: true
|
|
230
|
+
print-hash: true
|
|
231
|
+
|
|
232
|
+
verify-testpypi:
|
|
233
|
+
name: Verify files and attestations on TestPyPI
|
|
234
|
+
needs: [version, testpypi]
|
|
235
|
+
runs-on: ubuntu-latest
|
|
236
|
+
timeout-minutes: 15
|
|
237
|
+
steps:
|
|
238
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
239
|
+
with:
|
|
240
|
+
persist-credentials: false
|
|
241
|
+
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
|
|
242
|
+
with:
|
|
243
|
+
version: '0.13.10'
|
|
244
|
+
enable-cache: false
|
|
245
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
|
|
246
|
+
with:
|
|
247
|
+
pattern: signed-*
|
|
248
|
+
merge-multiple: true
|
|
249
|
+
path: dist
|
|
250
|
+
- run: uv sync --locked --python 3.14 --only-group release --no-install-project
|
|
251
|
+
- env:
|
|
252
|
+
GH_TOKEN: ${{ github.token }}
|
|
253
|
+
RELEASE_VERSION: ${{ needs.version.outputs.version }}
|
|
254
|
+
run: uv run --locked --no-sync python tools/verify_release.py testpypi "$RELEASE_VERSION" dist
|
|
255
|
+
|
|
256
|
+
pypi:
|
|
257
|
+
name: Publish on PyPI
|
|
258
|
+
needs: verify-testpypi
|
|
259
|
+
runs-on: ubuntu-latest
|
|
260
|
+
timeout-minutes: 10
|
|
261
|
+
environment:
|
|
262
|
+
name: pypi
|
|
263
|
+
url: https://pypi.org/p/quint-connect-py
|
|
264
|
+
permissions:
|
|
265
|
+
id-token: write # Exchange the workflow identity for a PyPI upload token.
|
|
266
|
+
steps:
|
|
267
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
|
|
268
|
+
with:
|
|
269
|
+
pattern: signed-*
|
|
270
|
+
merge-multiple: true
|
|
271
|
+
path: dist
|
|
272
|
+
- uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # release/v1
|
|
273
|
+
with:
|
|
274
|
+
packages-dir: dist/
|
|
275
|
+
attestations: true
|
|
276
|
+
print-hash: true
|
|
277
|
+
|
|
278
|
+
verify-pypi:
|
|
279
|
+
name: Verify files and attestations on PyPI
|
|
280
|
+
needs: [version, pypi]
|
|
281
|
+
runs-on: ubuntu-latest
|
|
282
|
+
timeout-minutes: 15
|
|
283
|
+
steps:
|
|
284
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
285
|
+
with:
|
|
286
|
+
persist-credentials: false
|
|
287
|
+
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
|
|
288
|
+
with:
|
|
289
|
+
version: '0.13.10'
|
|
290
|
+
enable-cache: false
|
|
291
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
|
|
292
|
+
with:
|
|
293
|
+
pattern: signed-*
|
|
294
|
+
merge-multiple: true
|
|
295
|
+
path: dist
|
|
296
|
+
- run: uv sync --locked --python 3.14 --only-group release --no-install-project
|
|
297
|
+
- env:
|
|
298
|
+
GH_TOKEN: ${{ github.token }}
|
|
299
|
+
RELEASE_VERSION: ${{ needs.version.outputs.version }}
|
|
300
|
+
run: uv run --locked --no-sync python tools/verify_release.py pypi "$RELEASE_VERSION" dist
|