.gitlab-ci.yml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. image: "rustlang/rust:nightly"
  2. stages:
  3. - build
  4. - test
  5. before_script:
  6. - git submodule update --init --recursive
  7. - rustup toolchain add "$(cat rust-toolchain)"
  8. - rustup target add x86_64-unknown-redox --toolchain "$(cat rust-toolchain)"
  9. - rustup show # Print version info for debugging
  10. # Cache caused some issues with a header not being generated:
  11. # cache:
  12. # untracked: true
  13. build:linux:
  14. stage: build
  15. script:
  16. - make all
  17. build:redox:
  18. stage: build
  19. variables:
  20. TARGET: x86_64-unknown-redox
  21. script:
  22. # Install x86_64-unknown-redox-gcc
  23. # This can't be in before_script because that overrides
  24. # the global before_script.
  25. - apt-get update -qq
  26. - apt-get install -qq apt-transport-https build-essential curl git gnupg software-properties-common
  27. - apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AA12E97F0881517F
  28. - add-apt-repository 'deb https://static.redox-os.org/toolchain/apt /'
  29. - apt-get update -qq && apt-get install -qq x86-64-unknown-redox-gcc
  30. # Main script
  31. - make all
  32. test:linux:
  33. stage: test
  34. dependencies:
  35. - build:linux
  36. script:
  37. - make test
  38. - cd tests && make verify
  39. fmt:
  40. stage: test
  41. script:
  42. - rustup component add rustfmt-preview
  43. - ./fmt.sh -- --check
  44. allow_failure: true