redox/.gitlab-ci.yml
2026-07-26 14:43:36 +07:00

64 lines
1.9 KiB
YAML

# The GitLab Continuous Integration configuration
variables:
GIT_STRATEGY: "clone"
stages:
- lint
- test
workflow:
rules:
- if: '$CI_COMMIT_BRANCH == "master" && $CI_PROJECT_NAMESPACE == "redox-os"'
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"'
fmt:
image: "rust:trixie"
stage: lint
script:
- rustup component add rustfmt
- cargo fmt -- --check
cargo-test:
image: "rust:trixie"
stage: lint
script:
# warnings are annoying for user
- export RUSTFLAGS="-Dwarnings"
- cargo test --locked
fetch-changed:
image: "redoxos/redox-base-x86_64"
stage: test
script:
- echo 'progress = bar:force:noscroll' > /etc/wgetrc
- curl "https://sh.rustup.rs" -sSf | sh -s -- -y --default-toolchain stable --profile minimal
- export PATH="$HOME/.cargo/bin:$PATH" PODMAN_BUILD=0 SKIP_CHECK_TOOLS=1
- make prefix/x86_64-unknown-redox/gcc-install
- ln -s gcc-install prefix/x86_64-unknown-redox/sysroot
- |
(cd prefix/x86_64-unknown-redox/sysroot &&
sed "s|/usr/share|$(pwd)/share|g" "bin/libtoolize.orig" > "bin/libtoolize")
- ./scripts/fetch-changed.sh
img:
image: "redoxos/redox-base-x86_64"
stage: test
script:
- echo 'progress = bar:force:noscroll' > /etc/wgetrc
- curl "https://sh.rustup.rs" -sSf | sh -s -- -y --default-toolchain stable --profile minimal
- export PATH="$HOME/.cargo/bin:$PATH"
- export PODMAN_BUILD=0 SKIP_CHECK_TOOLS=1 REPO_BINARY=1 FSTOOLS_NO_MOUNT=1 COOKBOOK_VERBOSE=false
- make ci-img IMG_TAG=$CI_COMMIT_REF_NAME
pkg:
image: "rust:trixie"
stage: test
script:
- |
export PATH="$HOME/.cargo/bin:$PATH" PODMAN_BUILD=0 &&
make CONFIG_NAME=ci SKIP_CHECK_TOOLS=1 repo-tree ARCH=x86_64 &&
make CONFIG_NAME=ci SKIP_CHECK_TOOLS=1 repo-tree ARCH=i586 &&
make CONFIG_NAME=ci SKIP_CHECK_TOOLS=1 repo-tree ARCH=aarch64 &&
make CONFIG_NAME=ci SKIP_CHECK_TOOLS=1 repo-tree ARCH=riscv64gc