Skip to content

Commit 238553a

Browse files
authored
Merge pull request #212 from tgross35/ci-improvements
Add CI caching and extra checks
2 parents b125d38 + 392dc96 commit 238553a

File tree

2 files changed

+41
-20
lines changed

2 files changed

+41
-20
lines changed

.github/workflows/main.yml

Lines changed: 39 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,29 @@
11
name: CI
22
on: [push, pull_request]
33

4+
env:
5+
RUSTDOCFLAGS: -D warnings
6+
RUSTFLAGS: -D warnings
7+
48
jobs:
59
test:
610
name: Test
711
runs-on: ${{ matrix.os }}
812
strategy:
913
matrix:
1014
os: [ubuntu-latest, macos-latest, windows-latest]
11-
rust: [stable, beta, nightly]
15+
rust: ["1.70", stable, beta, nightly]
1216
steps:
13-
- uses: actions/checkout@master
17+
- uses: actions/checkout@v4
1418
- name: Install Rust
1519
run: |
1620
rustup update ${{ matrix.rust }} --no-self-update
1721
rustup default ${{ matrix.rust }}
22+
- uses: Swatinem/rust-cache@v2
1823
- run: cargo test
1924
- name: Integration test
2025
run: cargo test --manifest-path test-crate/Cargo.toml
2126

22-
rustfmt:
23-
name: Rustfmt
24-
runs-on: ubuntu-latest
25-
steps:
26-
- uses: actions/checkout@master
27-
- name: Install Rust
28-
run: |
29-
rustup update stable --no-self-update
30-
rustup default stable
31-
rustup component add rustfmt
32-
- run: cargo fmt -- --check
33-
3427
cross_compile_test:
3528
name: Test Cross Compile - ${{ matrix.platform.target }}
3629
needs: [ test ]
@@ -71,10 +64,10 @@ jobs:
7164
rustup update stable --no-self-update
7265
rustup default stable
7366
rustup target add ${{ matrix.platform.target }}
74-
- run: cargo fmt -- --check
7567
- uses: taiki-e/install-action@v2
7668
with:
7769
tool: cross
70+
- uses: Swatinem/rust-cache@v2
7871
- name: cross test
7972
run: cross test -vv --target ${{ matrix.platform.target }}
8073
working-directory: test-crate
@@ -94,14 +87,40 @@ jobs:
9487
platform:
9588
- target: aarch64-apple-ios
9689
steps:
97-
- uses: actions/checkout@v3
98-
- uses: actions-rs/toolchain@v1
99-
with:
100-
toolchain: stable
101-
target: ${{ matrix.platform.target }}
90+
- uses: actions/checkout@v4
91+
- name: Install Rust
92+
run: |
93+
rustup update stable --no-self-update
94+
rustup default stable
95+
rustup target add ${{ matrix.platform.target }}
96+
- uses: Swatinem/rust-cache@v2
10297
- name: build
10398
run: cargo build -vv --target ${{ matrix.platform.target }}
10499
working-directory: test-crate
105100
env:
106101
# If this isn't specified the default is iOS 7, for which zlib-ng will not compile due to the lack of thread-local storage.
107102
IPHONEOS_DEPLOYMENT_TARGET: 16
103+
104+
rustfmt:
105+
name: Rustfmt
106+
runs-on: ubuntu-latest
107+
steps:
108+
- uses: actions/checkout@master
109+
- name: Install Rust
110+
run: |
111+
rustup update stable --no-self-update
112+
rustup default stable
113+
rustup component add rustfmt
114+
- run: cargo fmt --all -- --check
115+
116+
doc:
117+
name: docs
118+
runs-on: ubuntu-latest
119+
steps:
120+
- uses: actions/checkout@v4
121+
- run: |
122+
rustup update nightly --no-self-update
123+
rustup default nightly
124+
- uses: Swatinem/rust-cache@v2
125+
- run: cargo doc
126+

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -946,6 +946,8 @@ impl Config {
946946
Ok(VsVers::Vs16) => "Visual Studio 16 2019",
947947
Ok(VsVers::Vs15) => "Visual Studio 15 2017",
948948
Ok(VsVers::Vs14) => "Visual Studio 14 2015",
949+
// This was deprecated recently (2024-07). Ignore the warning for now.
950+
#[allow(deprecated)]
949951
Ok(VsVers::Vs12) => "Visual Studio 12 2013",
950952
Ok(_) => panic!(
951953
"Visual studio version detected but this crate \

0 commit comments

Comments
 (0)