Skip to content

Commit 3339eaa

Browse files
committed
.ci: install git and clone pkgcraft repo before running cargo
1 parent b43cf4b commit 3339eaa

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

.ci/buildlib

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ doecho source "${HOME}"/.cargo/env
1717

1818
# install required libs on linux
1919
install_pkgs() {
20-
local -a packages=( clang )
20+
local -a packages=( clang git )
2121
# non-native targets require openssl headers to compile cargo-c
2222
if [[ ${HOSTTYPE} != "x86_64" ]]; then
2323
packages+=( openssl-devel )
@@ -53,17 +53,17 @@ elif [[ ${OSTYPE} == "darwin"* ]]; then
5353
fi
5454
fi
5555

56+
# clone the pkgcraft repo from a specific tag or branch
57+
doecho git clone -b ${PKGCRAFT_C_REF:-main} --recurse-submodules https://github.com/pkgcraft/pkgcraft.git
58+
5659
if [[ -n ${SOURCE_CARGO_C} ]]; then
5760
# avoid libgit2 usage due to memory problems when emulated under qemu
5861
# https://users.rust-lang.org/t/cargo-uses-too-much-memory-being-run-in-qemu/76531
59-
cargo --config net.git-fetch-with-cli=true update
62+
doecho cargo --config net.git-fetch-with-cli=true update --manifest-path pkgcraft/Cargo.toml
6063

6164
# manually build cargo-c for arches without native binaries
62-
cargo install cargo-c
65+
doecho cargo install cargo-c
6366
fi
6467

65-
# clone the pkgcraft repo from a specific tag or branch
66-
git clone -b ${PKGCRAFT_C_REF:-main} --recurse-submodules https://github.com/pkgcraft/pkgcraft.git
67-
6868
# build and install C library
6969
doecho cargo cinstall --manifest-path pkgcraft/Cargo.toml -p pkgcraft-c --profile bundled

0 commit comments

Comments
 (0)