.gitlab-ci.yml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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 sync --recursive
  9. - git submodule update --init --recursive
  10. cache:
  11. paths:
  12. - target/
  13. build:linux:
  14. stage: build
  15. script:
  16. - rustup toolchain add "$(cat rust-toolchain)"
  17. - rustup show # Print version info for debugging
  18. - make -j "$(nproc)" all
  19. build:redox:
  20. stage: build
  21. variables:
  22. TARGET: x86_64-unknown-redox
  23. script:
  24. - export RUSTUP_TOOLCHAIN="$HOME/.redoxer/toolchain"
  25. - export PATH="$RUSTUP_TOOLCHAIN/bin:$PATH"
  26. - rustup show # Print version info for debugging
  27. - make -j "$(nproc)" all
  28. test:linux:
  29. stage: test
  30. dependencies:
  31. - build:linux
  32. script:
  33. - make test
  34. test:redox:
  35. stage: test
  36. dependencies:
  37. - build:redox
  38. variables:
  39. TARGET: x86_64-unknown-redox
  40. script:
  41. - export RUSTUP_TOOLCHAIN="$HOME/.redoxer/toolchain"
  42. - export PATH="$RUSTUP_TOOLCHAIN/bin:$PATH"
  43. - export TEST_RUNNER="redoxer exec --folder . -- sh --"
  44. - make test
  45. fmt:
  46. stage: test
  47. script:
  48. - rustup component add rustfmt-preview
  49. - ./fmt.sh -- --check
  50. allow_failure: true