action.yaml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. name: watcher
  2. description: Install e-dant/watcher
  3. runs:
  4. using: composite
  5. steps:
  6. -
  7. name: Determine e-dant/watcher version
  8. id: determine-watcher-version
  9. run: echo version="$(gh release view --repo e-dant/watcher --json tagName --template '{{ .tagName }}')" >> "${GITHUB_OUTPUT}"
  10. shell: bash
  11. env:
  12. GH_TOKEN: ${{ github.token }}
  13. -
  14. name: Cache e-dant/watcher
  15. id: cache-watcher
  16. uses: actions/cache@v4
  17. with:
  18. path: watcher/target
  19. key: watcher-${{ runner.os }}-${{ runner.arch }}-${{ steps.determine-watcher-version.outputs.version }}-${{ env.CC && env.CC || 'gcc' }}
  20. -
  21. if: steps.cache-watcher.outputs.cache-hit != 'true'
  22. name: Compile e-dant/watcher
  23. run: |
  24. mkdir watcher
  25. gh release download --repo e-dant/watcher -A tar.gz -O - | tar -xz -C watcher --strip-components 1
  26. cd watcher
  27. cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
  28. cmake --build build
  29. sudo cmake --install build --prefix target
  30. shell: bash
  31. env:
  32. GH_TOKEN: ${{ github.token }}
  33. -
  34. name: Update LD_LIBRARY_PATH
  35. run: |
  36. sudo sh -c "echo ${PWD}/watcher/target/lib > /etc/ld.so.conf.d/watcher.conf"
  37. sudo ldconfig
  38. shell: bash