Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/cargo/png-0.17.9
Browse files Browse the repository at this point in the history
  • Loading branch information
SalOne22 committed Jun 19, 2023
2 parents af6e2a7 + 67870f5 commit 1163b37
Show file tree
Hide file tree
Showing 29 changed files with 1,136 additions and 129 deletions.
2 changes: 0 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ assignees: ''

---

**Write small description of bug**

## Description:
**Describe the bug**
A clear and concise description of what the bug is.
Expand Down
4 changes: 0 additions & 4 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ assignees: ''
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

## Required libraries:
**If you know any libraries that can help, write it here like so**
- lib (link)

## Expected Behavior:
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
Expand Down
37 changes: 29 additions & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,18 @@ env:

jobs:
build-win-binaries:
runs-on: windows-latest
runs-on: windows-2019

steps:
- uses: actions/checkout@v3

- name: Install dependencies
run: |
choco install -y ninja
pip install meson
- uses: ilammy/setup-nasm@v1

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
Expand All @@ -26,7 +33,10 @@ jobs:
uses: Swatinem/rust-cache@v2.2.1

- name: Build rimage
run: cargo build --release --target x86_64-pc-windows-msvc --verbose
shell: cmd
run: |
call "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
cargo build --release --target x86_64-pc-windows-msvc --verbose
- name: Get the version
shell: bash
Expand Down Expand Up @@ -62,7 +72,7 @@ jobs:
os: [ubuntu-latest, macos-latest]
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
target: x86_64-unknown-linux-gnu
- os: macos-latest
target: x86_64-apple-darwin

Expand All @@ -71,6 +81,17 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Install dependencies (linux)
if: matrix.os == 'ubuntu-latest'
run: |
DEBIAN_FRONTEND=noninteractive sudo apt-get update
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y ninja-build nasm meson
- name: Install dependencies (macOS)
if: matrix.os == 'macOS-latest'
run: |
brew install ninja nasm meson
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
Expand All @@ -79,11 +100,6 @@ jobs:
target: ${{ matrix.target }}
override: true

- name: Install musl
if: contains(matrix.target, 'linux-musl')
run: |
sudo apt-get install musl-tools
- name: Rust Cache
uses: Swatinem/rust-cache@v2.2.1

Expand Down Expand Up @@ -158,6 +174,11 @@ jobs:

steps:
- uses: actions/checkout@v3

- name: Install dependencies
run: |
DEBIAN_FRONTEND=noninteractive sudo apt-get update
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y ninja-build nasm meson
- name: Install Rust
uses: actions-rs/toolchain@v1
Expand Down
40 changes: 35 additions & 5 deletions .github/workflows/rimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-latest, windows-2019]

name: Test `cargo check/test` on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand All @@ -25,14 +25,44 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Install dependencies (linux)
if: matrix.os == 'ubuntu-latest'
run: |
DEBIAN_FRONTEND=noninteractive sudo apt-get update
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y ninja-build nasm meson
- name: Install dependencies (macOS)
if: matrix.os == 'macos-latest'
run: |
brew install ninja nasm meson
- name: Install dependencies (windows)
if: matrix.os == 'windows-2019'
run: |
choco install -y ninja
pip install meson
- name: Install nasm (windows)
if: matrix.os == 'windows-2019'
uses: ilammy/setup-nasm@v1

- run: |
rustup set auto-self-update disable
rustup toolchain install stable --profile minimal
- name: Rust Cache
uses: Swatinem/rust-cache@v2.2.1

- name: Check/Test (Windows)
if: matrix.os == 'windows-2019'
shell: cmd
run: |
call "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
cargo check --verbose
cargo test --verbose
- name: Check
run: cargo check --verbose
- name: Run tests
run: cargo test --verbose
- name: Test (Linux, macOS)
if: ${{ matrix.os != 'windows-2019' }}
run: |
cargo check --verbose
cargo test --verbose
14 changes: 9 additions & 5 deletions .github/workflows/rust-clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ name: rust-clippy analyze

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
branches: ["main"]
schedule:
- cron: '18 14 * * 4'
- cron: "18 14 * * 4"

jobs:
rust-clippy-analyze:
Expand All @@ -30,6 +30,11 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Install dependencies (linux)
run: |
DEBIAN_FRONTEND=noninteractive sudo apt-get update
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y ninja-build nasm meson
- name: Install Rust toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af #@v1
with:
Expand All @@ -42,8 +47,7 @@ jobs:
run: cargo install clippy-sarif sarif-fmt

- name: Run rust-clippy
run:
cargo clippy
run: cargo clippy
--all-features
--message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
continue-on-error: true
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
- [Changed] ImageData now stores bytes as Box<[u8]>
- [Changed] Global allocator now is Jemalloc on unix and MiMalloc on Windows
- [Changed] Reduced peak heap usage twice!
- [Changed] Now output format option is named just format
- [Added] AVIF decoding and encoding
- [Added] Output dir option for saving in different locations

## v0.6.0

Expand Down
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ To get started with contributing, you'll need to:
1. Fork the repository on GitHub
2. Clone your fork locally
3. Install Rust and Cargo (if you haven't already)
4. Run `cargo build` to ensure everything builds properly
4. Also you will need to install cmake, nasm and ninja/meson for avif development
5. Run `cargo build` to ensure everything builds properly
> note: On windows use Visual Studio build environment like developer PowerShell for VS 2019
## Making Changes

Expand Down
Loading

0 comments on commit 1163b37

Please sign in to comment.