This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] [ci] Add a Windows CI buildkite configuration
ClosedPublic

Authored by mstorsjo on Mar 22 2021, 10:47 AM.

Details

Diff Detail

Event Timeline

mstorsjo created this revision.Mar 22 2021, 10:47 AM
mstorsjo requested review of this revision.Mar 22 2021, 10:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 22 2021, 10:47 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
ldionne requested changes to this revision.Mar 22 2021, 12:15 PM
ldionne added a subscriber: ldionne.

This is great, thanks a lot for working on it!

libcxx/utils/ci/buildkite-pipeline.yml
293

How far are we from fixing this?

libcxx/utils/ci/run-buildbot
464–471

Shouldn't we fix those issues instead of working around them? Since we're soft-failing the runner anyway, we could add the job without those work arounds and let it soft-fail until we've fixed all issues?

This revision now requires changes to proceed.Mar 22 2021, 12:15 PM
mstorsjo added inline comments.Mar 22 2021, 12:28 PM
libcxx/utils/ci/buildkite-pipeline.yml
293

This runner uses the same base image as the main llvm premerge checks, and adding bash to the path there breaks the llvm tests. (The breakage is due to odd/untested combinations of windows containers and the posix emulation layer used by bash.) It's fixed on the main branch, but the same runner also tests release branches, so it needs backporting to all old releases it might test. So hopefully no biggie, but might take a little while.

libcxx/utils/ci/run-buildbot
464–471

You mean the experimental lib issue, or all the rest?

The int128 in msvc envs issue is a bit bigger (I'm not planning on working on that one as I mainly focus on mingw environments, and it's quite unclear how to fix best) - the lack of int128 precision doesn't matter for ABI here, and it only affects like 1 test in one file at most, so I'd like to have it tested this way for maximal CI coverage, so we can test fs even in msvc environments.

The experimental lib issue makes every single testcase fail to link, as things stand right now. I can look into it (it might be a pretty small thing) though, but the override here can be removed once that's fixed, too.

ldionne added inline comments.Mar 22 2021, 2:16 PM
libcxx/utils/ci/run-buildbot
464–471

I meant all of it.

re: int128, can't we detect it properly automatically? We already try to detect it in __config but it looks like we're failing to detect it properly in this instance.

re: -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=NO, I think we should fix the underlying issue instead.

re: -loldnames, I think it's OK to wait until the CI upgrades to Clang 12

If you think those are unreasonable to wait for, I could be convinced to ship as-is. The only thing is that I dislike shipping something in a state where we know for sure we'll have to change in the future *without leaving a marker for us to find it again in the future*.

mstorsjo added inline comments.
libcxx/utils/ci/run-buildbot
464–471

Re int128, the issue is that the compiler does support it, fully (which __config detects), but in MSVC environments we normally don't have clang_rt builtins available, so we lack the runtime support for e.g. division helper functions. This was discussed in D91139 (https://reviews.llvm.org/D91139#2429595 in particular) - the intent from people working on the MSVC configurations is to provide the runtime helpers, somehow, but it's not there yet.

Re the experimental library, the issue is that c++experimental is only built as a static library, not a dynamic one. In MSVC environments (in particular, how libc++ names things), a dynamic lib foo is named foo.lib while a static lib foo is named libfoo.lib. This, combined with how tests are invoked via the GNU style driver (which is kinda foreign for an MSVC environment) means the AddLinkFlag('-lc++experimental') in libcxx/utils/libcxx/test/params.py would need to be an AddLinkFlag(msvc ? '-llibc++experimental' : '-lc++experimental') - and we don't have info about the target at that place.

Re -loldnames, that one shouldn't be too bad IMO, as it can be removed at some fairly clearly defined point in the future, just not quite yet. After Clang 12 is released, there's still a cycle of waiting for the package manager used in the CI docker images to update to provide it, then bothering @goncharov to update the image and the runners again, etc.

I'd much rather have this in, with a few minor warts, so we can start having the benefit of the CI on all the other patches for cleaning up the state of the tests on windows. Contrary to changes in the library itself and/or the tests, the CI setup doesn't affect how things are shipped or anything permanent in that sense.

Regarding finding these issues later, would you feel better if I'd slap a FIXME: Remove when int128 helpers are available in MSVC environments, FIXME: Remove when the test driver can find libc++experimental.lib, FIXME: Remove once the CI runner has Clang 12 and FIXME: Remove once the CI runner has bash in the path on these instances?

mstorsjo added inline comments.Mar 23 2021, 5:08 AM
libcxx/utils/ci/run-buildbot
464–471

With D99178 we can get rid of the hardcoded disabling of the experimental library (and with D99177 one can actually run tests with it).

mstorsjo added inline comments.Mar 23 2021, 6:12 AM
libcxx/utils/ci/run-buildbot
464–471

D99177 which turns out to be a bit of mess isn't strictly needed for dropping the hardcoded flag here, only D99178 is.

goncharov added a comment.EditedMar 24 2021, 2:11 AM

That's a lot of failed tests reported. If you want to add this step before fixing all tests I would probably need to modify test result processing to ignore all from the jobs that are "soft failed". Otherwise every review author will see them. WDYT?

That's a lot of failed tests reported. If you want to add this step before fixing all tests I would probably need to modify test result processing to ignore all from the jobs that are "soft failed". Otherwise every review author will see them. WDYT?

Most of those failures have been silenced with XFAIL: LIBCXX-WINDOWS-FIXME separately in D99095. There's a few other minor mismatches with expectations left (D99096 and some other bits), but it's supposed to be silent by the time this one is merged. I guess I could give this one a new run through CI to reflect the current state of affairs.

mstorsjo updated this revision to Diff 332919.Mar 24 2021, 3:13 AM

Rerun CI to see the number of failures now reported (should be only a handful, and there's patches under discussion for most of them). Rephrased the comments, adding clearer TODO comments for the bits that are non-ideal, with clear comments about what's required for them to be removed.

curdeius accepted this revision as: curdeius.Mar 25 2021, 3:39 AM
curdeius added a subscriber: curdeius.

LGTM.

Ping @ldionne - while everything isn't in the ideal perfect shape yet, it'd be good to be able to proceed with this (either in this form, or with one TODO removed by merging D99178 first), so we can keep track of other regressions - e.g. D99398 already snuck in new testcases that don't work as-is on Windows.

mstorsjo updated this revision to Diff 334924.Apr 2 2021, 2:10 AM

Removed the soft_fail, as there are no more unexcpected fails/passes.

mstorsjo edited the summary of this revision. (Show Details)Apr 2 2021, 2:10 AM
ldionne accepted this revision.Apr 5 2021, 1:49 PM
This revision is now accepted and ready to land.Apr 5 2021, 1:49 PM
This revision was automatically updated to reflect the committed changes.

Thanks! This will be quite valuable for avoiding regressions, and for having one defined reference configuration with a known outcome.