Граф коммитов

30 Коммитов

Автор SHA1 Сообщение Дата
Helena Kotas 7cb19f11f2
Run CI builds only on main and release branches (#6026)
The CI build is currently running on any new branch in the repo. We
should run it only on `main` and `release*` branches.
2023-11-16 03:44:45 +00:00
Antonio Maiorano 8147212ee5
azure-pipelines: Enable UBSAN on Linux_Clang_Release (#5978)
Now that all UBSAN issues have been fixed, we can enable UBSAN checks on
our CI.
2023-11-07 17:04:23 -05:00
Antonio Maiorano 63cbf4b58c
Fix enable asan on pipeline (#5976)
Two commits in this one:

 azure-pipelines: Fix ASAN not being enabled on Linux bot
    
Unfortunately, the following CL did not correctly spell out the CMake
    variable to enable ASAN properly:
    https://github.com/microsoft/DirectXShaderCompiler/pull/5799
    
    This commit fixes that.


 azure-pipelines: disable ASAN alloc_dealloc_mismatch checks
    
We are currently hitting false positives because of this. See the issue
I opened: https://github.com/microsoft/DirectXShaderCompiler/issues/5971
    
Perhaps a future Linux image will include a build of libc++ that does
not exhibit this false positive, at which point this workaround can be
    reverted.
2023-11-07 14:46:30 -05:00
Antonio Maiorano 0a141e7ccb
Improve pipeline build (#5977)
Two commits:

    azure-pipelines: Use 'lld' linker for Linux builds
    
    This should speed up the total build time using a faster linker.


   azure-pipelines: Add verbose flag to LLVM_LIT_ARGS
    
With `--xunit-xml-output` set, stderr is not fed to stdout, so we cannot
easily see the errors in the build log. The errors only appear in the
pipeline's "Test" tab. Adding the verbose flag allows it to also output
    stderr to the log.
2023-11-07 11:02:08 -05:00
Xiang Li e44cae1ed4
[CI] Remove redundant SPIRV tests run for Windows pipeline (#5891)
hcttest noexec will execute clang tests.
Clang tests include both spirv lit tests and unit tests. So running
hcttest spirv_only is redundant.

Fixes https://github.com/microsoft/DirectXShaderCompiler/issues/5890
2023-10-19 12:03:00 -04:00
Chris B ea4aca98fa
Enable asan on our Linux Release pipeline (#5799)
Address sanitizer can detect all sorts of memory usage related bugs.
Things like overflows, underflows, use-after-free, and (on Linux) leaks.
Due to the great work by @amaiorano, DXC is now asan-clean in our test
suite. Enabling this in our PR builds will allow us to stay that way.

I've chosen the Linux builds because the Linux runtime hooks capture
more errors than on other platforms. It only runs in the Release
configuration because asan can have significant runtime overhead so
running it in a release configuration will mitigate that substantially.
I've also changed the build to use libc++ instead of libstdc++ because
the libc++ headers have additional address sanitizer annotations to
catch misuses of C++ standard library containers.
2023-09-29 12:28:26 -05:00
Xiang Li 92ee02e9bd
[lit] Make lit the only test runner (#5402)
Remove disable-lit and enable-lit from hctbuild/hcttest.

This is to allow write lit FileCheck shell test.
2023-07-27 20:01:09 +00:00
Xiang Li 06a7197e23
Enable lit by default. (#5133)
* Enable lit by default.

* Update README for git user bin.

* Add DXC_DISABLE_LIT to replace DXC_ENABLE_LIT

* Set -DDXC_DISABLE_LIT=Off for appveyor.

* Keep original name for ClangSPIRVTests

* Set correct path for unit tests binary.

* Remove doc about DXC_DISABLE_LIT

* Remove extra space.

* Remove DxcOnUnix.rst.
2023-06-05 10:35:24 -07:00
Chris B 0eef1830b9
[NFC] Enable -Werror for C sources too (#5021)
This fixes some fallthrough warnings that were appearing in C source
files and enables -Werror for both C and C++ sources.

Additionally, this fixes some GCC warnings and migrates AppVeyor builds
to building with clang-14 to reach agreement between GCC and Clang
about what is valid in C++.
2023-04-25 13:51:21 -05:00
Xiang Li 4c78f3ac37
Enable lit by default on pipeline (#4993)
Enable lit by default in azure pipeline.

-disable-lit is set for appveyor because the output for taef changed.
2023-02-06 10:00:27 -08:00
Chris B 76409423c2
Update Azure pipelines to report results (#4994)
I didn't have this configured correctly to run on failing builds... obviously that is where this is more useful. Additionally ADO expects XUnit 2, but LIT generates XUnit 1. XUnit 1 is close to JUnit, so we can use that instead.
2023-02-03 18:07:13 -06:00
Chris B 36fdecf357
Update Linux build and test workflows to use lit (#4836)
* Update Linux build and test workflows to use lit

This change updates the build and test workflows in our azure pipelines
and the GitHub action for code coverage data to use lit instead of ctest
as the test runner. This adds additional test coverage by running some
of the LLVM & Clang tests.

* Fix missing dependency between LLVMAnalysis & DXIL

The default Linux linker fails because LLVMAnalysis depends on LLVMDXIL
and BFD doesn't cycle libraries.

* Updating pipelines to remove mkdir and cd

This just cleans up the pipeline shell commands to avoid unnecissary
mkdir and cd invocations.

Based on feedback from @Keenuts. Thanks!

* Disable LLVM LIT tests that use garbage collection

DXC disabled support for the LLVM garbage collection intrinsics.
2022-12-02 12:55:14 -06:00
Greg Roth 54c709f073
Update macos/linux builds to *-latest (#4815)
This updates the ADO yaml to select the latest version of the OS. In the
case of MacOS, this will still be 11 for now. For Ubuntu, it will
silence the warnings that we are using a deprecated version and save us
the headache of having to do this again.

The risk is that a new version of either OS will cause the build to
break without our intervention, but the real motivation for explicit
versions was an earlier impulse to support the minimal build system that
is no longer a priority. As for the risk, I feel it is minimal and we
can respond in a timely fashion if it should occur.
2022-11-28 10:06:18 -08:00
Helena Kotas 60b1f859ae
Update build to Visual Studio 2022 (new default); remove VS 2017 support (#4726) 2022-10-17 18:49:35 -07:00
Minmin Gong 76fed39c36
Pass parameters to CMake in a correct way (#4531) 2022-06-29 11:17:18 -07:00
Chris B b55eb88561
Convert cmake-predefined-config-params to cache (#3918)
CMake supports passing in CMake scripts via the `-C` command line
option, which can set CMake cache variables to initialize options
before the first CMakeLists file is processed. This is a portable and
shell-agnostic way of supporting what the
`cmake-predefined-config-params` file is used for.
2021-10-05 17:49:07 -05:00
Greg Roth 614472fb4d
Add an explicit python version (#3938)
Finding python3 has been a bit hit or miss. Hopefully this will make it
hit consistently
2021-09-07 17:46:35 -07:00
Greg Roth c23ea265e5
Update macos for azure (#3937)
Hopefully this will let it find the right python
2021-09-07 14:03:35 -07:00
Greg Roth 585736aaa1
Add windows builds to azdo (#3882)
Adds Windows builds previously done by appveyor to azure dev ops.

Also consolidates, cleans up, and otherwise reorganizes the previous build scripts
2021-07-15 20:19:28 -07:00
Greg Roth 1725f29746
Replace Travis CI with Azdo (#3838)
Travis went from org to com. In spite of the perfectly reasonable
assumption and explicitly stated expectation of the simplicity that
transition would involve, multiple engineers from multiple companies
failed to decipher their arcane instructions and permissions. Instead,
we've switched from leeching off of a well-meaning small outfit trying
to promote open source projects at no charge to leeching off Microsoft's
own ample resources.

This replaces all of the testing of travis with Azure Dev Ops (azdo).
The version of Ubuntu is bumped from 14.04 to 18.04, but that was
overdue. The corresponding clang and gcc versions are incremented as
well from 5 to 9 and 5 to 7 respectively with an eye toward the lowest
supported version in the current OS. The MacOS version is similarly
incremented with the clang version jumping to 11. In all cases, these
versions are the lowest azdo provides on the respective platforms.

Left out for now is the address sanitizer configuration, which was
never made blocking. The longevity of this decision is pending cross
company discussions.
2021-06-18 10:58:59 -07:00
Greg Roth 32acf397d5 adjust relative dirs for build and testing 2021-06-16 18:41:21 -06:00
Greg Roth 559c4f2093 let azdo find source dir 2021-06-16 18:38:01 -06:00
Greg Roth e6a9655eae letting azdo find build dir (maybe) 2021-06-16 18:35:34 -06:00
Greg Roth 07d49ad398 trying to fix ninja for azdo 2021-06-16 18:32:23 -06:00
Greg Roth f95e66debb fix cmake for azdo 2021-06-16 18:26:32 -06:00
Greg Roth 422059f72c adding debug info for lack of a better option 2021-06-16 18:21:48 -06:00
Greg Roth 481048eaab correcting relative path for predifined linux configs 2021-06-16 18:17:50 -06:00
Greg Roth 8281a6b463 Find CMake config for azdo 2021-06-16 18:15:17 -06:00
Greg Roth 2c45b3a389 Correct typos in azure pipeline 2021-06-16 16:51:44 -06:00
Greg Roth 4ccf9d179a Set up CI with Azure Pipelines
First crack at this. I'm sure there are problems. Just builds Linux with clang8 for now [skip ci]
2021-06-16 16:48:52 -06:00