central-controller.yaml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # on:
  2. # workflow_dispatch:
  3. on:
  4. push:
  5. workflow_dispatch:
  6. jobs:
  7. central_controller:
  8. name: Central Controller Build
  9. strategy:
  10. matrix:
  11. runner: [gha-runner-x64, gha-runner-arm64]
  12. runs-on: ${{ matrix.runner }}
  13. steps:
  14. - name: checkout
  15. uses: actions/checkout@v4
  16. - name: Setup Miniconda
  17. uses: conda-incubator/setup-miniconda@v3
  18. with:
  19. miniconda-version: latest
  20. activate-environment: central_controller
  21. - name: Conda Environment Cache
  22. id: cache
  23. uses: actions/cache@v4
  24. with:
  25. path: ${{ env.CONDA }}/envs
  26. key: ${{ runner.os }}-${{ runner.arch }}-conda-${{ hashFiles('environment.yml') }}
  27. - name: Update Conda Environment
  28. run: |
  29. source ~/miniconda3/etc/profile.d/conda.sh
  30. conda env update --file environment.yml
  31. - name: Build
  32. run: |
  33. source ~/miniconda3/etc/profile.d/conda.sh
  34. conda activate central_controller
  35. cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DZT1_CENTRAL_CONTROLLER=1
  36. cmake --build build/ --target all -j4 --verbose
  37. - name: SelfTest
  38. run: |
  39. ./build/zerotier-selftest