diff --git a/.github/workflows/optional.yml b/.github/workflows/optional.yml new file mode 100644 index 0000000000..d2002bd674 --- /dev/null +++ b/.github/workflows/optional.yml @@ -0,0 +1,47 @@ +name: optional +on: + pull_request: + types: [labeled, opened, synchronize, reopened] + +concurrency: + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} + cancel-in-progress: true + +env: + INSTALL_PREFIX: ${{ github.workspace }}/nvim-install + # Double test timeout since it's running via qemu + TEST_TIMEOUT: 2400 + # TEST_FILE: test/functional/shada + # TEST_FILTER: foo + +jobs: + s390x: + if: contains(github.event.pull_request.labels.*.name, 'ci-s390x') + strategy: + fail-fast: false + matrix: + test: [functionaltest, oldtest] + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - run: docker run --rm --privileged multiarch/qemu-user-static:register --reset + - uses: docker://multiarch/ubuntu-core:s390x-focal + with: + # Docker runs the command as root, but we want the build/test to run + # as non-root so permissions based tests run correctly + args: > + bash -c + " + apt-get -y update && + DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential cmake curl gettext ninja-build unzip locales-all cpanminus git attr libattr1-dev && + useradd --create-home qemuci && + chown -R qemuci. . && + runuser -u qemuci -- git clone --depth=1 https://github.com/neovim/neovim.git && + cd neovim && + runuser -u qemuci -- git fetch origin ${{ github.ref }}:pr && + runuser -u qemuci -- git switch pr && + runuser -u qemuci -- cmake -S cmake.deps -B .deps -G Ninja -D USE_BUNDLED_LUAJIT=OFF -D USE_BUNDLED_LUA=ON && + runuser -u qemuci -- cmake --build .deps && + runuser -u qemuci -- cmake -B build -G Ninja -D PREFER_LUA=ON && + runuser -u qemuci -- make ${{ matrix.test }} + " diff --git a/src/nvim/api/extmark.c b/src/nvim/api/extmark.c index eb49587d03..1b4d805d87 100644 --- a/src/nvim/api/extmark.c +++ b/src/nvim/api/extmark.c @@ -222,7 +222,9 @@ static Array extmark_to_array(const ExtmarkInfo *extmark, bool id, bool add_dict } if (decor->conceal) { - String name = cstr_to_string((char *)&decor->conceal_char); + char bytes[MB_MAXCHAR + 1] = {0}; + utf_char2bytes(decor->conceal_char, bytes); + String name = cstr_to_string(bytes); PUT(dict, "conceal", STRING_OBJ(name)); } diff --git a/src/nvim/eval/vars.c b/src/nvim/eval/vars.c index 9120cc4471..09a5560d2b 100644 --- a/src/nvim/eval/vars.c +++ b/src/nvim/eval/vars.c @@ -1644,7 +1644,7 @@ static void set_option_from_tv(const char *varname, typval_T *varp) emsg(_(e_stringreq)); return; } - numval = (long)varp->vval.v_number; + numval = varp->vval.v_bool; strval = "0"; // avoid using "false" } else { numval = (long)tv_get_number_chk(varp, &error); diff --git a/src/nvim/option.c b/src/nvim/option.c index 4658ca4a3a..44a4ec2843 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -2248,7 +2248,7 @@ static const char *set_bool_option(const int opt_idx, char *const varp, const in if (options[opt_idx].flags & P_UI_OPTION) { ui_call_option_set(cstr_as_string(options[opt_idx].fullname), - BOOLEAN_OBJ(*varp)); + BOOLEAN_OBJ(*(int *)varp)); } if ((int *)varp == &p_ru || (int *)varp == &p_sc) { // in case 'ruler' or 'showcmd' changed