Skip to content

Commit ceca22b

Browse files
authored
Update deps (#2)
**Changes:** * Added `rust-version = "1.78.0"` as minimal version this library will compile in. * Updated dependencies (`once_cell`, `regex`, `serde`, `serde_json`, `snafu`, `strum`, `strum_macros`) to their latest patch versions. **Build and test profile enhancements:** * Added `[profile.dev]` and `[profile.test]` sections to `Cargo.toml` to explicitly set optimization and debug settings for development and test builds, facilitating easier debugging and consistent build behavior.
1 parent b6a2922 commit ceca22b

File tree

2 files changed

+59
-44
lines changed

2 files changed

+59
-44
lines changed

.github/workflows/pull_request.yml

Lines changed: 43 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -8,57 +8,63 @@ on:
88

99
env:
1010
CARGO_TERM_COLOR: always
11-
RUSTC_WRAPPER: sccache
11+
RUST_BACKTRACE: 1
1212
SCCACHE_CACHE_SIZE: 2G
1313

1414
jobs:
1515
rust_check:
1616
name: Rust Check
17-
runs-on: ${{ matrix.os }}
18-
strategy:
19-
matrix:
20-
os: [ubuntu-latest]
21-
rust: [stable]
17+
runs-on: ubuntu-latest
18+
env:
19+
RUSTC_WRAPPER: sccache
2220
steps:
23-
- uses: actions/checkout@v3
21+
- uses: actions/checkout@v4
2422

25-
- name: Install latest stable
26-
uses: actions-rs/toolchain@v1
23+
- name: Install Rust stable
24+
uses: dtolnay/rust-toolchain@stable
2725
with:
28-
toolchain: stable
29-
override: true
3026
components: rustfmt, clippy
31-
profile: minimal
3227

33-
- name: Cache dependencies
34-
uses: Swatinem/rust-cache@v2
35-
36-
- name: Configure sccache
37-
run: |
38-
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
39-
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
40-
echo “RUSTFLAGS=’--cfg profile=ephemeral-build’” >> $GITHUB_ENV
41-
42-
- name: Run sccache-cache
43-
uses: mozilla-actions/sccache-action@v0.0.7
44-
with:
45-
version: "v0.7.4"
28+
- name: Setup sccache
29+
uses: mozilla-actions/sccache-action@v0.0.9
4630

47-
- uses: Swatinem/rust-cache@v2
31+
- name: Rust cache
32+
uses: Swatinem/rust-cache@v2
4833
with:
49-
cache-on-failure: true
5034
shared-key: "rust-cache"
35+
cache-on-failure: true
36+
37+
- name: Check formatting
38+
run: cargo fmt --all --check
5139

52-
- name: Check and Lint
53-
run: |
54-
cargo fmt --all --check
55-
cargo clippy --all-targets --all-features -- -D warnings
56-
cargo check --all-targets --all-features
40+
- name: Run clippy
41+
run: cargo clippy --all-targets --all-features -- -D warnings
42+
43+
- name: Check compilation
44+
run: cargo check --all-targets --all-features
5745

5846
- name: Install Exiftool
59-
run: |
60-
./scripts/unix/exiftool.sh
47+
run: ./scripts/unix/exiftool.sh
48+
49+
- name: Run tests
50+
run: cargo test --all-features
51+
52+
- name: Check documentation
53+
run: cargo doc --no-deps --all-features
54+
env:
55+
RUSTDOCFLAGS: -D warnings
56+
57+
msrv:
58+
name: MSRV Check
59+
runs-on: ubuntu-latest
60+
steps:
61+
- uses: actions/checkout@v4
62+
63+
- name: Install Rust 1.78
64+
uses: dtolnay/rust-toolchain@1.78.0
65+
66+
- name: Rust Cache
67+
uses: Swatinem/rust-cache@v2
6168

62-
- name: Build and Test
63-
run: |
64-
cargo test --all-features
69+
- name: Check MSRV
70+
run: cargo check --all-features

Cargo.toml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,30 @@
22
name = "fuji"
33
version = "0.1.1"
44
edition = "2021"
5+
rust-version = "1.78.0"
56
description = "A library to read Fujifilm Recipes & Exif Metadata from a JPEG or RAF file using exiftool."
67
license = "Apache-2.0"
78
keywords = ["fujifilm", "recipe", "exif", "metadata"]
89
exclude = [".github", "tests", "test-utilities", "scripts", "deps"]
910

1011
[dependencies]
1112
log = "~0.4.26"
12-
once_cell = "~1.20.3"
13-
regex = "~1.11.1"
14-
serde = { version = "~1.0.218", features = ["derive"] }
15-
serde_json = "~1.0.139"
16-
snafu = "~0.8.5"
17-
strum = "~0.27.1"
18-
strum_macros = "~0.27.1"
13+
once_cell = "~1.21.3"
14+
regex = "~1.12.2"
15+
serde = { version = "~1.0.228", features = ["derive"] }
16+
serde_json = "~1.0.149"
17+
snafu = "~0.8.9"
18+
strum = "~0.27.2"
19+
strum_macros = "~0.27.2"
1920

2021
[dev-dependencies]
2122
pretty_assertions = "1.4.1"
2223
test-utilities = { path = "test-utilities" }
24+
25+
[profile.dev]
26+
opt-level = 0
27+
debug = true
28+
29+
[profile.test]
30+
opt-level = 0
31+
debug = true

0 commit comments

Comments
 (0)