build.yml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. on: [ push ]
  2. jobs:
  3. build_ubuntu:
  4. runs-on: ubuntu-latest
  5. steps:
  6. - name: gitconfig
  7. run: |
  8. git config --global core.autocrlf false
  9. git config --global core.eol lf
  10. - name: checkout
  11. uses: actions/checkout@v3
  12. - name: Install Rust
  13. uses: actions-rs/toolchain@v1
  14. with:
  15. toolchain: stable
  16. target: aarch64-apple-darwin
  17. override: true
  18. components: rustfmt, clippy
  19. - name: Set up cargo cache
  20. uses: actions/cache@v3
  21. continue-on-error: false
  22. with:
  23. path: |
  24. ~/.cargo/bin/
  25. ~/.cargo/registry/index/
  26. ~/.cargo/registry/cache/
  27. ~/.cargo/git/db/
  28. target/
  29. key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
  30. restore-keys: ${{ runner.os }}-cargo-
  31. - name: make
  32. run: make
  33. - name: selftest
  34. run: |
  35. make selftest
  36. ./zerotier-selftest
  37. build_macos:
  38. runs-on: macos-latest
  39. steps:
  40. - name: gitconfig
  41. run: |
  42. git config --global core.autocrlf false
  43. git config --global core.eol lf
  44. - name: checkout
  45. uses: actions/checkout@v3
  46. - name: Install Rust
  47. uses: actions-rs/toolchain@v1
  48. with:
  49. toolchain: stable
  50. target: aarch64-apple-darwin
  51. override: true
  52. components: rustfmt, clippy
  53. - name: Set up cargo cache
  54. uses: actions/cache@v3
  55. continue-on-error: false
  56. with:
  57. path: |
  58. ~/.cargo/bin/
  59. ~/.cargo/registry/index/
  60. ~/.cargo/registry/cache/
  61. ~/.cargo/git/db/
  62. target/
  63. key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
  64. restore-keys: ${{ runner.os }}-cargo-
  65. - name: make
  66. run: make
  67. - name: selftest
  68. run: |
  69. make selftest
  70. ./zerotier-selftest
  71. build_windows:
  72. runs-on: windows-latest
  73. steps:
  74. - name: gitconfig
  75. run: |
  76. git config --global core.autocrlf false
  77. git config --global core.eol lf
  78. - name: checkout
  79. uses: actions/checkout@v3
  80. - name: Install Rust
  81. uses: actions-rs/toolchain@v1
  82. with:
  83. toolchain: stable
  84. target: aarch64-apple-darwin
  85. override: true
  86. components: rustfmt, clippy
  87. - name: Set up cargo cache
  88. uses: actions/cache@v3
  89. continue-on-error: false
  90. with:
  91. path: |
  92. ~/.cargo/bin/
  93. ~/.cargo/registry/index/
  94. ~/.cargo/registry/cache/
  95. ~/.cargo/git/db/
  96. target/
  97. key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
  98. restore-keys: ${{ runner.os }}-cargo-
  99. - name: setup msbuild
  100. uses: microsoft/[email protected]
  101. - name: msbuild
  102. run: |
  103. msbuild windows\ZeroTierOne.sln /m /p:Configuration=Release /property:Platform=x64 /t:ZeroTierOne:Rebuild