Add CI from cookbook

This commit is contained in:
Wildan Mubarok 2025-11-21 13:29:23 +00:00 committed by Jeremy Soller
parent b5cdf702aa
commit 3a9a610d10
2 changed files with 26 additions and 10 deletions

View File

@ -1,15 +1,27 @@
# The GitLab Continuous Integration configuration
image: "ubuntu:24.04"
variables:
GIT_STRATEGY: "clone"
GIT_SUBMODULE_STRATEGY: "recursive"
stages:
- lint
- test
- retag
fmt:
stage: lint
script:
- rustup component add rustfmt
- cargo fmt -- --check
cargo-test:
stage: lint
script:
# TODO: we should omit fuse from cargo install chains
- apt update && apt install -y fuse3 libfuse3-dev
- cargo test --locked
img:
image: "ubuntu:24.04"
stage: test
rules:
- if: '$CI_COMMIT_BRANCH == "master" && $CI_PROJECT_NAMESPACE == "redox-os"'
@ -35,16 +47,14 @@ img:
help2man \
autoconf \
automake \
zstd &&
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none
zstd
script:
- |
source "$HOME/.cargo/env" &&
export PATH="$HOME/.cargo/bin:$PATH" &&
bash podman/rustinstall.sh &&
cargo build --manifest-path installer/Cargo.toml --release &&
PODMAN_BUILD=0 REPO_BINARY=1 make ci-img IMG_TAG=$CI_COMMIT_REF_NAME &&
PODMAN_BUILD=0 REPO_BINARY=1 COOKBOOK_VERBOSE=false make ci-img IMG_TAG=$CI_COMMIT_REF_NAME &&
([ $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master" ] && rm -rf build/img/* || true)
artifacts:
paths:
- build/img/
expire_in: 1 week
expire_in: 1 week

View File

@ -411,7 +411,13 @@ fn build_auto_deps(
}
fn get_remote_url(name: &PackageName, ext: &str) -> String {
return format!("{}/{}/{}.{}", REMOTE_PKG_SOURCE, redoxer::target(), name, ext);
return format!(
"{}/{}/{}.{}",
REMOTE_PKG_SOURCE,
redoxer::target(),
name,
ext
);
}
fn get_pubkey_url() -> String {
return format!("{}/id_ed25519.pub.toml", REMOTE_PKG_SOURCE);