Skip to content

Commit

Permalink
ci: use PyPi selenium package instead
Browse files Browse the repository at this point in the history
  • Loading branch information
madebr committed Oct 16, 2024
1 parent 3ebfdb0 commit 796c00a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/create-test-plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ class JobDetails:
cpactions_install_cmd: str = ""
setup_vita_gles_type: str = ""
check_sources: bool = False
setup_python: bool = False
pypi_packages: list[str] = dataclasses.field(default_factory=list)

def to_workflow(self, enable_artifacts: bool) -> dict[str, str|bool]:
data = {
Expand Down Expand Up @@ -280,6 +282,8 @@ def to_workflow(self, enable_artifacts: bool) -> dict[str, str|bool]:
"setup-vita-gles-type": self.setup_vita_gles_type,
"setup-gdk-folder": self.setup_gdk_folder,
"check-sources": self.check_sources,
"setup-python": self.setup_python,
"pypi-packages": my_shlex_join(self.pypi_packages),
}
return {k: v for k, v in data.items() if v != ""}

Expand Down Expand Up @@ -530,7 +534,6 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
job.cmake_config_emulator = "emcmake"
job.cmake_build_type = "Debug"
job.test_pkg_config = False
job.apt_packages.append("python3-selenium")
job.cmake_arguments.extend((
"-DSDLTEST_BROWSER=chrome",
"-DSDLTEST_TIMEOUT_MULTIPLIER=4",
Expand All @@ -550,6 +553,8 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
"chromedriver --version",
))
job.static_lib = StaticLibType.A
job.setup_python = True
job.pypi_packages.append("selenium")
case SdlPlatform.Ps2:
build_parallel = False
job.shared = False
Expand Down Expand Up @@ -698,6 +703,7 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta

if "ubuntu" in spec.name.lower():
job.check_sources = True
job.setup_python = True

if not build_parallel:
job.cmake_build_arguments.append("-j1")
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/generic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,15 @@ jobs:
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
brew update
brew install ${{ matrix.platform.brew-packages }}
- name: 'Setup Python'
uses: 'actions/setup-python@main'
if: ${{ matrix.platform.setup-python }}
with:
python-version: '3.x'
- name: 'Install PyPi packages'
if: ${{ matrix.platform.pypi-packages != '' }}
run: |
python -m pip install --user ${{ matrix.platform.pypi-packages }}
- name: 'Set up GLES for VITA' # Must be after apk
if: ${{ matrix.platform.setup-vita-gles-type != '' }}
uses: ./.github/actions/setup-vita-gles
Expand Down Expand Up @@ -347,11 +356,6 @@ jobs:
if: ${{ matrix.platform.xcode-sdk != '' }}
run: |
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: |
Expand Down

0 comments on commit 796c00a

Please sign in to comment.