.gitlab-ci.yml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 -C tests verify
  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. - make -C tests all
  43. fmt:
  44. stage: test
  45. script:
  46. - rustup component add rustfmt-preview
  47. - ./fmt.sh -- --check
  48. allow_failure: true