main.yml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. name: CI
  2. on: [push, pull_request]
  3. jobs:
  4. test:
  5. name: Test
  6. runs-on: ${{ matrix.os }}
  7. strategy:
  8. matrix:
  9. include:
  10. - target: aarch64-unknown-linux-gnu
  11. os: ubuntu-latest
  12. rust: nightly
  13. - target: arm-unknown-linux-gnueabi
  14. os: ubuntu-latest
  15. rust: nightly
  16. - target: arm-unknown-linux-gnueabihf
  17. os: ubuntu-latest
  18. rust: nightly
  19. - target: i586-unknown-linux-gnu
  20. os: ubuntu-latest
  21. rust: nightly
  22. - target: i686-unknown-linux-gnu
  23. os: ubuntu-latest
  24. rust: nightly
  25. - target: mips-unknown-linux-gnu
  26. os: ubuntu-latest
  27. rust: nightly
  28. - target: mips64-unknown-linux-gnuabi64
  29. os: ubuntu-latest
  30. rust: nightly
  31. - target: mips64el-unknown-linux-gnuabi64
  32. os: ubuntu-latest
  33. rust: nightly
  34. - target: mipsel-unknown-linux-gnu
  35. os: ubuntu-latest
  36. rust: nightly
  37. - target: powerpc-unknown-linux-gnu
  38. os: ubuntu-latest
  39. rust: nightly
  40. - target: powerpc64-unknown-linux-gnu
  41. os: ubuntu-latest
  42. rust: nightly
  43. - target: powerpc64le-unknown-linux-gnu
  44. os: ubuntu-latest
  45. rust: nightly
  46. - target: thumbv6m-none-eabi
  47. os: ubuntu-latest
  48. rust: nightly
  49. - target: thumbv7em-none-eabi
  50. os: ubuntu-latest
  51. rust: nightly
  52. - target: thumbv7em-none-eabihf
  53. os: ubuntu-latest
  54. rust: nightly
  55. - target: thumbv7m-none-eabi
  56. os: ubuntu-latest
  57. rust: nightly
  58. - target: wasm32-unknown-unknown
  59. os: ubuntu-latest
  60. rust: nightly
  61. - target: x86_64-unknown-linux-gnu
  62. os: ubuntu-latest
  63. rust: nightly
  64. - target: x86_64-apple-darwin
  65. os: macos-latest
  66. rust: nightly
  67. - target: i686-pc-windows-msvc
  68. os: windows-latest
  69. rust: nightly
  70. - target: x86_64-pc-windows-msvc
  71. os: windows-latest
  72. rust: nightly
  73. - target: i686-pc-windows-gnu
  74. os: windows-latest
  75. rust: nightly-i686-gnu
  76. - target: x86_64-pc-windows-gnu
  77. os: windows-latest
  78. rust: nightly-x86_64-gnu
  79. steps:
  80. - uses: actions/checkout@v1
  81. with:
  82. submodules: true
  83. - name: Install Rust (rustup)
  84. run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
  85. shell: bash
  86. - run: rustup target add ${{ matrix.target }}
  87. - run: rustup component add llvm-tools-preview
  88. - name: Download compiler-rt reference sources
  89. run: |
  90. curl -L -o code.tar.gz https://github.com/rust-lang/llvm-project/archive/rustc/10.0-2020-05-05.tar.gz
  91. tar xzf code.tar.gz --strip-components 1 llvm-project-rustc-10.0-2020-05-05/compiler-rt
  92. echo RUST_COMPILER_RT_ROOT=./compiler-rt >> $GITHUB_ENV
  93. shell: bash
  94. # Non-linux tests just use our raw script
  95. - run: ./ci/run.sh ${{ matrix.target }}
  96. if: matrix.os != 'ubuntu-latest'
  97. shell: bash
  98. # Otherwise we use our docker containers to run builds
  99. - run: cargo generate-lockfile && ./ci/run-docker.sh ${{ matrix.target }}
  100. if: matrix.os == 'ubuntu-latest'
  101. rustfmt:
  102. name: Rustfmt
  103. runs-on: ubuntu-latest
  104. steps:
  105. - uses: actions/checkout@v1
  106. with:
  107. submodules: true
  108. - name: Install Rust
  109. run: rustup update stable && rustup default stable && rustup component add rustfmt
  110. - run: cargo fmt -- --check