update-translation.yml 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. jobs:
  20. update-translations:
  21. name: Update translations
  22. runs-on: ubuntu-latest
  23. steps:
  24. - name: Checkout
  25. uses: actions/checkout@v3
  26. - name: Setup Python and pip
  27. uses: actions/setup-python@v4
  28. with:
  29. python-version: 3.11.x
  30. cache: pip
  31. cache-dependency-path: .github/workflows/requirements-conan-package.txt
  32. - name: Install Python requirements for runner
  33. run: pip install -r .github/workflows/requirements-conan-package.txt
  34. # NOTE: Due to what are probably github issues, we have to remove the cache and reconfigure before the rest.
  35. # This is maybe because grub caches the disk it uses last time, which is recreated each time.
  36. - name: Install Linux system requirements
  37. if: ${{ runner.os == 'Linux' }}
  38. run: |
  39. sudo rm /var/cache/debconf/config.dat
  40. sudo dpkg --configure -a
  41. sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
  42. sudo apt update
  43. sudo apt upgrade
  44. 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
  45. sudo apt install g++-12 gcc-12 -y
  46. sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12
  47. sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 12
  48. - name: Create the default Conan profile
  49. run: conan profile new default --detect
  50. - name: Get Conan configuration
  51. run: conan config install https://github.com/Ultimaker/conan-config.git
  52. - name: generate the files using Conan install
  53. run: conan install . --build=missing --update -o cura:devtools=True
  54. - uses: stefanzweifel/git-auto-commit-action@v4
  55. with:
  56. file_pattern: resources/i18n/*.po resources/i18n/*.pot
  57. status_options: --untracked-files=no
  58. commit_message: update translations