2
0

.gitlab-ci.yml 1.5 KB

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