refactor(bin): save file output under the palette name no matter the … #159
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust | |
on: | |
push: | |
branches: ["*"] | |
pull_request: | |
branches: [main] | |
env: | |
TERM: xterm | |
TOOLCHAIN: stable | |
permissions: | |
checks: write | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ env.TOOLCHAIN }} | |
override: true | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --release | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: lutgen | |
path: target/release/lutgen | |
run: | |
name: Generate LUTs (catppuccin-mocha) | |
runs-on: ubuntu-latest | |
needs: [build, test, fmt, clippy] | |
steps: | |
- uses: actions/download-artifact@v2 | |
with: | |
name: lutgen | |
path: . | |
- run: | | |
chmod +x lutgen | |
mkdir output | |
./lutgen generate -p catppuccin-mocha -a gaussian-rbf -o output/mocha_gaussian_rbf.png | |
./lutgen generate -p catppuccin-mocha -a shepards-method -o output/mocha_shepards_method.png | |
./lutgen generate -p catppuccin-mocha -a linear-rbf -o output/mocha_linear_rbf.png | |
./lutgen generate -p catppuccin-mocha -a gaussian-sampling -o output/mocha_gaussian_sampling.png | |
./lutgen generate -p catppuccin-mocha -a nearest-neighbor -o output/mocha_nearest_neighbor.png | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: catppuccin_mocha_hald_cluts | |
path: output | |
fmt: | |
name: Format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ env.TOOLCHAIN }} | |
components: rustfmt | |
override: true | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
test: | |
name: Tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ env.TOOLCHAIN }} | |
override: true | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --all -- --nocapture | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ env.TOOLCHAIN }} | |
components: clippy | |
override: true | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
- uses: actions-rs/clippy-check@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
args: --all-targets --all-features -- -D warnings -D clippy::all | |