make/test: clean 32-bit detection and test tcc32/tcc64 CI run (#9001)
parent
ae01b480c4
commit
5807e1b3ae
|
@ -753,6 +753,9 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
.\v.exe cmd/tools/test_if_v_test_system_works.v
|
.\v.exe cmd/tools/test_if_v_test_system_works.v
|
||||||
.\cmd\tools\test_if_v_test_system_works.exe
|
.\cmd\tools\test_if_v_test_system_works.exe
|
||||||
|
- name: Make sure running TCC64 instead of TCC32
|
||||||
|
run : |
|
||||||
|
.\v.exe test .github\workflows\make_sure_ci_run_with_64bit_compiler_test.v
|
||||||
- name: Self tests
|
- name: Self tests
|
||||||
run: |
|
run: |
|
||||||
.\v.exe -silent test-self
|
.\v.exe -silent test-self
|
||||||
|
@ -795,6 +798,9 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
.\v.exe cmd/tools/test_if_v_test_system_works.v
|
.\v.exe cmd/tools/test_if_v_test_system_works.v
|
||||||
.\cmd\tools\test_if_v_test_system_works.exe
|
.\cmd\tools\test_if_v_test_system_works.exe
|
||||||
|
- name: Make sure running TCC32 instead of TCC64
|
||||||
|
run : |
|
||||||
|
.\v.exe test .github\workflows\make_sure_ci_run_with_32bit_compiler_test.v
|
||||||
- name: Self tests
|
- name: Self tests
|
||||||
run: |
|
run: |
|
||||||
.\v.exe -silent test-self
|
.\v.exe -silent test-self
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
fn test_ci_run_with_32bit_compiler() {
|
||||||
|
$if x64 {
|
||||||
|
assert false
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
fn test_ci_run_with_64bit_compiler() {
|
||||||
|
$if x32 {
|
||||||
|
assert false
|
||||||
|
}
|
||||||
|
}
|
7
make.bat
7
make.bat
|
@ -16,7 +16,8 @@ set target=build
|
||||||
REM TCC variables
|
REM TCC variables
|
||||||
set "tcc_url=https://github.com/vlang/tccbin"
|
set "tcc_url=https://github.com/vlang/tccbin"
|
||||||
set "tcc_dir=%~dp0thirdparty\tcc"
|
set "tcc_dir=%~dp0thirdparty\tcc"
|
||||||
set "tcc_branch=thirdparty-windows-amd64"
|
if "%PROCESSOR_ARCHITECTURE%" == "x86" ( set "tcc_branch=thirdparty-windows-i386" ) else ( set "tcc_branch=thirdparty-windows-amd64" )
|
||||||
|
if "%~1" == "-tcc32" set "tcc_branch=thirdparty-windows-i386"
|
||||||
|
|
||||||
REM VC settings
|
REM VC settings
|
||||||
set "vc_url=https://github.com/vlang/vc"
|
set "vc_url=https://github.com/vlang/vc"
|
||||||
|
@ -44,8 +45,6 @@ if !shift_counter! LSS 1 (
|
||||||
|
|
||||||
REM Compiler option
|
REM Compiler option
|
||||||
for %%g in (-gcc -msvc -tcc -tcc32 -clang) do (
|
for %%g in (-gcc -msvc -tcc -tcc32 -clang) do (
|
||||||
if "%PROCESSOR_ARCHITECTURE%" == "x86" set "tcc_branch=thirdparty-windows-i386"
|
|
||||||
if "%~1" == "-tcc32" set "tcc_branch=thirdparty-windows-i386"
|
|
||||||
if "%~1" == "%%g" set compiler=%~1& set compiler=!compiler:~1!& shift& set /a shift_counter+=1& goto :verifyopt
|
if "%~1" == "%%g" set compiler=%~1& set compiler=!compiler:~1!& shift& set /a shift_counter+=1& goto :verifyopt
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -316,7 +315,7 @@ pushd %tcc_dir% 2>NUL && (
|
||||||
) || (
|
) || (
|
||||||
echo Bootstraping TCC...
|
echo Bootstraping TCC...
|
||||||
echo ^> TCC not found
|
echo ^> TCC not found
|
||||||
echo ^> Downloading TCC from !tcc_url!
|
if "!tcc_branch!" == "thirdparty-windows-i386" ( echo ^> Downloading TCC32 from !tcc_url! ) else ( echo ^> Downloading TCC64 from !tcc_url! )
|
||||||
if !flag_verbose! EQU 1 (
|
if !flag_verbose! EQU 1 (
|
||||||
echo [Debug] git clone --depth 1 --quiet --single-branch --branch !tcc_branch! !tcc_url! "%tcc_dir%">>"!log_file!"
|
echo [Debug] git clone --depth 1 --quiet --single-branch --branch !tcc_branch! !tcc_url! "%tcc_dir%">>"!log_file!"
|
||||||
echo git clone --depth 1 --quiet --single-branch --branch !tcc_branch! !tcc_url! "%tcc_dir%"
|
echo git clone --depth 1 --quiet --single-branch --branch !tcc_branch! !tcc_url! "%tcc_dir%"
|
||||||
|
|
Loading…
Reference in New Issue