.gitlab-ci.yml 1.6 KB

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