Browse Source

ci: check versioning on ci

Anonymous Maarten 10 months ago
parent
commit
cf4049cfde
2 changed files with 15 additions and 0 deletions
  1. 5 0
      .github/workflows/create-test-plan.py
  2. 10 0
      .github/workflows/generic.yml

+ 5 - 0
.github/workflows/create-test-plan.py

@@ -216,6 +216,7 @@ class JobDetails:
     cpactions_setup_cmd: str = ""
     cpactions_setup_cmd: str = ""
     cpactions_install_cmd: str = ""
     cpactions_install_cmd: str = ""
     setup_vita_gles_type: str = ""
     setup_vita_gles_type: str = ""
+    check_sources: bool = False
 
 
     def to_workflow(self, enable_artifacts: bool) -> dict[str, str|bool]:
     def to_workflow(self, enable_artifacts: bool) -> dict[str, str|bool]:
         data = {
         data = {
@@ -278,6 +279,7 @@ class JobDetails:
             "cpactions-install-cmd": self.cpactions_install_cmd,
             "cpactions-install-cmd": self.cpactions_install_cmd,
             "setup-vita-gles-type": self.setup_vita_gles_type,
             "setup-vita-gles-type": self.setup_vita_gles_type,
             "setup-gdk-folder": self.setup_gdk_folder,
             "setup-gdk-folder": self.setup_gdk_folder,
+            "check-sources": self.check_sources,
         }
         }
         return {k: v for k, v in data.items() if v != ""}
         return {k: v for k, v in data.items() if v != ""}
 
 
@@ -694,6 +696,9 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
         case _:
         case _:
             raise ValueError(f"Unsupported platform={spec.platform}")
             raise ValueError(f"Unsupported platform={spec.platform}")
 
 
+    if "ubuntu" in spec.name.lower():
+        job.check_sources = True
+
     if not build_parallel:
     if not build_parallel:
         job.cmake_build_arguments.append("-j1")
         job.cmake_build_arguments.append("-j1")
     if job.cflags:
     if job.cflags:

+ 10 - 0
.github/workflows/generic.yml

@@ -347,6 +347,16 @@ jobs:
         if: ${{ matrix.platform.xcode-sdk != '' }}
         if: ${{ matrix.platform.xcode-sdk != '' }}
         run: |
         run: |
           xcodebuild -project Xcode/SDL/SDL.xcodeproj -target SDL3 -configuration Release -sdk ${{ matrix.platform.xcode-sdk }} clean build
           xcodebuild -project Xcode/SDL/SDL.xcodeproj -target SDL3 -configuration Release -sdk ${{ matrix.platform.xcode-sdk }} clean build
+      - name: 'Setup Python'
+        uses: 'actions/setup-python@main'
+        if: ${{ matrix.platform.check-sources }}
+        with:
+          python-version: '3.x'
+      - name: 'Check Sources'
+        if: ${{ matrix.platform.check-sources }}
+        run: |
+          set -e
+          build-scripts/test-versioning.sh
       - name: 'Upload binary package'
       - name: 'Upload binary package'
         uses: actions/upload-artifact@v4
         uses: actions/upload-artifact@v4
         if: ${{ always() && matrix.platform.artifact != '' && (steps.package.outcome == 'success' || steps.cpactions.outcome == 'success') && (matrix.platform.enable-artifacts || steps.tests.outcome == 'failure') }}
         if: ${{ always() && matrix.platform.artifact != '' && (steps.package.outcome == 'success' || steps.cpactions.outcome == 'success') && (matrix.platform.enable-artifacts || steps.tests.outcome == 'failure') }}