Skip to content

Commit d94c43b

Browse files
sdroegebilelmoussaoui
authored andcommitted
Don't checkout submodules by default
This makes sure that cargo does not clone and checkout all the submodules if pointing to this repository as a git dependency. To checkout the submodules `git submodule update --checkout` can be used.
1 parent 5ed4b88 commit d94c43b

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

.github/workflows/CI.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,18 @@ jobs:
103103

104104
regen_check:
105105
name: regen checker
106-
runs-on: ubuntu-22.04
106+
runs-on: ubuntu-latest
107107
steps:
108108
- uses: actions/checkout@v2
109109
with:
110110
submodules: "recursive"
111+
set-safe-directory: true
111112
- uses: actions-rs/toolchain@v1
112113
with:
113114
profile: minimal
114115
toolchain: stable
115116
override: true
117+
- run: git submodule update --checkout
116118
- run: python3 ./generator.py --yes ./
117119
- run: git diff --exit-code
118120

@@ -123,11 +125,13 @@ jobs:
123125
- uses: actions/checkout@v2
124126
with:
125127
submodules: recursive
128+
set-safe-directory: true
126129
- uses: actions-rs/toolchain@v1
127130
with:
128131
profile: minimal
129132
toolchain: stable
130133
override: true
134+
- run: git submodule update --checkout
131135
- run: cargo install rustdoc-stripper
132136
- run: python3 generator.py --embed-docs
133137
- run: python3 generator.py --strip-docs

.github/workflows/docs.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,15 @@ jobs:
4242
- uses: actions/checkout@v2
4343
with:
4444
submodules: "recursive"
45+
set-safe-directory: true
4546
- uses: actions-rs/toolchain@v1
4647
with:
4748
profile: minimal
4849
toolchain: nightly
4950
override: true
5051
components: rustfmt
51-
- working-directory: gir
52-
run: cargo build --release
52+
- run: git config --global --add safe.directory /__w/gtk4-rs/gtk4-rs
53+
- run: git submodule update --checkout
5354
- run: cargo install rustdoc-stripper
5455
- run: git clone https://gitlab.gnome.org/World/Rust/gir-rustdoc/ # checkout action doesn't support random urls
5556
- run: python3 ./generator.py --embed-docs --yes ./

.gitmodules

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
[submodule "gir"]
22
path = gir
3-
url = https://github.com/gtk-rs/gir.git
3+
url = https://github.com/gtk-rs/gir
4+
update = none
45
[submodule "gir-files"]
56
path = gir-files
6-
url = https://github.com/gtk-rs/gir-files.git
7+
url = https://github.com/gtk-rs/gir-files
8+
update = none

0 commit comments

Comments
 (0)