Skip to content

Commit d812d91

Browse files
committed
Add publish dependency check to CI
1 parent 446d1da commit d812d91

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

.github/workflows/rust.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ on:
2424
- 'Cargo.toml'
2525
- 'Cargo.lock'
2626
- '.github/workflows/rust.yml'
27+
- 'dev/release/check-cargo-dependencies.py'
28+
- 'dev/release/publish-crates.sh'
2729
- 'rust/**'
2830
- 'c/**'
2931
push:
@@ -50,7 +52,7 @@ jobs:
5052
strategy:
5153
fail-fast: false
5254
matrix:
53-
name: ["clippy", "docs", "test", "check", "build", "fmt"]
55+
name: ["clippy", "docs", "test", "check", "check-publish", "build", "fmt"]
5456

5557
name: "${{ matrix.name }}"
5658
runs-on: ubuntu-latest
@@ -67,13 +69,15 @@ jobs:
6769
submodules: 'true'
6870

6971
- name: Clone vcpkg
72+
if: matrix.name != 'check-publish'
7073
uses: actions/checkout@v7
7174
with:
7275
repository: microsoft/vcpkg
7376
ref: ${{ env.VCPKG_REF }}
7477
path: vcpkg
7578

7679
- name: Set up environment variables and bootstrap vcpkg
80+
if: matrix.name != 'check-publish'
7781
env:
7882
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
7983
CMAKE_TOOLCHAIN_FILE: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
@@ -87,6 +91,7 @@ jobs:
8791
echo "CMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE" >> $GITHUB_ENV
8892
8993
- name: Cache vcpkg binaries
94+
if: matrix.name != 'check-publish'
9095
id: cache-vcpkg
9196
uses: actions/cache@v6
9297
with:
@@ -95,7 +100,7 @@ jobs:
95100
key: vcpkg-installed-${{ runner.os }}-${{ runner.arch }}-${{ env.VCPKG_REF }}-3
96101

97102
- name: Install vcpkg dependencies
98-
if: steps.cache-vcpkg.outputs.cache-hit != 'true'
103+
if: matrix.name != 'check-publish' && steps.cache-vcpkg.outputs.cache-hit != 'true'
99104
run: |
100105
./vcpkg/vcpkg install abseil openssl
101106
# Clean up vcpkg buildtrees and downloads to save space
@@ -114,6 +119,7 @@ jobs:
114119
prefix-key: "rust-${{ matrix.name }}-v5"
115120

116121
- name: Free Disk Space (Ubuntu)
122+
if: matrix.name != 'check-publish'
117123
uses: jlumbroso/free-disk-space@main
118124
with:
119125
# Free up space by removing tools we don't need
@@ -126,10 +132,15 @@ jobs:
126132
docker-images: true # Remove docker images (not needed)
127133

128134
- name: Install dependencies
135+
if: matrix.name != 'check-publish'
129136
shell: bash
130137
run: |
131138
sudo apt-get update && sudo apt-get install -y libgeos-dev libgdal-dev
132139
140+
- name: Check publish dependencies
141+
if: matrix.name == 'check-publish'
142+
run: python3 dev/release/check-cargo-dependencies.py --print-publish-order
143+
133144
- name: Check
134145
if: matrix.name == 'check'
135146
run: |

0 commit comments

Comments
 (0)