.gitlab-ci.yml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. image: "redoxos/redoxer:latest"
  2. stages:
  3. - build
  4. - test
  5. before_script:
  6. - apt-get update -qq
  7. - apt-get install -qq git
  8. - git submodule update --init --recursive
  9. cache:
  10. paths:
  11. - target/
  12. build:linux:
  13. stage: build
  14. script:
  15. - rustup toolchain add "$(cat rust-toolchain)"
  16. - rustup show # Print version info for debugging
  17. - make -j "$(nproc)" all
  18. build:redox:
  19. stage: build
  20. variables:
  21. TARGET: x86_64-unknown-redox
  22. script:
  23. - export RUSTUP_TOOLCHAIN="$HOME/.redoxer/toolchain"
  24. - export PATH="$RUSTUP_TOOLCHAIN/bin:$PATH"
  25. - rustup show # Print version info for debugging
  26. - make -j "$(nproc)" all
  27. test:linux:
  28. stage: test
  29. dependencies:
  30. - build:linux
  31. script:
  32. - make test
  33. test:redox:
  34. stage: test
  35. dependencies:
  36. - build:redox
  37. variables:
  38. TARGET: x86_64-unknown-redox
  39. script:
  40. - export RUSTUP_TOOLCHAIN="$HOME/.redoxer/toolchain"
  41. - export PATH="$RUSTUP_TOOLCHAIN/bin:$PATH"
  42. - export TEST_RUNNER="redoxer exec --folder . -- sh --"
  43. - make test
  44. fmt:
  45. stage: test
  46. script:
  47. - rustup component add rustfmt-preview
  48. - ./fmt.sh -- --check
  49. allow_failure: true