Skip to content

Commit

Permalink
Merge pull request #2 from checkedc/update-yaml-files
Browse files Browse the repository at this point in the history
- Update to the new location for checkedc-clang: https://github.com/checkedc/checkedc-clang.
- Change the GitHub CI runners to use latest MacOS and latest Windows.
- Update the Windows scripts to use the CLANG_REPO and CHECKEDC_REPO variables.  They were just being ignored.
-  Fix some typos.

I had to make some changes to the checkedc-clang repos and the checkedc repos.
- For Windows latest, Python 3.10 no longer has the distutils library.  I think distutils was removed the minimum Python distribution that GitHub uses for their CI runners.
- A few clang compiler tests for CUDA features break on the Windows latest CI.  I can't reproduce the failure locally on my machine using a different set up Windows.  I disabled the tests.  It is not worth looking into them.
-  - For MacOS latest, some header files now use parameters named ptr.  This causes a few Checked C tests that import stdcheckedc.h to break.

Testing:
Successful CI jobs with all of these changes:
MacOS: https://github.com/checkedc/workflows/actions/runs/10877837944
Windows: https://github.com/checkedc/workflows/actions/runs/10866691175
Linux: https://github.com/checkedc/workflows/actions/runs/10867500232
  • Loading branch information
dtarditi authored Sep 24, 2024
2 parents 9b8c654 + dd17089 commit b0957c9
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/check-clang-linux.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Checked C Clang CI Linux]
name: Checked C Clang CI [Linux]

on:
workflow_dispatch:
Expand All @@ -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
8 changes: 6 additions & 2 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 @@ -47,8 +47,12 @@ env:
jobs:
test_CheckedC_Clang_on_windows :
name: Build Checked C clang and test it on Windows
runs-on: [ self-hosted, Windows, X64 ]
runs-on: [ windows-latest ]
steps:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Checkout Checked C Clang code
uses: actions/checkout@v2
with:
Expand Down
8 changes: 4 additions & 4 deletions .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 All @@ -42,7 +42,7 @@ jobs:
# Cleanup files left behind by prior runs
clean:
name: Clean
runs-on: macOS
runs-on: [ macos-latest ]
steps:
- name: Clean
run: |
Expand All @@ -53,10 +53,10 @@ jobs:
rm -rf ${{env.BUILD_SOURCESDIRECTORY}}
mkdir -p ${{env.BUILD_SOURCESDIRECTORY}}
test_CheckedC_Clang_UNIX:
test_CheckedC_Clang_MacOS:
name: Build and test Checked C Clang on MacOS
needs: clean
runs-on: macOS
runs-on: [ macos-latest ]
steps:
- name: Checkout Checked C Clang code
uses: actions/checkout@v2
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 b0957c9

Please sign in to comment.