You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
2.6KB

  1. # Based on the "trust" template v0.1.1
  2. # https://github.com/japaric/trust/tree/v0.1.1
  3. environment:
  4. global:
  5. # TODO This is the Rust channel that build jobs will use by default but can be
  6. # overridden on a case by case basis down below
  7. RUST_VERSION: stable
  8. # TODO Update this to match the name of your project.
  9. CRATE_NAME: gutenberg
  10. matrix:
  11. # GNU
  12. - channel: stable
  13. target: x86_64-pc-windows-gnu
  14. TOOLCHAIN: msys
  15. MSYS_BITS: 64
  16. install:
  17. - ps: >-
  18. If ($Env:TARGET -eq 'x86_64-pc-windows-gnu') {
  19. $Env:PATH += ';C:\msys64\mingw64\bin;C:\Program Files\Git\mingw64\bin'
  20. }
  21. - if "%TOOLCHAIN%" == "msvc" if "%PLATFORM%" == "x86_64" "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64
  22. - if "%TOOLCHAIN%" == "msvc" if "%PLATFORM%" == "x86_64" call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64
  23. - if "%TOOLCHAIN%" == "msys" set PATH=C:\msys64\mingw%MSYS_BITS%\bin;C:\msys64\usr\bin;%PATH%
  24. - curl -sSf -o rustup-init.exe https://win.rustup.rs/
  25. - rustup-init.exe -y --default-host %TARGET% --default-toolchain %RUST_VERSION%
  26. - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
  27. - rustc -Vv
  28. - cargo -V
  29. # TODO This is the "test phase", tweak it as you see fit
  30. test_script:
  31. # we don't run the "test phase" when doing deploys
  32. - if [%APPVEYOR_REPO_TAG%]==[false] (
  33. cargo build --target %TARGET% &&
  34. cargo build --target %TARGET% --release &&
  35. cargo test --target %TARGET% &&
  36. cargo test --target %TARGET% --release
  37. )
  38. before_deploy:
  39. # TODO Update this to build the artifacts that matter to you
  40. - cargo rustc --target %TARGET% --release --bin gutenberg -- -C lto
  41. - ps: ci\before_deploy.ps1
  42. deploy:
  43. artifact: /.*\.zip/
  44. # TODO update `auth_token.secure`
  45. # - Create a `public_repo` GitHub token. Go to: https://github.com/settings/tokens/new
  46. # - Encrypt it. Go to https://ci.appveyor.com/tools/encrypt
  47. # - Paste the output down here
  48. auth_token:
  49. secure: YCRPSTItx+m/3jnDfai52dEZNLYUTSEExF2lZoffULDzlv/t2jOR1fzSSIEi/xyB
  50. description: ''
  51. on:
  52. # TODO Here you can pick which targets will generate binary releases
  53. # In this example, there are some targets that are tested using the stable
  54. # and nightly channels. This condition makes sure there is only one release
  55. # for such targets and that's generated using the stable channel
  56. RUST_VERSION: stable
  57. appveyor_repo_tag: true
  58. provider: GitHub
  59. cache:
  60. - C:\Users\appveyor\.cargo\registry
  61. - target
  62. branches:
  63. only:
  64. # Release tags
  65. - /^v\d+\.\d+\.\d+.*$/
  66. - master
  67. # disable automatic builds
  68. build: false