@@ -17,78 +17,51 @@ jobs:
1717 security-events : write
1818 env :
1919 VCPKG_PATH : " ${{github.workspace}}/build/vcpkg/packages/hwloc_x64-windows;${{github.workspace}}/build/vcpkg/packages/tbb_x64-windows;${{github.workspace}}/build/vcpkg/packages/jemalloc_x64-windows"
20+ PYTHON_PATH : " aa"
21+
2022 strategy :
2123 fail-fast : false
2224 matrix :
23- os : [ubuntu-latest, windows-latest]
25+ os : [windows-latest]
2426 include :
2527 - os : ubuntu-latest
2628 # Windows doesn't recognize 'CMAKE_BUILD_TYPE', it uses '--config' param in build command
2729 extra_build_option : ' -DCMAKE_BUILD_TYPE=Release'
2830 - os : windows-latest
29- runs-on : ${{matrix.os}}
31+ runs-on : ["DSS-CUDA", "DSS-WINDOWS"]
3032
3133 steps :
3234 - name : Checkout repository
3335 uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3436 with :
3537 fetch-depth : 0
3638
37- - name : Setup newer Python
38- uses : actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
39- with :
40- python-version : " 3.10"
41-
42- - name : Initialize CodeQL
43- uses : github/codeql-action/init@b7bf0a3ed3ecfa44160715d7c442788f65f0f923 # v3.23.2
44- with :
45- languages : cpp
46-
47- - name : " [Win] Initialize vcpkg"
48- if : matrix.os == 'windows-latest'
49- uses : lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
50- with :
51- vcpkgGitCommitId : 3dd44b931481d7a8e9ba412621fa810232b66289
52- vcpkgDirectory : ${{env.BUILD_DIR}}/vcpkg
53- vcpkgJsonGlob : ' **/vcpkg.json'
54-
55- - name : " [Win] Install dependencies"
56- if : matrix.os == 'windows-latest'
39+ - name : aaa
5740 run : |
58- vcpkg install
59- python3 -m pip install -r third_party/requirements.txt
41+ ls ${{github.workspace}}../../../..
42+ echo ${{env.PYTHON_PATH}}
43+ echo "PYTHON_PATH=${{env.PYTHON_PATH}}/python/python.exe" >> $GITHUB_ENV
6044
61- - name : " [Lin] Install apt packages"
62- if : matrix.os == 'ubuntu-latest'
45+ - name : bbb
6346 run : |
64- sudo apt-get update
65- sudo apt-get install -y cmake clang libhwloc-dev libnuma-dev libjemalloc-dev libtbb-dev
66-
67- # Latest distros do not allow global pip installation
68- - name : " [Lin] Install Python requirements in venv"
69- if : matrix.os == 'ubuntu-latest'
47+ echo ${{env.PYTHON_PATH}}
48+
49+ - name : Check for Python >= 3.10
50+ id : check_python
7051 run : |
71- python3 -m venv .venv
72- . .venv/bin/activate
73- echo "$PATH" >> $GITHUB_PATH
74- python3 -m pip install -r third_party/requirements.txt
75-
76- - name : Configure CMake
77- run : >
78- cmake
79- -B ${{env.BUILD_DIR}}
80- ${{matrix.extra_build_option}}
81- -DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}"
82- -DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}"
83- -DUMF_FORMAT_CODE_STYLE=OFF
84- -DUMF_DEVELOPER_MODE=ON
85- -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
86- -DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON
87- -DUMF_BUILD_CUDA_PROVIDER=ON
88- -DUMF_TESTS_FAIL_ON_SKIP=ON
89-
90- - name : Build
91- run : cmake --build ${{env.BUILD_DIR}} --config Release -j
92-
93- - name : Perform CodeQL Analysis
94- uses : github/codeql-action/analyze@b7bf0a3ed3ecfa44160715d7c442788f65f0f923 # v3.23.2
52+ echo "python_exists=false" >> $GITHUB_OUTPUT
53+ $pythonCommand = Get-Command python -ErrorAction SilentlyContinue
54+ if ($pythonCommand) {
55+ $pythonVersion = python --version 2>&1
56+ $versionPattern = 'Python (\d+)\.(\d+)\.(\d+)'
57+ echo $pythonVersion
58+ if ($pythonVersion -match $versionPattern) {
59+ $major = [int]$matches[1]
60+ $minor = [int]$matches[2]
61+ if ($major -gt 3 -or ($major -eq 3 -and $minor -ge 10)) {
62+ echo "python_exists=true" >> $GITHUB_OUTPUT
63+ }
64+ }
65+ }
66+ shell : pwsh
67+
0 commit comments