update-translation.yml 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. name: update-translations
  2. on:
  3. push:
  4. paths:
  5. - 'plugins/**'
  6. - 'resources/**'
  7. - 'cura/**'
  8. - 'icons/**'
  9. - 'tests/**'
  10. - 'packaging/**'
  11. - '.github/workflows/conan-*.yml'
  12. - '.github/workflows/notify.yml'
  13. - '.github/workflows/requirements-conan-package.txt'
  14. - 'requirements*.txt'
  15. - 'conanfile.py'
  16. - 'conandata.yml'
  17. - 'GitVersion.yml'
  18. - '*.jinja'
  19. branches:
  20. - '[1-9].[0-9]'
  21. - '[1-9].[0-9][0-9]'
  22. tags:
  23. - '[1-9].[0-9].[0-9]*'
  24. - '[1-9].[0-9].[0-9]'
  25. - '[1-9].[0-9][0-9].[0-9]*'
  26. jobs:
  27. update-translations:
  28. name: Update translations
  29. runs-on: ubuntu-latest
  30. steps:
  31. - name: Checkout
  32. uses: actions/checkout@v3
  33. - name: Cache Conan data
  34. id: cache-conan
  35. uses: actions/cache@v3
  36. with:
  37. path: ~/.conan
  38. key: ${{ runner.os }}-conan
  39. - name: Setup Python and pip
  40. uses: actions/setup-python@v4
  41. with:
  42. python-version: 3.10.x
  43. cache: pip
  44. cache-dependency-path: .github/workflows/requirements-conan-package.txt
  45. - name: Install Python requirements for runner
  46. run: pip install -r .github/workflows/requirements-conan-package.txt
  47. # NOTE: Due to what are probably github issues, we have to remove the cache and reconfigure before the rest.
  48. # This is maybe because grub caches the disk it uses last time, which is recreated each time.
  49. - name: Install Linux system requirements
  50. if: ${{ runner.os == 'Linux' }}
  51. run: |
  52. sudo rm /var/cache/debconf/config.dat
  53. sudo dpkg --configure -a
  54. sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
  55. sudo apt update
  56. sudo apt upgrade
  57. sudo apt install efibootmgr build-essential checkinstall libegl-dev zlib1g-dev libssl-dev ninja-build autoconf libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxvmc-dev libxxf86vm-dev xtrans-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev xkb-data libxcb-dri3-dev uuid-dev libxcb-util-dev libxkbcommon-x11-dev pkg-config flex bison g++-12 gcc-12 -y
  58. sudo apt install g++-12 gcc-12 -y
  59. sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12
  60. sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 12
  61. - name: Create the default Conan profile
  62. run: conan profile new default --detect --force
  63. - name: Get Conan configuration
  64. run: conan config install https://github.com/Ultimaker/conan-config.git
  65. - name: generate the files using Conan install
  66. run: conan install . --build=missing --update -o cura:devtools=True
  67. - uses: stefanzweifel/git-auto-commit-action@v4
  68. with:
  69. file_pattern: resources/i18n/*.po resources/i18n/*.pot
  70. status_options: --untracked-files=no
  71. commit_message: update translations