Skip to content

Commit

Permalink
Format YAML files with prettier (#698)
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb authored Oct 15, 2024
1 parent 6ff51b6 commit f01b43a
Show file tree
Hide file tree
Showing 4 changed files with 170 additions and 125 deletions.
42 changes: 21 additions & 21 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
categories:
- title: '⚠ Breaking Changes'
- title: "⚠ Breaking Changes"
labels:
- 'breaking'
- title: '🚀 Features'
- "breaking"
- title: "🚀 Features"
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
- "feature"
- "enhancement"
- title: "🐛 Bug Fixes"
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: '📄 Documentation'
- "fix"
- "bugfix"
- "bug"
- title: "📄 Documentation"
labels:
- 'documentation'
- title: '🧰 Maintenance'
label:
- 'chore'
- 'ci'
- 'dependencies'
- "documentation"
- title: "🧰 Maintenance"
label:
- "chore"
- "ci"
- "dependencies"

exclude-labels:
- 'skip-changelog'
- "skip-changelog"

change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels:
- 'major'
- "major"
minor:
labels:
- 'minor'
- "minor"
patch:
labels:
- 'patch'
- "patch"
default: patch
template: |
## Changes
Expand Down
192 changes: 115 additions & 77 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: Build
on:
workflow_dispatch:
push:
branches: [ master ]
branches: [master]
tags:
- v*
pull_request:
branches: [ master ]
branches: [master]

env:
CARGO_TERM_COLOR: always
Expand All @@ -30,58 +30,58 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Install Dependencies
run: sudo apt install libunwind-dev
if: runner.os == 'Linux'
- uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Build
run: cargo build --release --verbose --examples
- uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Test
id: test
continue-on-error: true
run: cargo test --release
- name: Test (retry#1)
id: test1
run: cargo test --release
if: steps.test.outcome=='failure'
continue-on-error: true
- name: Test (retry#2)
run: cargo test --release
if: steps.test1.outcome=='failure'
- name: Build Wheel
run: |
pip install --upgrade maturin
maturin build --release -o dist --all-features
if: runner.os == 'Windows'
- name: Build Wheel - universal2
env:
DEVELOPER_DIR: /Applications/Xcode.app/Contents/Developer
SDKROOT: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
MACOSX_DEPLOYMENT_TARGET: 10.9
run: |
rustup target add aarch64-apple-darwin
rustup target add x86_64-apple-darwin
pip install --upgrade maturin
maturin build --release -o dist
maturin build --release -o dist --target universal2-apple-darwin
if: matrix.os == 'macos-latest'
- name: Rename Wheels
run: |
python3 -c "import shutil; import glob; wheels = glob.glob('dist/*.whl'); [shutil.move(wheel, wheel.replace('py3', 'py2.py3')) for wheel in wheels if 'py2' not in wheel]"
if: runner.os != 'Linux'
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
if: runner.os != 'Linux'
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Install Dependencies
run: sudo apt install libunwind-dev
if: runner.os == 'Linux'
- uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Build
run: cargo build --release --verbose --examples
- uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Test
id: test
continue-on-error: true
run: cargo test --release
- name: Test (retry#1)
id: test1
run: cargo test --release
if: steps.test.outcome=='failure'
continue-on-error: true
- name: Test (retry#2)
run: cargo test --release
if: steps.test1.outcome=='failure'
- name: Build Wheel
run: |
pip install --upgrade maturin
maturin build --release -o dist --all-features
if: runner.os == 'Windows'
- name: Build Wheel - universal2
env:
DEVELOPER_DIR: /Applications/Xcode.app/Contents/Developer
SDKROOT: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
MACOSX_DEPLOYMENT_TARGET: 10.9
run: |
rustup target add aarch64-apple-darwin
rustup target add x86_64-apple-darwin
pip install --upgrade maturin
maturin build --release -o dist
maturin build --release -o dist --target universal2-apple-darwin
if: matrix.os == 'macos-latest'
- name: Rename Wheels
run: |
python3 -c "import shutil; import glob; wheels = glob.glob('dist/*.whl'); [shutil.move(wheel, wheel.replace('py3', 'py2.py3')) for wheel in wheels if 'py2' not in wheel]"
if: runner.os != 'Linux'
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
if: runner.os != 'Linux'

build-linux-cross:
runs-on: ubuntu-latest
Expand All @@ -96,28 +96,28 @@ jobs:
RUSTUP_HOME: /root/.rustup
CARGO_HOME: /root/.cargo
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Build
run: |
python3 -m pip install --upgrade maturin
maturin build --release -o dist --target $RUST_MUSL_CROSS_TARGET --features unwind
maturin sdist -o dist
if: matrix.target == 'x86_64-musl'
- name: Build
run: |
python3 -m pip install --upgrade maturin
maturin build --release -o dist --target $RUST_MUSL_CROSS_TARGET
maturin sdist -o dist
if: matrix.target != 'x86_64-musl'
- name: Rename Wheels
run: |
python3 -c "import shutil; import glob; wheels = glob.glob('dist/*.whl'); [shutil.move(wheel, wheel.replace('py3', 'py2.py3')) for wheel in wheels if 'py2' not in wheel]"
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Build
run: |
python3 -m pip install --upgrade maturin
maturin build --release -o dist --target $RUST_MUSL_CROSS_TARGET --features unwind
maturin sdist -o dist
if: matrix.target == 'x86_64-musl'
- name: Build
run: |
python3 -m pip install --upgrade maturin
maturin build --release -o dist --target $RUST_MUSL_CROSS_TARGET
maturin sdist -o dist
if: matrix.target != 'x86_64-musl'
- name: Rename Wheels
run: |
python3 -c "import shutil; import glob; wheels = glob.glob('dist/*.whl'); [shutil.move(wheel, wheel.replace('py3', 'py2.py3')) for wheel in wheels if 'py2' not in wheel]"
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist

build-freebsd:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -183,7 +183,45 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.6.7, 3.6.15, 3.7.1, 3.7.17, 3.8.0, 3.8.18, 3.9.0, 3.9.20, 3.10.0, 3.10.1, 3.10.2, 3.10.3, 3.10.4, 3.10.5, 3.10.6, 3.10.7, 3.10.8, 3.10.9, 3.10.10, 3.10.11, 3.10.12, 3.10.13, 3.10.14, 3.10.15, 3.11.0, 3.11.1, 3.11.2, 3.11.3, 3.11.4, 3.11.5, 3.11.6, 3.11.7, 3.11.8, 3.11.9, 3.11.10, 3.12.0]
python-version:
[
3.6.7,
3.6.15,
3.7.1,
3.7.17,
3.8.0,
3.8.18,
3.9.0,
3.9.20,
3.10.0,
3.10.1,
3.10.2,
3.10.3,
3.10.4,
3.10.5,
3.10.6,
3.10.7,
3.10.8,
3.10.9,
3.10.10,
3.10.11,
3.10.12,
3.10.13,
3.10.14,
3.10.15,
3.11.0,
3.11.1,
3.11.2,
3.11.3,
3.11.4,
3.11.5,
3.11.6,
3.11.7,
3.11.8,
3.11.9,
3.11.10,
3.12.0,
]
# TODO: also test windows
os: [ubuntu-20.04, macos-13]
# some versions of python can't be tested on GHA with osx because of SIP:
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/update_python_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Update Python Test Versions
on:
workflow_dispatch:
schedule:
- cron: "0 1 * * *"
- cron: "0 1 * * *"
jobs:
update-dep:
runs-on: ubuntu-latest
Expand All @@ -17,12 +17,14 @@ jobs:
run: pip install --upgrade requests
- name: Scan for new python versions
run: python ci/update_python_test_versions.py
- name: Format results
run: npx prettier --write ".github/workflows/update_python_test.yml"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
commit-message: Update tested python versions
title: Update tested python versions
branch: update-python-versions
labels: |
skip-changelog
dependencies
commit-message: Update tested python versions
title: Update tested python versions
branch: update-python-versions
labels: |
skip-changelog
dependencies
45 changes: 25 additions & 20 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
repos:
- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
hooks:
- id: codespell
additional_dependencies: [tomli]
args: ["--toml", "pyproject.toml"]
exclude: (?x)^(ci/testdata.*|images.*)$
- repo: https://github.com/doublify/pre-commit-rust
rev: v1.0
hooks:
- id: fmt
- id: cargo-check
- repo: local
hooks:
- id: cargo-clippy
name: cargo clippy
entry: cargo clippy -- -D warnings
language: system
files: \.rs$
pass_filenames: false
- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
hooks:
- id: codespell
additional_dependencies: [tomli]
args: ["--toml", "pyproject.toml"]
exclude: (?x)^(ci/testdata.*|images.*)$
- repo: https://github.com/doublify/pre-commit-rust
rev: v1.0
hooks:
- id: fmt
- id: cargo-check
- repo: local
hooks:
- id: cargo-clippy
name: cargo clippy
entry: cargo clippy -- -D warnings
language: system
files: \.rs$
pass_filenames: false
- repo: https://github.com/rbubley/mirrors-prettier
rev: v3.3.3
hooks:
- id: prettier
types: [yaml]

0 comments on commit f01b43a

Please sign in to comment.