Skip to content

Use Shallow Submodule Init to Reduce Clone Times #1603

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 28 additions & 8 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, ubuntu-24.04]
mode: [newlib, linux, musl, uclibc]
Expand All @@ -23,20 +24,39 @@ jobs:
- mode: uclibc
compiler: llvm
steps:
- name: Remove unneeded frameworks to recover disk space

- uses: actions/checkout@v4

- name: install dependencies
run: |
echo "-- Before --"
df -h
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo apt-mark auto '.*' > /dev/null
sudo apt-get update
apt-get install -y --no-install-recommends \
ca-certificates \
# Configure Deps
autoconf \
gcc \
g++ \
gawk \
curl \
# Build Dependencies
make \
git \
texinfo \
bison \
flex \
bzip2 \
zlib1g-dev \
python3 \
libgmp-dev \
libmpfr-dev \
libexpat-dev
sudo apt-get autoremove
echo "-- After --"
df -h

- uses: actions/checkout@v4

- name: install dependencies
run: sudo ./.github/setup-apt.sh

- name: build toolchain
run: |
TARGET_TUPLE=($(echo ${{ matrix.target }} | tr "-" "\n"))
Expand Down
2 changes: 1 addition & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ endif
$(srcdir)/%/.git:
cd $(srcdir) && \
flock `git rev-parse --git-dir`/config git submodule init $(dir $@) && \
flock `git rev-parse --git-dir`/config git submodule update --progress $(dir $@)
flock `git rev-parse --git-dir`/config git submodule update --progress --depth 1 $(dir $@)

stamps/install-host-gcc: $(GCC_SRCDIR) $(GCC_SRC_GIT)
if test -f $</contrib/download_prerequisites && test "@NEED_GCC_EXTERNAL_LIBRARIES@" = "true"; then cd $< && ./contrib/download_prerequisites; fi
Expand Down