Skip to content

Commit

Permalink
ci: use static cargo-c version for manual build as well
Browse files Browse the repository at this point in the history
radhermit committed Jun 21, 2024
1 parent d815c42 commit 910e673
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .ci/buildlib
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ doecho() {
"$@"
}

: ${CARGO_C_RELEASE:=v0.9.29}
: ${CARGO_C_VERSION:=0.9.29}
: ${PKGCRAFT_C_REF:=main}
echo Building pkgcraft-c on ${OSTYPE} for ${HOSTTYPE}

@@ -42,15 +42,15 @@ install_pkgs() {
# install binary cargo-c package if available
if [[ ${OSTYPE} == "linux-"* ]]; then
if [[ ${HOSTTYPE} == "aarch64" ]]; then
curl -L https://github.com/lu-zero/cargo-c/releases/download/${CARGO_C_RELEASE}/cargo-c-aarch64-unknown-linux-musl.tar.gz | tar xvzf - -C "${HOME}"/.cargo/bin
curl -L https://github.com/lu-zero/cargo-c/releases/download/v${CARGO_C_VERSION}/cargo-c-aarch64-unknown-linux-musl.tar.gz | tar xvzf - -C "${HOME}"/.cargo/bin
elif [[ ${HOSTTYPE} == "x86_64" ]]; then
curl -L https://github.com/lu-zero/cargo-c/releases/download/${CARGO_C_RELEASE}/cargo-c-x86_64-unknown-linux-musl.tar.gz | tar xvzf - -C "${HOME}"/.cargo/bin
curl -L https://github.com/lu-zero/cargo-c/releases/download/v${CARGO_C_VERSION}/cargo-c-x86_64-unknown-linux-musl.tar.gz | tar xvzf - -C "${HOME}"/.cargo/bin
else
SOURCE_CARGO_C=true
fi
elif [[ ${OSTYPE} == "darwin"* ]]; then
if [[ ${HOSTTYPE} == "x86_64" ]]; then
curl -L https://github.com/lu-zero/cargo-c/releases/download/${CARGO_C_RELEASE}/cargo-c-macos.zip > cargo-c.zip
curl -L https://github.com/lu-zero/cargo-c/releases/download/v${CARGO_C_VERSION}/cargo-c-macos.zip > cargo-c.zip
unzip -o cargo-c.zip -d "${HOME}"/.cargo/bin
rm cargo-c.zip
else
@@ -59,7 +59,7 @@ elif [[ ${OSTYPE} == "darwin"* ]]; then
fi

# manually build cargo-c for arches without native binaries
[[ -n ${SOURCE_CARGO_C} ]] && doecho cargo install cargo-c
[[ -n ${SOURCE_CARGO_C} ]] && doecho cargo install cargo-c@{CARGO_C_VERSION}
# output cargo-c version
cargo cinstall --version

0 comments on commit 910e673

Please sign in to comment.