build.yml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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
  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: Set up cargo cache
  50. uses: Swatinem/rust-cache@v2
  51. continue-on-error: false
  52. with:
  53. key: ${{ runner.os }}-cargo-${{ hashFiles('rustybits//Cargo.lock') }}
  54. shared-key: ${{ runner.os }}-cargo-
  55. workspaces: |
  56. rustybits/
  57. - name: make
  58. run: make
  59. - name: selftest
  60. run: |
  61. make selftest
  62. ./zerotier-selftest
  63. build_windows:
  64. runs-on: windows-latest
  65. steps:
  66. - name: gitconfig
  67. run: |
  68. git config --global core.autocrlf true
  69. # git config --global core.eol lf
  70. - name: checkout
  71. uses: actions/checkout@v3
  72. - name: Install Rust
  73. uses: actions-rs/toolchain@v1
  74. with:
  75. toolchain: stable
  76. target: aarch64-apple-darwin
  77. override: true
  78. components: rustfmt, clippy
  79. - name: Set up cargo cache
  80. uses: Swatinem/rust-cache@v2
  81. continue-on-error: false
  82. with:
  83. key: ${{ runner.os }}-cargo-${{ hashFiles('rustybits//Cargo.lock') }}
  84. shared-key: ${{ runner.os }}-cargo-
  85. workspaces: |
  86. rustybits/
  87. - name: setup msbuild
  88. uses: microsoft/[email protected]
  89. - name: msbuild
  90. run: |
  91. msbuild windows\ZeroTierOne.sln /m /p:Configuration=Release /property:Platform=x64 /t:ZeroTierOne