.gitlab-ci.yml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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 CARGO_TEST="redoxer"
  42. - export RUSTUP_TOOLCHAIN="$HOME/.redoxer/toolchain"
  43. - export PATH="$RUSTUP_TOOLCHAIN/bin:$PATH"
  44. - export TEST_RUNNER="redoxer exec --folder . -- sh --"
  45. - make test
  46. fmt:
  47. stage: test
  48. script:
  49. - rustup component add rustfmt-preview
  50. - ./fmt.sh -- --check
  51. allow_failure: true