feature: Add more APIs to L0 Sysman python binding #321
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: | |
| push: | |
| branches: [ master,release_branch* ] | |
| pull_request: | |
| branches: [ master,release_branch* ] | |
| workflow_dispatch: | |
| permissions: read-all | |
| jobs: | |
| # Linux job: Build static loader from master, dynamic loader from PR, test static loader with PR dynamic loader | |
| build-linux: | |
| if: github.repository_owner == 'oneapi-src' | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Use ccache-action for ccache setup and caching | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| path: pr | |
| - uses: hendrikmuhs/ccache-action@v1 | |
| # Checkout master branch for static loader source | |
| - name: Checkout master branch for static loader | |
| uses: actions/checkout@v3 | |
| with: | |
| ref: master | |
| fetch-depth: 0 | |
| path: master | |
| # Build static loader from master branch | |
| - name: Build Static Loader from master | |
| run: | | |
| cd master | |
| mkdir build | |
| cd build | |
| cmake \ | |
| -D CMAKE_C_COMPILER_LAUNCHER=ccache \ | |
| -D CMAKE_CXX_COMPILER_LAUNCHER=ccache \ | |
| -D CMAKE_BUILD_TYPE=Release \ | |
| -D BUILD_L0_LOADER_TESTS=1 \ | |
| -D BUILD_STATIC=1 \ | |
| .. | |
| make -j$(nproc) | |
| # Build dynamic loader from PR branch | |
| - name: Build Dynamic Loader from PR | |
| run: | | |
| cd pr | |
| mkdir dynamic_build | |
| cd dynamic_build | |
| cmake \ | |
| -D CMAKE_C_COMPILER_LAUNCHER=ccache \ | |
| -D CMAKE_CXX_COMPILER_LAUNCHER=ccache \ | |
| -D CMAKE_BUILD_TYPE=Release \ | |
| -D BUILD_STATIC=0 \ | |
| -D BUILD_L0_LOADER_TESTS=1 \ | |
| .. | |
| make -j$(nproc) | |
| # Run CTest in static loader's build directory, using PR dynamic loader via ZEL_LIBRARY_PATH | |
| - name: Run CTest with PR dynamic loader and master static loader | |
| env: | |
| ZEL_LIBRARY_PATH: '${{ github.workspace }}/pr/dynamic_build/lib' | |
| working-directory: master/build | |
| run: | | |
| ls $ZEL_LIBRARY_PATH | |
| ctest -V | |
| # Windows job: Build static loader from master, dynamic loader from PR, test static loader with PR dynamic loader | |
| build-windows: | |
| if: github.repository_owner == 'oneapi-src' | |
| runs-on: windows-latest | |
| steps: | |
| # Checkout PR branch (dynamic loader source) | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| path: pr | |
| # Checkout master branch for static loader source | |
| - name: Checkout master branch for static loader | |
| uses: actions/checkout@v3 | |
| with: | |
| ref: master | |
| fetch-depth: 0 | |
| path: master | |
| - name: Setup Windows build environment | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: x64 | |
| # Build static loader from master branch | |
| - name: Build Static Loader from master | |
| run: | | |
| cd master | |
| mkdir build | |
| cd build | |
| cmake -G "Ninja" -D CMAKE_BUILD_TYPE=Release -D BUILD_L0_LOADER_TESTS=1 -D BUILD_STATIC=1 .. | |
| cmake --build . | |
| # TEMPORARY WORKAROUND — safe to remove once this PR's changes have merged to master. | |
| # | |
| # Background: The CI was switched from the Visual Studio generator (-G "Visual Studio 17 2022") | |
| # to Ninja (-G "Ninja") because windows-latest now ships with Visual Studio 2026 (v18), | |
| # which CMake 3.31 does not recognise as a valid generator. | |
| # | |
| # The VS generator is multi-config and places build outputs under bin/<CONFIG>/ | |
| # (e.g. bin/Release/). Ninja is single-config and places outputs directly under bin/. | |
| # | |
| # master's test/CMakeLists.txt still contains hardcoded bin/$<CONFIG>/ paths in its | |
| # CTest ENVIRONMENT properties (e.g. bin/Release/ze_null_test1.dll). This PR fixes | |
| # those paths to use $<TARGET_FILE_DIR:ze_null_test1>/ which is generator-agnostic, | |
| # but until that fix lands on master the n-1 build (which checks out master for the | |
| # static loader) will fail to find the DLLs. | |
| # | |
| # This junction makes bin/Release/ point to bin/ so the old hardcoded paths resolve | |
| # correctly. Once the fix is on master, Ninja will place DLLs in bin/ and the CTest | |
| # properties will resolve directly there — this junction will never be traversed and | |
| # can be removed along with this comment. | |
| # This command assumes default shell is 'powershell' | |
| if (-not (Test-Path bin\Release)) { | |
| New-Item -ItemType Junction -Path bin\Release -Target (Resolve-Path bin).Path | |
| } | |
| # Build dynamic loader from PR branch | |
| - name: Build Dynamic Loader from PR | |
| run: | | |
| cd pr | |
| mkdir dynamic_build | |
| cd dynamic_build | |
| cmake -G "Ninja" -D CMAKE_BUILD_TYPE=Release -D BUILD_L0_LOADER_TESTS=0 -D BUILD_STATIC=0 .. | |
| cmake --build . | |
| # Run CTest in static loader's build directory, using PR dynamic loader via ZEL_LIBRARY_PATH | |
| - name: Run CTest with PR dynamic loader and master static loader | |
| env: | |
| ZEL_LIBRARY_PATH: '${{ github.workspace }}\\pr\\dynamic_build\\bin' | |
| working-directory: master/build | |
| run: ctest -V |