Merge pull request #26644 from jamessan/big-endian-fixes

Big-endian CI backport and fixes
This commit is contained in:
James McCoy 2023-12-20 09:08:06 -05:00 committed by GitHub
commit 8813b68a9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 52 additions and 3 deletions

47
.github/workflows/optional.yml vendored Normal file
View File

@ -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 }}
"

View File

@ -222,7 +222,9 @@ static Array extmark_to_array(const ExtmarkInfo *extmark, bool id, bool add_dict
} }
if (decor->conceal) { 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)); PUT(dict, "conceal", STRING_OBJ(name));
} }

View File

@ -1644,7 +1644,7 @@ static void set_option_from_tv(const char *varname, typval_T *varp)
emsg(_(e_stringreq)); emsg(_(e_stringreq));
return; return;
} }
numval = (long)varp->vval.v_number; numval = varp->vval.v_bool;
strval = "0"; // avoid using "false" strval = "0"; // avoid using "false"
} else { } else {
numval = (long)tv_get_number_chk(varp, &error); numval = (long)tv_get_number_chk(varp, &error);

View File

@ -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) { if (options[opt_idx].flags & P_UI_OPTION) {
ui_call_option_set(cstr_as_string(options[opt_idx].fullname), 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) { if ((int *)varp == &p_ru || (int *)varp == &p_sc) {
// in case 'ruler' or 'showcmd' changed // in case 'ruler' or 'showcmd' changed