You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ci.yml 3.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. name: Simple CI
  2. on: [pull_request]
  3. jobs:
  4. lint:
  5. name: Lint
  6. runs-on: ubuntu-latest
  7. steps:
  8. - uses: actions/checkout@v4
  9. - uses: actions/setup-node@v4
  10. with:
  11. node-version: 20
  12. cache: 'npm'
  13. - name: Get changed files
  14. id: changed-files
  15. uses: tj-actions/changed-files@v41
  16. - name: Get changed lang files
  17. id: lang-files
  18. run: echo "all=$(echo "${{ steps.changed-files.outputs.all_changed_files }}" | grep -oE 'lang\/\S+' | tr '\n' ' ')" >> "$GITHUB_OUTPUT"
  19. - run: npm install
  20. - name: Check git status
  21. run: git status
  22. - name: Normalize lang files to ensure sorted
  23. if: steps.lang-files.outputs.all
  24. run: npm run lang-sort
  25. - name: Check lang files are formatted correctly
  26. if: steps.lang-files.outputs.all
  27. run: npm run lint:lang
  28. - name: Check if the git repository is clean
  29. run: $(exit $(git status --porcelain --untracked-files=no | head -255 | wc -l)) || (echo "Dirty git tree"; git diff; exit 1)
  30. - run: npm run lint:ci && npm run tsc:ci
  31. linux-build:
  32. name: Build Frontend (Linux)
  33. runs-on: ubuntu-latest
  34. steps:
  35. - uses: actions/checkout@v4
  36. - uses: actions/setup-node@v4
  37. with:
  38. node-version: 20
  39. cache: 'npm'
  40. - run: npm install
  41. - run: make
  42. macos-ci:
  43. name: Build Frontend (macOS)
  44. runs-on: macOS-latest
  45. steps:
  46. - uses: actions/checkout@v4
  47. - uses: actions/setup-node@v4
  48. with:
  49. node-version: 20
  50. cache: 'npm'
  51. - run: npm install
  52. - run: make
  53. android-build:
  54. name: Build mobile bundle (Android)
  55. runs-on: ubuntu-latest
  56. steps:
  57. - uses: actions/checkout@v4
  58. - uses: actions/setup-node@v4
  59. with:
  60. node-version: 20
  61. cache: 'npm'
  62. - run: npm install
  63. - run: npx react-native bundle --entry-file react/index.native.js --platform android --bundle-output /tmp/android.bundle --reset-cache
  64. ios-build:
  65. name: Build mobile bundle (iOS)
  66. runs-on: ${{ matrix.os }}
  67. strategy:
  68. fail-fast: false
  69. matrix:
  70. os: [macos-13, macos-14]
  71. steps:
  72. - uses: actions/checkout@v4
  73. - uses: actions/setup-node@v4
  74. with:
  75. node-version: 20
  76. cache: 'npm'
  77. - run: npm install
  78. - name: setup Xcode
  79. run: |
  80. uname -a
  81. xcode-select -p
  82. sudo xcode-select -s /Applications/Xcode_15.2.app/Contents/Developer
  83. xcodebuild -version
  84. - name: setup-cocoapods
  85. uses: maxim-lobanov/setup-cocoapods@v1
  86. with:
  87. podfile-path: ios/Podfile.lock
  88. - name: Install Pods
  89. run: |
  90. pod --version
  91. cd ios
  92. pod install --repo-update
  93. - name: Check if the git repository is clean
  94. run: $(exit $(git status --porcelain --untracked-files=no | head -255 | wc -l)) || (echo "Dirty git tree"; git diff; exit 1)
  95. - run: npx react-native bundle --entry-file react/index.native.js --platform ios --bundle-output /tmp/ios.bundle --reset-cache
  96. debian-build:
  97. name: Test Debian packages build
  98. runs-on: ubuntu-latest
  99. steps:
  100. - uses: actions/checkout@v4
  101. - uses: actions/setup-node@v4
  102. with:
  103. node-version: 16
  104. cache: 'npm'
  105. - run: npm install
  106. - run: make
  107. - run: sudo apt-get install -y debhelper
  108. - run: dpkg-buildpackage -A -rfakeroot -us -uc -d
  109. - run: make source-package