Files
neovim/.github/workflows/optional.yml
Barrett Ruth 085bb518c8 ci(optional): avoid reruns from unrelated labels #39547
Problem: Optional CI reevaluates on unrelated label events and shares
one workflow-wide concurrency group. One optional label change can
cancel in-flight jobs for the other optional suite.

Solution: Only reevaluate each optional job when its own label changes,
and move concurrency to the job level. This keeps `s390x` and
`windows-asan` from restarting each other.
2026-05-01 13:12:19 -04:00

71 lines
2.6 KiB
YAML

name: optional
on:
pull_request:
types: [labeled, opened, synchronize, reopened]
workflow_dispatch:
permissions:
contents: read
env:
INSTALL_PREFIX: ${{ github.workspace }}/nvim-install
# Double test timeout since it's running via qemu
TEST_TIMEOUT: 3600
# TEST_FILE: test/functional/shada
# TEST_FILTER: foo
jobs:
s390x:
if: >-
github.event_name == 'workflow_dispatch' ||
(
contains(github.event.pull_request.labels.*.name, 'ci:s390x') &&
(github.event.action != 'labeled' || github.event.label.name == 'ci:s390x')
)
concurrency:
group: ${{ github.workflow }}-s390x-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
strategy:
fail-fast: false
matrix:
test: [functionaltest, oldtest]
runs-on: ubuntu-latest
timeout-minutes: 90
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 &&
time DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential cmake curl gettext ninja-build locales-all cpanminus git attr libattr1-dev xdg-utils &&
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 CI_BUILD=ON -D PREFER_LUA=ON &&
runuser -u qemuci -- make ${{ matrix.test }}
"
windows-asan:
if: >-
github.event_name == 'workflow_dispatch' ||
(
contains(github.event.pull_request.labels.*.name, 'ci:windows-asan') &&
(github.event.action != 'labeled' || github.event.label.name == 'ci:windows-asan')
)
concurrency:
group: ${{ github.workflow }}-windows-asan-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
uses: ./.github/workflows/test_windows.yml
with:
build_flags: "-D ENABLE_ASAN_UBSAN=ON"
functionaltest_timeout: 40