Skip to content

Commit

Permalink
Update Windows scripts to use repo info. Switch to checkedc-clang.
Browse files Browse the repository at this point in the history
- Switch from using checkedc-llvm-project to checkedc-clang.
- The Windows scripts did not use the clang or Checked C repo locations,
  unlike the Linux scripts. Update them to use them.
  • Loading branch information
dtarditi committed Sep 3, 2024
1 parent 60e46f5 commit dd17089
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-clang-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
clang_repo:
description: 'Clang Repo name'
required: true
default: 'https://github.com/checkedc/checkedc-llvm-project.git'
default: 'https://github.com/checkedc/checkedc-clang.git'
testType:
description: 'Test Type'
required: true
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/check-clang-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
clang_repo:
description: 'Clang Repo name'
required: true
default: 'https://github.com/checkedc/checkedc-llvm-project.git'
default: 'https://github.com/checkedc/checkedc-clang.git'
testType:
description: 'Test Type'
required: true
Expand Down Expand Up @@ -53,8 +53,6 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Add Python setuptools
run: pip3 install setuptools
- name: Checkout Checked C Clang code
uses: actions/checkout@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/checkedc-clang-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
clang_repo:
description: 'Clang Repo name'
required: true
default: 'https://github.com/checkedc/checkedc-llvm-project.git'
default: 'https://github.com/checkedc/checkedc-clang.git'
testType:
description: 'Test Type'
required: true
Expand Down
2 changes: 2 additions & 0 deletions test_scripts/automation/UNIX/config-vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ if [ "$CHECKEDC_CONFIG_STATUS" == "passed" ]; then
echo "Configured environment variables:"
echo
echo " BUILDCONFIGURATION: $BUILDCONFIGURATION"
echo " CLANG_REPO: $CLANG_REPO"
echo " CHECKEDC_REPO: $CHECKEDC_REPO"
echo " BUILD_PACKAGE: $BUILD_PACKAGE"
echo " BUILDOS: $BUILDOS"
echo " TEST_TARGET_ARCH: $TEST_TARGET_ARCH"
Expand Down
12 changes: 12 additions & 0 deletions test_scripts/automation/Windows/config-vars.bat
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,16 @@ if NOT DEFINED BUILDCONFIGURATION (
exit /b 1
)

if NOT DEFINED CLANG_REPO (
echo CLANG_REPO not set: must be set to the URL of the Clang repository
exit /b /1
)

if NOT DEFINED CHECKEDC_REPO (
echo CHECKEDC_REPO not set: must be set to the URL of the Clang repository
exit /b /1
)

rem Validate build OS

if NOT DEFINED BUILDOS (
Expand Down Expand Up @@ -195,6 +205,8 @@ if NOT DEFINED MSBUILD_CPU_COUNT (
echo Configured environment variables:
echo.
echo. BUILDCONFIGURATION: %BUILDCONFIGURATION%
echo. CLANG_REPO: %CLANG_REPO%
echo. CHECKEDC_REPO: %CHECKEDC_REPO%
echo. BUILDOS: %BUILDOS%
echo. TEST_TARGET_ARCH: %TEST_TARGET_ARCH%
echo. TEST_SUITE: %TEST_SUITE%
Expand Down
2 changes: 1 addition & 1 deletion test_scripts/automation/Windows/run-cmake.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ set OLD_DIR=%CD%

cd %LLVM_OBJ_DIR%

cmake -G Ninja %EXTRA_FLAGS% -DCMAKE_BUILD_TYPE=%BUILDCONFIGURATION% -DLLVM_ENABLE_PROJECTS=clang -DLLVM_INSTALL_TOOLCHAIN_ONLY=ON %BUILD_SOURCESDIRECTORY%\checkedc-llvm-project\llvm
cmake -G Ninja %EXTRA_FLAGS% -DCMAKE_BUILD_TYPE=%BUILDCONFIGURATION% -DLLVM_ENABLE_PROJECTS=clang -DLLVM_INSTALL_TOOLCHAIN_ONLY=ON %BUILD_SOURCESDIRECTORY%\checkedc-clang\llvm

:succeeded
cd %OLD_DIR%
Expand Down
12 changes: 6 additions & 6 deletions test_scripts/automation/Windows/setup-files.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ if "%BUILD_CHECKEDC_CLEAN%"=="Yes" (
)
)

if not exist %BUILD_SOURCESDIRECTORY%\checkedc-llvm-project\.git (
git clone -c core.autocrlf=false https://github.com/checkedc/checkedc-llvm-project %BUILD_SOURCESDIRECTORY%\checkedc-llvm-project
if not exist %BUILD_SOURCESDIRECTORY%\checkedc-clang\.git (
git clone -c core.autocrlf=false %CLANG_REPO% %BUILD_SOURCESDIRECTORY%\checkedc-clang
if ERRORLEVEL 1 (goto cmdfailed)
)

if not exist %BUILD_SOURCESDIRECTORY%\checkedc-llvm-project\llvm\projects\checkedc-wrapper\checkedc\.git (
git clone https://github.com/checkedc/checkedc %BUILD_SOURCESDIRECTORY%\checkedc-llvm-project\llvm\projects\checkedc-wrapper\checkedc
if not exist %BUILD_SOURCESDIRECTORY%\checkedc-clang\llvm\projects\checkedc-wrapper\checkedc\.git (
git clone %CHECKEDC_REPO% %BUILD_SOURCESDIRECTORY%\checkedc-clang\llvm\projects\checkedc-wrapper\checkedc
if ERRORLEVEL 1 (goto cmdfailed)
)

Expand All @@ -34,7 +34,7 @@ if "%SIGN_INSTALLER%" NEQ "No" (
)

rem Set up clang sources
cd %BUILD_SOURCESDIRECTORY%\checkedc-llvm-project
cd %BUILD_SOURCESDIRECTORY%\checkedc-clang
if ERRORLEVEL 1 (goto cmdfailed)
git fetch origin
if ERRORLEVEL 1 (goto cmdfailed)
Expand All @@ -52,7 +52,7 @@ if not exist %LLVM_OBJ_DIR% (
)

rem set up Checked C sources
cd %BUILD_SOURCESDIRECTORY%\checkedc-llvm-project\llvm\projects\checkedc-wrapper\checkedc
cd %BUILD_SOURCESDIRECTORY%\checkedc-clang\llvm\projects\checkedc-wrapper\checkedc
if ERRORLEVEL 1 (goto cmdfailed)
git fetch origin
if ERRORLEVEL 1 (goto cmdfailed)
Expand Down

0 comments on commit dd17089

Please sign in to comment.