Skip to content

Commit 65e1b39

Browse files
authored
Merge branch 'master' into feat/print-cmd-running
2 parents ae06b51 + b689783 commit 65e1b39

File tree

7 files changed

+216
-116
lines changed

7 files changed

+216
-116
lines changed

.github/workflows/main.yml

Lines changed: 84 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,42 @@
11
name: CI
22
on: [push, pull_request]
33

4+
env:
5+
RUSTDOCFLAGS: -D warnings
6+
RUSTFLAGS: -D warnings
7+
48
jobs:
9+
clippy:
10+
name: clippy
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Install Rust
15+
run: |
16+
rustup update beta --no-self-update
17+
rustup default beta
18+
rustup component add clippy
19+
- uses: Swatinem/rust-cache@v2
20+
- run: cargo clippy --all-features --all-targets -- -D warnings
21+
522
test:
623
name: Test
724
runs-on: ${{ matrix.os }}
825
strategy:
926
matrix:
1027
os: [ubuntu-latest, macos-latest, windows-latest]
11-
rust: [stable, beta, nightly]
28+
rust: ["1.70", stable, beta, nightly]
1229
steps:
13-
- uses: actions/checkout@master
30+
- uses: actions/checkout@v4
1431
- name: Install Rust
15-
run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
32+
run: |
33+
rustup update ${{ matrix.rust }} --no-self-update
34+
rustup default ${{ matrix.rust }}
35+
- uses: Swatinem/rust-cache@v2
1636
- run: cargo test
1737
- name: Integration test
1838
run: cargo test --manifest-path test-crate/Cargo.toml
1939

20-
rustfmt:
21-
name: Rustfmt
22-
runs-on: ubuntu-latest
23-
steps:
24-
- uses: actions/checkout@master
25-
- name: Install Rust
26-
run: rustup update stable && rustup default stable && rustup component add rustfmt
27-
- run: cargo fmt -- --check
28-
2940
cross_compile_test:
3041
name: Test Cross Compile - ${{ matrix.platform.target }}
3142
needs: [ test ]
@@ -39,14 +50,6 @@ jobs:
3950
test: true
4051
- target: arm-unknown-linux-gnueabihf
4152
test: true
42-
- target: mips-unknown-linux-gnu
43-
test: true
44-
- target: mips64-unknown-linux-gnuabi64
45-
test: true
46-
- target: mips64el-unknown-linux-gnuabi64
47-
test: true
48-
- target: mipsel-unknown-linux-gnu
49-
test: true
5053
- target: powerpc-unknown-linux-gnu
5154
test: true
5255
- target: s390x-unknown-linux-gnu
@@ -55,26 +58,29 @@ jobs:
5558
test: true
5659
- target: aarch64-unknown-linux-musl
5760
test: true
58-
- target: x86_64-pc-windows-gnu
59-
test: true
6061
# Build only
61-
- target: x86_64-unknown-freebsd
62+
- target: x86_64-pc-solaris
6263
test: false
63-
- target: x86_64-unknown-netbsd
64+
- target: x86_64-pc-windows-gnu
6465
test: false
65-
- target: x86_64-sun-solaris
66+
# FIXME: build fails, see <https://github.com/rust-lang/cmake-rs/issues/211>
67+
# - target: x86_64-unknown-freebsd
68+
# test: false
69+
- target: x86_64-unknown-netbsd
6670
test: false
6771
- target: x86_64-unknown-illumos
6872
test: false
6973
steps:
7074
- uses: actions/checkout@master
71-
- uses: actions-rs/toolchain@v1
72-
with:
73-
toolchain: stable
74-
target: ${{ matrix.platform.target }}
75-
- uses: taiki-e/install-action@v1
75+
- name: Install Rust
76+
run: |
77+
rustup update stable --no-self-update
78+
rustup default stable
79+
rustup target add ${{ matrix.platform.target }}
80+
- uses: taiki-e/install-action@v2
7681
with:
7782
tool: cross
83+
- uses: Swatinem/rust-cache@v2
7884
- name: cross test
7985
run: cross test -vv --target ${{ matrix.platform.target }}
8086
working-directory: test-crate
@@ -94,14 +100,57 @@ jobs:
94100
platform:
95101
- target: aarch64-apple-ios
96102
steps:
97-
- uses: actions/checkout@v3
98-
- uses: actions-rs/toolchain@v1
99-
with:
100-
toolchain: stable
101-
target: ${{ matrix.platform.target }}
103+
- uses: actions/checkout@v4
104+
- name: Install Rust
105+
run: |
106+
rustup update stable --no-self-update
107+
rustup default stable
108+
rustup target add ${{ matrix.platform.target }}
109+
- uses: Swatinem/rust-cache@v2
102110
- name: build
103111
run: cargo build -vv --target ${{ matrix.platform.target }}
104112
working-directory: test-crate
105113
env:
106114
# 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.
107115
IPHONEOS_DEPLOYMENT_TARGET: 16
116+
117+
rustfmt:
118+
name: Rustfmt
119+
runs-on: ubuntu-latest
120+
steps:
121+
- uses: actions/checkout@master
122+
- name: Install Rust
123+
run: |
124+
rustup update stable --no-self-update
125+
rustup default stable
126+
rustup component add rustfmt
127+
- run: cargo fmt --all -- --check
128+
129+
doc:
130+
name: docs
131+
runs-on: ubuntu-latest
132+
steps:
133+
- uses: actions/checkout@v4
134+
- run: |
135+
rustup update nightly --no-self-update
136+
rustup default nightly
137+
- uses: Swatinem/rust-cache@v2
138+
- run: cargo doc
139+
140+
success:
141+
needs:
142+
- clippy
143+
- test
144+
- cross_compile_test
145+
- ios_cross_compile_test
146+
- rustfmt
147+
- doc
148+
runs-on: ubuntu-latest
149+
# GitHub branch protection is exceedingly silly and treats "jobs skipped because a dependency
150+
# failed" as success. So we have to do some contortions to ensure the job fails if any of its
151+
# dependencies fails.
152+
if: always() # make sure this is never "skipped"
153+
steps:
154+
# Manually check the status of all dependencies. `if: failure()` does not work.
155+
- name: check if any dependency failed
156+
run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'

.github/workflows/publish.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Release-plz
2+
3+
permissions:
4+
pull-requests: write
5+
contents: write
6+
7+
on:
8+
push:
9+
branches:
10+
- master
11+
12+
jobs:
13+
release-plz:
14+
name: Release-plz
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
- name: Install Rust (rustup)
22+
run: rustup update stable --no-self-update && rustup default stable
23+
- name: Run release-plz
24+
uses: MarcoIeni/[email protected]
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

.release-plz.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[workspace]
2+
git_tag_name = "v{{ version }}"

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Changelog
2+
3+
## [Unreleased]
4+
5+
## [0.1.51](https://github.com/rust-lang/cmake-rs/compare/v0.1.50...v0.1.51) - 2024-08-15
6+
7+
### Added
8+
9+
- Add JOM generator support ([#183](https://github.com/rust-lang/cmake-rs/pull/183))
10+
- Improve visionOS support ([#209](https://github.com/rust-lang/cmake-rs/pull/209))
11+
- Use `Generic` for bare-metal systems ([#187](https://github.com/rust-lang/cmake-rs/pull/187))
12+
13+
### Fixed
14+
15+
- Fix cross compilation on android armv7 and x86 ([#186](https://github.com/rust-lang/cmake-rs/pull/186))
16+

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cmake"
3-
version = "0.1.50"
3+
version = "0.1.51"
44
authors = ["Alex Crichton <[email protected]>"]
55
license = "MIT OR Apache-2.0"
66
readme = "README.md"
@@ -15,4 +15,4 @@ categories = ["development-tools::build-utils"]
1515
edition = "2021"
1616

1717
[dependencies]
18-
cc = "1.0.72"
18+
cc = "1.0.83"

0 commit comments

Comments
 (0)