Add clang-cl in the continuous Integration
This commit is contained in:
1 parent
e0b5dc2f02
commit
3182c39280
2 files changed
+26
-15
No files matched your search
@@ -11,8 +11,6 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: make
|
||||
run: make
|
||||
- name: make check C99
|
||||
run: make check
|
||||
- name: make check C11
|
||||
@@ -30,8 +28,6 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Install MINGW
|
||||
run: choco install mingw --no-progress
|
||||
- name: make check
|
||||
shell: bash
|
||||
run: mingw32-make CC="gcc -std=c99 -D__USE_MINGW_ANSI_STDIO=1" check
|
||||
@@ -47,5 +43,17 @@ jobs:
|
||||
- name: make check
|
||||
shell: cmd
|
||||
working-directory: ./tests
|
||||
run: Make-check-cl.bat
|
||||
run: Make-check-cl.bat cl
|
||||
|
||||
build_windows_clang_cl:
|
||||
strategy:
|
||||
matrix:
|
||||
platform: [windows-latest]
|
||||
runs-on: ${{ matrix.platform }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: make check
|
||||
shell: cmd
|
||||
working-directory: ./tests
|
||||
run: Make-check-cl.bat clang-cl
|
||||
+13
-10
@@ -30,6 +30,10 @@ IF EXIST "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxi
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
|
||||
)
|
||||
|
||||
REM Add clang-cl in the PATH. It is the default install of clang for MSVC
|
||||
REM See https://docs.microsoft.com/de-de/cpp/build/clang-support-msbuild?view=vs-2019
|
||||
SET PATH=%PATH%;%VCINSTALLDIR%\Tools\Llvm\bin;%VCINSTALLDIR%\Tools\Llvm\x64\bin
|
||||
|
||||
REM Remove previous results
|
||||
DEL *.log *.dat
|
||||
|
||||
@@ -37,13 +41,12 @@ REM List the expected failure (compiler internal error)
|
||||
set "expectedFailure1=test-msnapshot.c"
|
||||
set "expectedFailure2=test-none.c"
|
||||
|
||||
echo "Compiler full version:"
|
||||
cl /Bv
|
||||
REM Select compiler to use (either cl or clang-cl)
|
||||
set "compiler=%1"
|
||||
|
||||
SET PATH=%PATH%;%VCINSTALLDIR%\Tools\Llvm\bin;%VCINSTALLDIR%\Tools\Llvm\x64\bin
|
||||
clang-cl /Bv
|
||||
|
||||
echo " "
|
||||
echo "Compiler full version (%compiler%):"
|
||||
%compiler% /Bv
|
||||
%compiler% -v
|
||||
|
||||
REM Perform for each test
|
||||
for %%f in (test-*.c) do (
|
||||
@@ -56,9 +59,9 @@ for %%f in (test-*.c) do (
|
||||
REM /Zc:preprocessor is mandatory to have a compliant preprocessor
|
||||
REM /Zc:__cplusplus is needed to report the real value of __cplusplus, so that M*LIB uses the C++ atomic, and not its emulation.
|
||||
REM Enable warnings and basic optimization
|
||||
REM Inform M*LIB to use Annex K
|
||||
echo Compiling %%f
|
||||
cl.exe /I.. /O2 /W3 /std:c++14 /Zc:__cplusplus /Zc:preprocessor /D__STDC_WANT_LIB_EXT1__ test.cpp > %%f.log 2>&1
|
||||
REM Inform M*LIB to use Annex K by defining __STDC_WANT_LIB_EXT1__
|
||||
echo Compiling %%f with %compiler%
|
||||
%compiler% /I.. /O2 /W3 /std:c++14 /Zc:__cplusplus /Zc:preprocessor /D__STDC_WANT_LIB_EXT1__ test.cpp > %%f.log 2>&1
|
||||
if ERRORLEVEL 1 (
|
||||
echo *** BUILD ERROR for %%f *** >> %%f.log
|
||||
type %%f.log
|
||||
@@ -76,5 +79,5 @@ for %%f in (test-*.c) do (
|
||||
)
|
||||
type %%f.log
|
||||
)
|
||||
echo "All tests passed (except %expectedFailure%)"
|
||||
echo "All tests passed (except %expectedFailure1%)"
|
||||
exit /B 0
|
||||
Reference in new issue
Block a user