2
0

.gitlab-ci.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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 show # Print version info for debugging
  19. - make -j "$(nproc)" all
  20. build:redox:
  21. stage: build
  22. variables:
  23. TARGET: x86_64-unknown-redox
  24. script:
  25. - export RUSTUP_TOOLCHAIN="$HOME/.redoxer/toolchain"
  26. - export PATH="$RUSTUP_TOOLCHAIN/bin:$PATH"
  27. - rustup show # Print version info for debugging
  28. - make -j "$(nproc)" all
  29. test:linux:
  30. stage: test
  31. needs:
  32. - build:linux
  33. dependencies:
  34. - build:linux
  35. script:
  36. - make test
  37. test:redox:
  38. stage: test
  39. needs:
  40. - build:redox
  41. dependencies:
  42. - build:redox
  43. variables:
  44. TARGET: x86_64-unknown-redox
  45. script:
  46. - export CARGO_TEST="redoxer"
  47. - export RUSTUP_TOOLCHAIN="$HOME/.redoxer/toolchain"
  48. - export PATH="$RUSTUP_TOOLCHAIN/bin:$PATH"
  49. - export TEST_RUNNER="redoxer exec --folder . -- sh --"
  50. - make test
  51. # TODO: Out of memory
  52. allow_failure: true
  53. fmt:
  54. stage: test
  55. needs: []
  56. script:
  57. - rustup component add rustfmt-preview
  58. - ./fmt.sh -- --check