check.yml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. name: check
  2. on:
  3. pull_request:
  4. paths-ignore:
  5. - 'Firestore/**'
  6. push:
  7. branches: main
  8. concurrency:
  9. group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  10. cancel-in-progress: true
  11. jobs:
  12. check:
  13. # Don't run on private repo.
  14. if: github.repository == 'Firebase/firebase-ios-sdk'
  15. runs-on: ubuntu-latest
  16. env:
  17. MINT_PATH: ${{ github.workspace }}/mint
  18. steps:
  19. - uses: actions/checkout@v4
  20. - uses: actions/setup-python@v5
  21. with:
  22. python-version: 3.11
  23. # clang-format is available on ubuntu images
  24. # - name: Install clang-format
  25. # run: |
  26. # sudo apt-get update -y
  27. # sudo apt-get install -y clang-format
  28. - name: Install mint
  29. run: |
  30. eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
  31. # echo "/home/linuxbrew/.linuxbrew/bin/brew" >> $GITHUB_ENV
  32. brew install mint
  33. brew install clang-format@20
  34. echo 'export PATH="/home/linuxbrew/.linuxbrew/opt/clang-format/bin:$PATH"' >> /home/runner/.bash_profile
  35. # sudo apt-get update -y
  36. # sudo apt-get install -y mint
  37. # Install clang-format and mint using apt-get
  38. - name: Cache Mint packages
  39. uses: actions/cache@v4
  40. with:
  41. path: ${{ env.MINT_PATH }}
  42. key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }}
  43. restore-keys: ${{ runner.os }}-mint-
  44. - name: Setup check
  45. run: |
  46. eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
  47. scripts/setup_check.sh
  48. - name: Check
  49. run: scripts/check.sh --test-only