summaryrefslogtreecommitdiffstats
path: root/l10n/hr.php
blob: 888f5609ffdb7581259e35b1b1921960147ea5f6 (plain)
1
2
3
4
5
6
7
8
<?php $TRANSLATIONS = array(
"Address" => "Adresa",
"Add" => "Dodaj",
"Folder" => "mapa",
"by" => "preko",
"Import" => "Uvezi",
"Export" => "Izvoz"
);
6' href='#n346'>346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666
name: GitHub CI

on:
  push:
    branches: ['**']
  pull_request:

# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
  # The concurrency group contains the workflow name and the branch name for
  # pull requests or the commit hash for any other events.
  group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
  cancel-in-progress: true

permissions:
  contents: read # to fetch code (actions/checkout)

jobs:
  linux:
    runs-on: ubuntu-22.04

    env:
      CC: ${{ matrix.compiler }}
      GCC_VER: 13
      CLANG_VER: 17
      TEST: test
      SRCDIR: ./src
      LEAK_CFLAGS: -DEXITFREE
      LOG_DIR: ${{ github.workspace }}/logs
      TERM: xterm
      DISPLAY: ':99'
      DEBIAN_FRONTEND: noninteractive

    strategy:
      fail-fast: false
      matrix:
        features: [tiny, normal, huge]
        compiler: [clang, gcc]
        extra: [[]]
        # Only use non-native architecture when features != huge.
        # features=huge tries to install python3-dev, which fails to install
        # for the non-native architecture.
        architecture: [native]
        include:
          - features: tiny
            compiler: clang
            extra: [nogui]
          - features: tiny
            compiler: gcc
            extra: [nogui]
          - features: normal
            shadow: ./src/shadow
            compiler: gcc
            architecture: i386
          - features: huge
            coverage: true
          - features: huge
            compiler: clang
            interface: dynamic
            python3: stable-abi
          - features: huge
            compiler: gcc
            coverage: true
            interface: dynamic
            extra: [uchar, testgui]
          - features: huge
            compiler: clang
            # Lua5.1 is the most widely used version (since it's what LuaJIT is
            # compatible with), so ensure it works
            lua_ver: '5.1'
            extra: [asan]
          - features: huge
            compiler: gcc
            coverage: true
            extra: [unittests]
          - features: normal
            compiler: gcc
            extra: [vimtags]

    steps:
      - name: Checkout repository from github
        uses: actions/checkout@v4

      - name: Check Filelist (for packaging)
        run: |
          # If any files in the repository are not listed in Filelist this will
          # exit with an error code and list the missing entries.
          make -f ci/unlisted.make

      - run: sudo dpkg --add-architecture i386
        if: matrix.architecture == 'i386'

      - name: Install packages
        run: |
          PKGS=( \
            gettext \
            libgtk2.0-dev:${{ matrix.architecture }} \
            desktop-file-utils \
            libtool-bin \
            libncurses-dev:${{ matrix.architecture }} \
            libxt-dev:${{ matrix.architecture }} \
          )
          if ${{ matrix.features == 'huge' }}; then
            LUA_VER=${{ matrix.lua_ver || '5.4' }}
            PKGS+=( \
              autoconf \
              gdb \
              lcov \
              libcanberra-dev \
              libperl-dev \
              python2-dev \
              python3-dev \
              liblua${LUA_VER}-dev \
              lua${LUA_VER} \
              ruby-dev \
              tcl-dev \
              cscope \
              libsodium-dev \
              attr \
              libattr1-dev
            )
          fi
          sudo apt-get update && sudo apt-get upgrade && sudo apt-get install -y "${PKGS[@]}"

      - name: Install gcc-${{ env.GCC_VER }}
        if:  matrix.compiler == 'gcc'
        run: |
          sudo apt-get install -y gcc-${{ env.GCC_VER }}:${{ matrix.architecture }}
          sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ env.GCC_VER }} 100
          sudo update-alternatives --set gcc /usr/bin/gcc-${{ env.GCC_VER }}

      - name: Install clang-${{ env.CLANG_VER }}
        if: matrix.compiler == 'clang'
        run: |
          wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
          . /etc/lsb-release
          sudo add-apt-repository -y "deb http://apt.llvm.org/${DISTRIB_CODENAME}/ llvm-toolchain-${DISTRIB_CODENAME}-${{ env.CLANG_VER }} main"
          sudo apt-get install -y clang-${{ env.CLANG_VER }} llvm-${{ env.CLANG_VER }}
          sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${{ env.CLANG_VER }} 100
          sudo update-alternatives --set clang /usr/bin/clang-${{ env.CLANG_VER }}
          sudo update-alternatives --install /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-${{ env.CLANG_VER }} 100
          sudo update-alternatives --install /usr/bin/asan_symbolize asan_symbolize /usr/bin/asan_symbolize-${{ env.CLANG_VER }} 100

      - name: Set up environment
        run: |
          mkdir -p "${LOG_DIR}"
          mkdir -p "${HOME}/bin"
          echo "${HOME}/bin" >> $GITHUB_PATH
          (
          echo "LINUX_VERSION=$(uname -r)"
          echo "NPROC=$(getconf _NPROCESSORS_ONLN)"
          echo "TMPDIR=${{ runner.temp }}"

          case "${{ matrix.features }}" in
          tiny)
            echo "TEST=testtiny"
            if ${{ contains(matrix.extra, 'nogui') }}; then
              echo "CONFOPT=--disable-gui"
            fi
            ;;
          normal)
            ;;
          huge)
            echo "TEST=scripttests test_libvterm"
            INTERFACE=${{ matrix.interface || 'yes' }}
            if ${{ matrix.python3 == 'stable-abi' }}; then
              PYTHON3_CONFOPT="--with-python3-stable-abi=3.8"
            fi
            echo "CONFOPT=--enable-perlinterp=${INTERFACE} --enable-pythoninterp=${INTERFACE} --enable-python3interp=${INTERFACE} --enable-rubyinterp=${INTERFACE} --enable-luainterp=${INTERFACE} --enable-tclinterp=${INTERFACE} ${PYTHON3_CONFOPT}"
            ;;
          esac

          if ${{ matrix.coverage == true }}; then
            CFLAGS="${CFLAGS} --coverage -DUSE_GCOV_FLUSH"
            echo "LDFLAGS=--coverage"
          fi
          if ${{ contains(matrix.extra, 'uchar') }}; then
            CFLAGS="${CFLAGS} -funsigned-char"
          fi
          if ${{ contains(matrix.extra, 'testgui') }}; then
            echo "TEST=-C src testgui"
          fi
          if ${{ contains(matrix.extra, 'unittests') }}; then
            echo "TEST=unittests"
          fi
          if ${{ contains(matrix.extra, 'asan') }}; then
            echo "SANITIZER_CFLAGS=-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize-recover=all -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer"
            echo "ASAN_OPTIONS=print_stacktrace=1 log_path=${LOG_DIR}/asan"
            echo "UBSAN_OPTIONS=print_stacktrace=1 log_path=${LOG_DIR}/ubsan"
            echo "LSAN_OPTIONS=suppressions=${GITHUB_WORKSPACE}/src/testdir/lsan-suppress.txt"
          fi
          if ${{ contains(matrix.extra, 'vimtags') }}; then
            echo "TEST=-C runtime/doc vimtags VIMEXE=../../${SRCDIR}/vim"
          fi
          echo "CFLAGS=${CFLAGS}"
          ) >> $GITHUB_ENV

      - name: Set up system
        run: |
          if [[ ${CC} = clang ]]; then
            # Use llvm-cov instead of gcov when compiler is clang.
            ln -fs /usr/bin/llvm-cov ${HOME}/bin/gcov
          fi
          sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0
          sudo usermod -a -G audio "${USER}"
          sudo bash ci/setup-xvfb.sh

      - name: Set up snd-dummy
        if: (!(contains(matrix.extra, 'unittests') || contains(matrix.extra, 'vimtags')))
        env:
          DEST_DIR: ${{ env.TMPDIR }}/linux-modules-extra-${{ env.LINUX_VERSION }}
        uses: tecolicom/actions-use-apt-tools@main
        with:
          tools: linux-modules-extra-${{ env.LINUX_VERSION }}
          path: "${DEST_DIR}"

      - name: modprobe snd-dummy
        if: (!(contains(matrix.extra, 'unittests') || contains(matrix.extra, 'vimtags')))
        run: |
          sudo depmod --verbose
          sudo modprobe --verbose snd-dummy || true

      - name: Check autoconf
        if: contains(matrix.extra, 'unittests')
        run: |
          make -C src autoconf

      - name: Set up shadow dir
        if: matrix.shadow
        run: |
          make -C src shadow
          echo "SRCDIR=${{ matrix.shadow }}" >> $GITHUB_ENV
          echo "SHADOWOPT=-C ${{ matrix.shadow }}" >> $GITHUB_ENV

      - name: Configure
        run: |
          ./configure --with-features=${{ matrix.features }} ${CONFOPT} --enable-fail-if-missing
          # Append various warning flags to CFLAGS.
          sed -i -f ci/config.mk.sed ${SRCDIR}/auto/config.mk
          sed -i -f ci/config.mk.${CC}.sed ${SRCDIR}/auto/config.mk
          if [[ ${CC} = clang ]]; then
            # Suppress some warnings produced by clang 12 and later.
            sed -i -f ci/config.mk.clang-12.sed ${SRCDIR}/auto/config.mk
          fi

      - name: Build
        if: (!contains(matrix.extra, 'unittests'))
        run: |
          make ${SHADOWOPT} -j${NPROC}

      - name: Check version
        if: (!contains(matrix.extra, 'unittests'))
        run: |
          "${SRCDIR}"/vim --version
          "${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-1.vim -c quit
          "${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-2.vim -c quit

      - name: Test
        timeout-minutes: 25
        run: |
          do_test() { sg audio "sg $(id -gn) '$*'"; }
          do_test make ${SHADOWOPT} ${TEST}

      - name: Vim tags
        if: contains(matrix.extra, 'vimtags')
        run: |
          # This will exit with an error code if the generated vim tags differs from source.
          git diff --exit-code -- runtime/doc/tags

      - name: Generate gcov files
        if: matrix.coverage
        run: |
          cd "${SRCDIR}"
          find . -type f -name '*.gcno' -exec gcov -pb {} + || true

      - name