update-translation.yml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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.11.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. - name: Install GCC-13
  59. run: |
  60. sudo apt install g++-13 gcc-13 -y
  61. sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 13
  62. sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 13
  63. - name: Create the default Conan profile
  64. run: conan profile new default --detect --force
  65. - name: Get Conan configuration
  66. run: |
  67. conan config install https://github.com/Ultimaker/conan-config.git
  68. conan config install https://github.com/Ultimaker/conan-config.git -a "-b runner/${{ runner.os }}/${{ runner.arch }}"
  69. - name: generate the files using Conan install
  70. run: conan install . --build=missing --update -o cura:devtools=True
  71. - uses: stefanzweifel/git-auto-commit-action@v4
  72. with:
  73. file_pattern: resources/i18n/*.po resources/i18n/*.pot
  74. status_options: --untracked-files=no
  75. commit_message: update translations