Files
RedBear-OS/.gitlab-ci.yml
T
2026-03-17 19:30:17 +07:00

85 lines
2.1 KiB
YAML

image: "redoxos/redoxer:latest"
variables:
GIT_SUBMODULE_STRATEGY: recursive
workflow:
rules:
- if: '$CI_COMMIT_BRANCH == "master" && $CI_PROJECT_NAMESPACE == "redox-os"'
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"'
stages:
- build
- cross-build
- test
# TODO: benchmarks and profiling (maybe manually enabled for relevant MRs)?
x86_64:
stage: build
script:
- mkdir -p target/${ARCH}
- redoxer env make BUILD=target/${ARCH}
variables:
ARCH: "x86_64"
aarch64:
stage: cross-build
image: "redoxos/redoxer:aarch64"
script:
- mkdir -p target/${ARCH}
- redoxer env make BUILD=target/${ARCH}
variables:
ARCH: "aarch64"
i586:
stage: cross-build
script:
- mkdir -p target/${ARCH}
- TARGET=${ARCH}-unknown-redox redoxer env make BUILD=target/${ARCH}
variables:
ARCH: "i586"
riscv64gc:
stage: cross-build
script:
- mkdir -p target/${ARCH}
- TARGET=${ARCH}-unknown-redox redoxer env make BUILD=target/${ARCH}
variables:
ARCH: "riscv64gc"
fmt:
stage: build
script:
- rustup component add rustfmt
- rustfmt --check
x86_64:boot:
stage: test
needs: [x86_64]
script:
- mkdir -p target/${ARCH}
- export COOKBOOK_SOURCE_IDENT=$CI_COMMIT_SHA
- redoxer env make BUILD=target/${ARCH}
- timeout -s KILL 9m redoxer exec --folder target/${ARCH}/:/usr/lib/boot uname -a
variables:
ARCH: "x86_64"
x86_64:relibc:
stage: test
needs: [x86_64]
script:
- mkdir -p target/${ARCH}
- redoxer env make BUILD=target/${ARCH}
- redoxer pkg relibc-tests-bins
- mkdir -p target/${TARGET}/sysroot/usr/lib/boot
- cp target/${ARCH}/kernel target/${TARGET}/sysroot/usr/lib/boot/
- (cd target/${TARGET}/sysroot/root/relibc-tests && mv expected/bins_dynamic/* expected/)
# TODO: pkg command need to be polished
- rm -rf target/${TARGET}/sysroot/{etc,pkg,include,share}
- timeout -s KILL 9m redoxer exec --folder target/${TARGET}/sysroot/:/ sh -c "cd /root/relibc-tests && sh -e ./run.sh"
# Not guaranteed to succeed all of them
allow_failure: true
variables:
ARCH: "x86_64"
TARGET: "x86_64-unknown-redox"