build.yml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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 input
  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: x86_64-unknown-linux-gnu
  17. override: true
  18. components: rustfmt, clippy
  19. - name: Set up cargo cache
  20. uses: Swatinem/rust-cache@v2
  21. continue-on-error: false
  22. with:
  23. key: ${{ runner.os }}-cargo-${{ hashFiles('rustybits//Cargo.lock') }}
  24. shared-key: ${{ runner.os }}-cargo-
  25. workspaces: |
  26. rustybits/
  27. - name: make
  28. run: make
  29. - name: selftest
  30. run: |
  31. make selftest
  32. ./zerotier-selftest
  33. build_macos:
  34. runs-on: macos-latest
  35. steps:
  36. - name: gitconfig
  37. run: |
  38. git config --global core.autocrlf input
  39. # git config --global core.eol lf
  40. - name: checkout
  41. uses: actions/checkout@v3
  42. - name: Install Rust aarch64
  43. uses: actions-rs/toolchain@v1
  44. with:
  45. toolchain: stable
  46. target: aarch64-apple-darwin
  47. override: true
  48. components: rustfmt, clippy
  49. - name: Install Rust x86_64
  50. uses: actions-rs/toolchain@v1
  51. with:
  52. toolchain: stable
  53. target: x86_64-apple-darwin
  54. override: true
  55. components: rustfmt, clippy
  56. - name: Set up cargo cache
  57. uses: Swatinem/rust-cache@v2
  58. continue-on-error: false
  59. with:
  60. key: ${{ runner.os }}-cargo-${{ hashFiles('rustybits//Cargo.lock') }}
  61. shared-key: ${{ runner.os }}-cargo-
  62. workspaces: |
  63. rustybits/
  64. - name: make
  65. run: make
  66. - name: selftest
  67. run: |
  68. make selftest
  69. ./zerotier-selftest
  70. build_windows:
  71. runs-on: windows-latest
  72. steps:
  73. - name: gitconfig
  74. run: |
  75. git config --global core.autocrlf true
  76. # git config --global core.eol lf
  77. - name: checkout
  78. uses: actions/checkout@v3
  79. - name: Install Rust
  80. uses: actions-rs/toolchain@v1
  81. with:
  82. toolchain: stable
  83. target: aarch64-apple-darwin
  84. override: true
  85. components: rustfmt, clippy
  86. - name: Set up cargo cache
  87. uses: Swatinem/rust-cache@v2
  88. continue-on-error: false
  89. with:
  90. key: ${{ runner.os }}-cargo-${{ hashFiles('rustybits//Cargo.lock') }}
  91. shared-key: ${{ runner.os }}-cargo-
  92. workspaces: |
  93. rustybits/
  94. - name: setup msbuild
  95. uses: microsoft/[email protected]
  96. - name: msbuild
  97. run: |
  98. msbuild windows\ZeroTierOne.sln /m /p:Configuration=Release /property:Platform=x64 /t:ZeroTierOne