Skip to content

Commit

Permalink
Merge pull request #52 from okaneco/palette-07
Browse files Browse the repository at this point in the history
Upgrade palette to 0.7, bump crate version to 0.6, update CI/CD workflow
  • Loading branch information
okaneco authored Jul 23, 2023
2 parents dc9ab13 + ca3cc82 commit 974ca58
Show file tree
Hide file tree
Showing 13 changed files with 313 additions and 357 deletions.
34 changes: 4 additions & 30 deletions .github/workflows/rust-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,58 +9,32 @@ jobs:
publish-binary:
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
rust: [ stable ]
platform:
- os: macos-latest
os-name: macos
target: x86_64-apple-darwin
architecture: x86_64
binary-postfix: ""
use-cross: false
- os: ubuntu-latest
os-name: linux
target: x86_64-unknown-linux-gnu
architecture: x86_64
binary-postfix: ""
use-cross: false
- os: windows-latest
os-name: windows
target: x86_64-pc-windows-msvc
architecture: x86_64
binary-postfix: ".exe"
use-cross: false
- os: ubuntu-latest
os-name: linux
target: aarch64-unknown-linux-gnu
architecture: arm64
binary-postfix: ""
use-cross: true
- os: ubuntu-latest
os-name: linux
target: i686-unknown-linux-gnu
architecture: i686
binary-postfix: ""
use-cross: true

steps:
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true

- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Cargo build
uses: actions-rs/cargo@v1
with:
command: build
use-cross: ${{ matrix.platform.use-cross }}
toolchain: ${{ matrix.rust }}
args: --release --target ${{ matrix.platform.target }}
uses: dtolnay/rust-toolchain@stable
run: cargo build -v --release --target ${{ matrix.platform.target }}

- name: Package final binary
shell: bash
Expand Down
22 changes: 8 additions & 14 deletions .github/workflows/rust-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,18 @@ env:
jobs:
build-crate:
name: Build and test crate/docs
runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
os: [ubuntu, windows, macos]
toolchain: [nightly, beta, stable]
include:
- os: macos-latest
toolchain: stable
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
components: rust-docs
override: true
- name: Build library
run: cargo build -v --lib --no-default-features
- name: Build binary
Expand All @@ -45,14 +41,12 @@ jobs:
clippy-rustfmt:
name: Clippy and rustfmt
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
components: clippy, rustfmt
override: true
- name: clippy
run: cargo clippy
continue-on-error: true
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# `kmeans-colors` changelog

## Version 0.6.0 - 2023-07

Version bump for updating `palette` to `0.7`.

Users will need to change calls using
`palette::Pixel::{from_raw_slice, into_raw_slice}`
to `palette::cast::{from_component_slice, into_component_slice}` for preparing
the input image buffer. See the [documentation] or `lib.rs` file for examples.

[#52][52] - Upgrade palette to 0.7, bump crate version to 0.6, update CI/CD workflow

## Version 0.5.0 - 2022-03-17

Version bump for updating `palette` to `0.6`.
Expand Down Expand Up @@ -84,6 +95,7 @@ performance to color and format conversions.
## Version 0.1.0 - 2020-04
* Initial Commit

[52]: https://github.com/okaneco/kmeans-colors/pull/52
[49]: https://github.com/okaneco/kmeans-colors/pull/49
[44]: https://github.com/okaneco/kmeans-colors/pull/44
[41]: https://github.com/okaneco/kmeans-colors/pull/41
Expand All @@ -106,3 +118,4 @@ performance to color and format conversions.
[6]: https://github.com/okaneco/kmeans-colors/pull/6
[5]: https://github.com/okaneco/kmeans-colors/pull/5
[3]: https://github.com/okaneco/kmeans-colors/pull/3
[documentation]: https://docs.rs/kmeans_colors
Loading

0 comments on commit 974ca58

Please sign in to comment.