Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update rust crate winit to 0.29.14 - abandoned #18

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Readme
on: push

jobs:
# Generate the readme from lib.rs
readme:
name: Generate README.md
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# Needed for the amend
fetch-depth: 2

- uses: cargo-bins/cargo-binstall@main

- name: Install cargo-rdme
run: cargo binstall cargo-rdme -y

- name: Get last commit message
id: last-commit-message
run: |
echo "msg=$(git log -1 --pretty=%s)" >> $GITHUB_OUTPUT

- name: Run cargo-rdme
run: cargo rdme

- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: ${{ steps.last-commit-message.outputs.msg }}
commit_options: '--amend --no-edit'
push_options: '--force'
skip_fetch: true
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release

permissions:
pull-requests: write
contents: write

on:
push:
branches:
- main

jobs:
release-plz:
name: Release PR
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Run release-plz
uses: MarcoIeni/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
58 changes: 18 additions & 40 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,14 @@ on:
paths-ignore:
- "docs/**"
- "**.md"
pull_request:
paths-ignore:
- "docs/**"
- "**.md"

jobs:
# Check for formatting
rustfmt:
name: Formatter check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@v4

- uses: actions-rs/toolchain@v1
with:
Expand All @@ -29,72 +26,53 @@ jobs:
command: fmt
args: --all -- --check

# Run compile check on Linux, macOS, and Windows
# On both Rust stable and Rust nightly
# Run a compilation check on Linux, macOS, and Windows
compile:
name: Compile
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
toolchain: [stable, nightly]
steps:
# Checkout the branch being tested
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@v4

# Install rust stable
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}

# Cache the built dependencies
- uses: Swatinem/[email protected]
with:
save-if: ${{ github.event_name == 'push' }}
toolchain: stable

# Install cargo-hack
- uses: taiki-e/install-action@cargo-hack

# Compile all feature combinations on the target platform
- name: Compile
run: cargo hack --feature-powerset check
# Check if all feature combinations compile
- name: Test
run: cargo hack --each-feature check

# Run tests on Linux
# On both Rust stable and Rust nightly
test:
name: Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
toolchain: [stable, nightly]
steps:
# Checkout the branch being tested
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@v4

# Install rust stable
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}

# Cache the built dependencies
- uses: Swatinem/[email protected]
with:
save-if: ${{ github.event_name == 'push' }}

# Install cargo-hack
- uses: taiki-e/install-action@cargo-hack
toolchain: stable

# Run the ignored tests that expect the above setup
- name: Run all tests
# Test all features on the target platform
- name: Test
run: cargo hack --feature-powerset test

# Build the WASM target & push it to GitHub pages
wasm:
name: WASM examples
name: WASM test & build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@v4

# Install rust stable
- uses: dtolnay/rust-toolchain@master
Expand All @@ -107,8 +85,8 @@ jobs:
with:
save-if: ${{ github.event_name == 'push' }}

# Build the WASM examples
- name: Build example
# Build the WASM
- name: Build
run: cargo run --package run-wasm -- --release --build-only --example window

# Deploy to GitHub pages
Expand All @@ -117,5 +95,5 @@ jobs:
env:
REPO: self
BRANCH: gh-pages
FOLDER: target/wasm-examples
FOLDER: target/wasm-examples/window
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ thiserror = "1.0.57"
blit = { version = "0.8.5", optional = true, default-features = false }

[dev-dependencies]
winit = "0.28.7"
winit = "0.29.14"
log = "0.4.21"
web-time = "1.1.0"
blit = "0.8.5"
Expand Down
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
# rotsprite

Rust implementation/library of the RotSprite algorithm.
[![Build Status](https://github.com/tversteeg/rotsprite/workflows/CI/badge.svg)](https://github.com/tversteeg/rotsprite/actions?workflow=CI)
[![Crates.io](https://img.shields.io/crates/v/rotsprite.svg)](https://crates.io/crates/rotsprite)
[![Documentation](https://docs.rs/rotsprite/badge.svg)](https://docs.rs/rotsprite)
[![License: AGPL-3.0-or-later](https://img.shields.io/crates/l/rotsprite.svg)](#license)
[![Downloads](https://img.shields.io/crates/d/rotsprite.svg)](#downloads)

![CI](https://github.com/tversteeg/rotsprite/workflows/CI/badge.svg?branch=master)
<a href="https://crates.io/crates/rotsprite"><img src="https://img.shields.io/crates/v/rotsprite.svg" alt="Version"/></a>
<a href="https://docs.rs/rotsprite"><img src="https://img.shields.io/badge/api-rustdoc-blue.svg" alt="Rust Documentation"/></a>
<img src="https://img.shields.io/crates/l/rotsprite.svg" alt="License"/>
### [Documentation](https://docs.rs/rotsprite/)

Works with many types of pixel buffers.
<!-- cargo-rdme start -->

Pixel Art rotation algorithms that works with many types of pixel buffers.

This library allows you to rotate pixel art using the [rotsprite](https://en.wikipedia.org/wiki/Pixel-art_scaling_algorithms#RotSprite) algorithm.

<!-- cargo-rdme end -->

![Large](docs/example-large.png?raw=true)
![Small](docs/example-small.png?raw=true)
Expand All @@ -17,8 +23,6 @@ Works with many types of pixel buffers.
|-|-|-|
| Source Image | Rotated 30° using RotSprite | Rotated 30° using naive rotation |

## Example

## Demos

### [WASM Demo](https://tversteeg.nl/rotsprite/window/)
Expand All @@ -33,7 +37,7 @@ Uses the `["blit"]` feature flag.
cargo run --example window
```

## Credits
#### Credits

[RotSprite algorithm - Xenowhirl](https://en.wikipedia.org/wiki/Pixel-art_scaling_algorithms#RotSprite)<br/>
[Pixel Art - Redshrike](https://opengameart.org/content/3-form-rpg-boss-harlequin-epicycle)
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! # Pixel Art Rotation
//! Pixel Art rotation algorithms that works with many types of pixel buffers.
//!
//! This library allows you to rotate pixel art using the [rotsprite](https://en.wikipedia.org/wiki/Pixel-art_scaling_algorithms#RotSprite) algorithm.

Expand Down