central-controller.yaml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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: Get Date
  17. # id: get-date
  18. # run: echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
  19. # shell: bash
  20. # - name: Cache Conda
  21. # uses: actions/cache@v4
  22. # with:
  23. # path: ~/miniconda3
  24. # key: ${{ runner.os }}-${{ runner.arch }}-${{ steps.get-date.outputs.today }}-conda-${{ hashFiles('**/environment.yml') }}
  25. - name: Setup Miniconda
  26. uses: conda-incubator/setup-miniconda@v3
  27. with:
  28. conda-remove-defaults: true
  29. miniconda-version: "latest"
  30. auto-update-conda: false
  31. channel-priority: strict
  32. activate-environment: central_controller
  33. environment-file: environment.yml
  34. use-only-tar-bz2: false
  35. - name: Activate Conda
  36. run: |
  37. echo "CONDA_BASE=$(conda info --base)" >> $GITHUB_ENV
  38. source "$CONDA_BASE/etc/profile.d/conda.sh"
  39. conda activate central_controller
  40. - name: Setup CMake
  41. uses: threeal/[email protected]
  42. with:
  43. options: |
  44. CMAKE_BUILD_TYPE=Release
  45. ZT1_CENTRAL_CONTROLLER=1
  46. - name: Build
  47. run: cmake --build . --config Release -- -j 4
  48. - name: SelfTest
  49. run: |
  50. ./build/zerotier-selftest