central-controller.yaml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 }}-${{ github.ref_name }}-conda-${{ hashFiles('environment.yml') }}
  27. - name: Update Conda Environment
  28. if: steps.cache.outputs.cache-hit != 'true'
  29. run: |
  30. source ~/miniconda3/etc/profile.d/conda.sh
  31. conda env update --file environment.yml
  32. - name: Build
  33. run: |
  34. source ~/miniconda3/etc/profile.d/conda.sh
  35. conda activate central_controller
  36. cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DZT1_CENTRAL_CONTROLLER=1
  37. cmake --build build/ --target all -j4 --verbose
  38. - name: SelfTest
  39. run: |
  40. ./build/zerotier-selftest