update-translation.yml 3.6 KB

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