mirror of
git://repo.or.cz/tinycc.git
synced 2026-06-17 15:44:18 +08:00
CI: fix win32 MSVC setup and arm64 test
Replace hardcoded VsDevCmd.bat Enterprise path with vswhere.exe + vcvarsall.bat for dynamic VS discovery across editions and runner image versions. Architecture args: amd64, x86, amd64_arm64. Split x86_64/i386 win32 jobs into separate build and test steps. For arm64: keep build+test in one step (needs vcvarsall for lib.exe). Prepend standalone LLVM bin to PATH so clang targets ARM64 natively instead of VS's clang-cl inheriting the x64-hosted cross-compile env.
This commit is contained in:
parent
724b24eeb4
commit
fb4077f2da
36
.github/workflows/build.yml
vendored
36
.github/workflows/build.yml
vendored
@ -34,16 +34,16 @@ jobs:
|
||||
timeout-minutes: 6
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: build tcc (x86_64-win32)
|
||||
shell: cmd
|
||||
run: |
|
||||
cd win32
|
||||
for /f "delims=" %%i in ('vswhere.exe -latest -property installationPath') do call "%%i\VC\Auxiliary\Build\vcvarsall.bat" amd64
|
||||
call build-tcc.bat -c cl -t x86_64
|
||||
- name: test (x86_64-win32)
|
||||
shell: cmd
|
||||
run: |
|
||||
echo ::group:: run build-tcc.bat
|
||||
cd win32
|
||||
call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=amd64
|
||||
call build-tcc.bat -c cl -t x86_64
|
||||
@echo off
|
||||
echo ::endgroup::
|
||||
cd ..\tests
|
||||
cd tests
|
||||
call test-win32.bat all -k
|
||||
|
||||
test-i386-win32:
|
||||
@ -51,16 +51,16 @@ jobs:
|
||||
timeout-minutes: 6
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: build tcc (i386-win32)
|
||||
shell: cmd
|
||||
run: |
|
||||
cd win32
|
||||
for /f "delims=" %%i in ('vswhere.exe -latest -property installationPath') do call "%%i\VC\Auxiliary\Build\vcvarsall.bat" x86
|
||||
call build-tcc.bat -c cl -t i386
|
||||
- name: test (i386-win32)
|
||||
shell: cmd
|
||||
run: |
|
||||
echo ::group:: run build-tcc.bat
|
||||
cd win32
|
||||
call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x86
|
||||
call build-tcc.bat -c cl -t i386
|
||||
@echo off
|
||||
echo ::endgroup::
|
||||
cd ..\tests
|
||||
cd tests
|
||||
call test-win32.bat -p c:\mingw32\bin all -k
|
||||
|
||||
test-arm64-win32:
|
||||
@ -68,15 +68,13 @@ jobs:
|
||||
timeout-minutes: 6
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: test (arm64-win32)
|
||||
- name: build and test (arm64-win32)
|
||||
shell: cmd
|
||||
run: |
|
||||
echo ::group:: run build-tcc.bat
|
||||
cd win32
|
||||
call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=arm64
|
||||
for /f "delims=" %%i in ('vswhere.exe -latest -property installationPath') do call "%%i\VC\Auxiliary\Build\vcvarsall.bat" amd64_arm64
|
||||
call build-tcc.bat -c cl -t arm64
|
||||
@echo off
|
||||
echo ::endgroup::
|
||||
set "PATH=C:\Program Files\LLVM\bin;%CD%;%PATH%"
|
||||
cd ..\tests
|
||||
call test-win32.bat -c clang all -k
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user