pict-rs/.forgejo/workflows/check.yaml
2025-03-29 17:26:48 -05:00

110 lines
2.8 KiB
YAML

on:
push:
branches:
- '*'
pull_request:
branches:
- main
jobs:
clippy:
runs-on: docker
container:
image: docker.io/asonix/actions-base-image:0.1.22
steps:
-
name: Checkout pict-rs
uses: https://github.com/actions/checkout@v4
-
name: Cargo Cache
uses: https://git.asonix.dog/asonix/actions/cache-rust-dependencies@main
-
name: Clippy
run: |
cargo clippy --no-default-features -- -D warnings
cargo clippy --no-default-features --features io-uring -- -D warnings
deny:
runs-on: docker
container:
image: docker.io/asonix/actions-base-image:0.1.22
steps:
-
name: Checkout pict-rs
uses: https://github.com/actions/checkout@v4
-
name: Cargo Cache
uses: https://git.asonix.dog/asonix/actions/cache-rust-dependencies@main
-
name: Cargo Deny
run: |
cargo deny check
tests:
runs-on: docker
container:
image: docker.io/asonix/actions-base-image:0.1.22
steps:
-
name: Checkout pict-rs
uses: https://github.com/actions/checkout@v4
-
name: Cargo Cache
uses: https://git.asonix.dog/asonix/actions/cache-rust-dependencies@main
-
name: Install apt dependencies
run: |
set -x
apt-get update
apt-get -y install ffmpeg exiftool
-
name: Install imagemagick
uses: https://git.asonix.dog/asonix/actions/install-imagemagick@main
with:
version: 7.1.1-46
-
name: Run library tests
run: |
cargo test --lib
env:
RUSTFLAGS: --cfg tokio_unstable --cfg system_deps
-
name: Run doctests
run: |
cargo test --doc
env:
RUSTFLAGS: --cfg tokio_unstable --cfg system_deps
-
name: Run integration tests
run: |
set -x
for testFile in $(ls tests/*.rs)
do
cargo test --test ${${testFile#tests/}%.rs}
done
env:
RUSTFLAGS: --cfg tokio_unstable --cfg system_deps
LD_LIBRARY_PATH: "/usr/local/lib"
check:
strategy:
fail-fast: false
matrix:
target:
- x86_64-unknown-linux-musl
- armv7-unknown-linux-musleabihf
- aarch64-unknown-linux-musl
runs-on: docker
container:
image: docker.io/asonix/actions-base-image:0.1.22
steps:
-
name: Checkout pict-rs
uses: https://github.com/actions/checkout@v4
-
name: Cargo Cache
uses: https://git.asonix.dog/asonix/actions/cache-rust-dependencies@main
-
name: Debug builds
run: cargo zigbuild --target ${{ matrix.target }}