mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-17 15:34:18 +08:00
67 lines
1.7 KiB
YAML
67 lines
1.7 KiB
YAML
# The GitLab Continuous Integration configuration
|
|
|
|
variables:
|
|
GIT_STRATEGY: "clone"
|
|
|
|
stages:
|
|
- lint
|
|
- test
|
|
|
|
fmt:
|
|
stage: lint
|
|
rules:
|
|
- if: '$CI_COMMIT_BRANCH == "master" && $CI_PROJECT_NAMESPACE == "redox-os"'
|
|
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"'
|
|
script:
|
|
- rustup component add rustfmt
|
|
- cargo fmt -- --check
|
|
|
|
cargo-test:
|
|
stage: lint
|
|
rules:
|
|
- if: '$CI_COMMIT_BRANCH == "master" && $CI_PROJECT_NAMESPACE == "redox-os"'
|
|
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"'
|
|
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"'
|
|
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"'
|
|
before_script:
|
|
# Disable the wget progress bar
|
|
- echo 'show-progress = off' >> ~/.wgetrc
|
|
- |
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
apt-get update -qq &&
|
|
apt-get install -qq \
|
|
bison \
|
|
build-essential \
|
|
curl \
|
|
flex \
|
|
fuse3 \
|
|
git \
|
|
libfuse-dev \
|
|
nasm \
|
|
pkg-config \
|
|
texinfo \
|
|
wget \
|
|
help2man \
|
|
autoconf \
|
|
automake \
|
|
zstd
|
|
script:
|
|
- |
|
|
export PATH="$HOME/.cargo/bin:$PATH" &&
|
|
bash podman/rustinstall.sh &&
|
|
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
|