diff --git a/.github/workflows/pr_push.yml b/.github/workflows/pr_push.yml index 8b78ce3d0..b6ca2db4a 100644 --- a/.github/workflows/pr_push.yml +++ b/.github/workflows/pr_push.yml @@ -16,64 +16,8 @@ permissions: contents: read jobs: - CodeChecks: - uses: ./.github/workflows/reusable_checks.yml - DocsBuild: - uses: ./.github/workflows/reusable_docs_build.yml - FastBuild: - name: Fast builds - needs: [CodeChecks, DocsBuild] - uses: ./.github/workflows/reusable_fast.yml - Build: - name: Basic builds - needs: [FastBuild] - uses: ./.github/workflows/reusable_basic.yml - DevDax: - needs: [FastBuild] - uses: ./.github/workflows/reusable_dax.yml - Sanitizers: - needs: [FastBuild] - uses: ./.github/workflows/reusable_sanitizers.yml - Qemu: - needs: [FastBuild] - uses: ./.github/workflows/reusable_qemu.yml - Benchmarks: - needs: [Build] - uses: ./.github/workflows/reusable_benchmarks.yml - ProxyLib: - needs: [Build] - uses: ./.github/workflows/reusable_proxy_lib.yml - GPU: - needs: [Build] - uses: ./.github/workflows/reusable_gpu.yml - Valgrind: - needs: [Build] - uses: ./.github/workflows/reusable_valgrind.yml - MultiNuma: - needs: [Build] - uses: ./.github/workflows/reusable_multi_numa.yml - Coverage: - # total coverage (on upstream only) - if: github.repository == 'oneapi-src/unified-memory-framework' - needs: [Build, DevDax, GPU, MultiNuma, Qemu, ProxyLib] - uses: ./.github/workflows/reusable_coverage.yml - secrets: inherit - with: - trigger: "${{github.event_name}}" - Coverage_partial: - # partial coverage (on forks) - if: github.repository != 'oneapi-src/unified-memory-framework' - needs: [Build, Qemu, ProxyLib] - uses: ./.github/workflows/reusable_coverage.yml CodeQL: - needs: [Build] permissions: contents: read security-events: write uses: ./.github/workflows/reusable_codeql.yml - Trivy: - needs: [Build] - permissions: - contents: read - security-events: write - uses: ./.github/workflows/reusable_trivy.yml diff --git a/.github/workflows/reusable_codeql.yml b/.github/workflows/reusable_codeql.yml index e76456310..6ea848a85 100644 --- a/.github/workflows/reusable_codeql.yml +++ b/.github/workflows/reusable_codeql.yml @@ -20,13 +20,13 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest] + os: [windows-latest] include: - os: ubuntu-latest # Windows doesn't recognize 'CMAKE_BUILD_TYPE', it uses '--config' param in build command extra_build_option: '-DCMAKE_BUILD_TYPE=Release' - os: windows-latest - runs-on: ${{matrix.os}} + runs-on: ["DSS-CUDA", "DSS-WINDOWS"] steps: - name: Checkout repository @@ -34,61 +34,30 @@ jobs: with: fetch-depth: 0 - - name: Setup newer Python - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 - with: - python-version: "3.10" - - - name: Initialize CodeQL - uses: github/codeql-action/init@b7bf0a3ed3ecfa44160715d7c442788f65f0f923 # v3.23.2 - with: - languages: cpp - - - name: "[Win] Initialize vcpkg" - if: matrix.os == 'windows-latest' - uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5 - with: - vcpkgGitCommitId: 3dd44b931481d7a8e9ba412621fa810232b66289 - vcpkgDirectory: ${{env.BUILD_DIR}}/vcpkg - vcpkgJsonGlob: '**/vcpkg.json' - - - name: "[Win] Install dependencies" - if: matrix.os == 'windows-latest' + - name: aaa run: | - vcpkg install - python3 -m pip install -r third_party/requirements.txt - - - name: "[Lin] Install apt packages" - if: matrix.os == 'ubuntu-latest' - run: | - sudo apt-get update - sudo apt-get install -y cmake clang libhwloc-dev libnuma-dev libjemalloc-dev libtbb-dev - - # Latest distros do not allow global pip installation - - name: "[Lin] Install Python requirements in venv" - if: matrix.os == 'ubuntu-latest' + ls ${{github.workspace}}../../.. + echo "aa $PATH" + echo "bb $env:PATH" + python --version + python3 --version + + - name: Check for Python >= 3.10 + id: check_python run: | - python3 -m venv .venv - . .venv/bin/activate - echo "$PATH" >> $GITHUB_PATH - python3 -m pip install -r third_party/requirements.txt - - - name: Configure CMake - run: > - cmake - -B ${{env.BUILD_DIR}} - ${{matrix.extra_build_option}} - -DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}" - -DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}" - -DUMF_FORMAT_CODE_STYLE=OFF - -DUMF_DEVELOPER_MODE=ON - -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON - -DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON - -DUMF_BUILD_CUDA_PROVIDER=ON - -DUMF_TESTS_FAIL_ON_SKIP=ON - - - name: Build - run: cmake --build ${{env.BUILD_DIR}} --config Release -j - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@b7bf0a3ed3ecfa44160715d7c442788f65f0f923 # v3.23.2 + echo "python_exists=false" >> $GITHUB_OUTPUT + $pythonCommand = Get-Command python -ErrorAction SilentlyContinue + if ($pythonCommand) { + $pythonVersion = python --version 2>&1 + $versionPattern = 'Python (\d+)\.(\d+)\.(\d+)' + echo $pythonVersion + if ($pythonVersion -match $versionPattern) { + $major = [int]$matches[1] + $minor = [int]$matches[2] + if ($major -gt 3 -or ($major -eq 3 -and $minor -ge 10)) { + echo "python_exists=true" >> $GITHUB_OUTPUT + } + } + } + shell: pwsh +