Skip to content
This repository was archived by the owner on Mar 4, 2024. It is now read-only.

Commit ec9a361

Browse files
committed
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 623e0d0 commit ec9a361

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

.github/workflows/CI.yml

+2
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,12 @@ jobs:
139139
- uses: actions/checkout@v2
140140
with:
141141
submodules: recursive
142+
set-safe-directory: true
142143
- uses: actions-rs/toolchain@v1
143144
with:
144145
profile: minimal
145146
toolchain: stable
146147
override: true
148+
- run: git submodule update --checkout
147149
- run: python3 generator.py
148150
- run: git diff --exit-code

.github/workflows/docs.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ name: docs
1010

1111
jobs:
1212
docs:
13-
runs-on: ubuntu-latest
13+
runs-on: ubuntu-22.04
1414
name: build
1515
container:
1616
image: ghcr.io/gtk-rs/gtk3-rs/gtk3:latest
@@ -23,14 +23,14 @@ jobs:
2323
- uses: actions/checkout@v2
2424
with:
2525
submodules: recursive
26+
set-safe-directory: true
2627
- uses: actions-rs/toolchain@v1
2728
with:
2829
profile: minimal
2930
toolchain: nightly
3031
override: true
3132
components: rustfmt
32-
- working-directory: gir
33-
run: cargo build --release
33+
- run: git submodule update --checkout
3434
- run: cargo install rustdoc-stripper
3535
- run: python3 ./generator.py --embed-docs --yes ./
3636
- run: git clone https://gitlab.gnome.org/World/Rust/gir-rustdoc/ # checkout action doesn't support random urls

.gitmodules

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

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ file as follows:
4141
$ python3 generator.py
4242
```
4343

44+
If you didn't do so yet, please check out all the submodules before via
45+
46+
```bash
47+
$ git submodule update --checkout
48+
```
49+
4450
## Development
4551

4652
This repository is mostly split into two branches: `master` and `crate`.

0 commit comments

Comments
 (0)