|
| 1 | +name: "Linux precommit" |
| 2 | + |
| 3 | +permissions: |
| 4 | + contents: read |
| 5 | + |
| 6 | +on: |
| 7 | + push: |
| 8 | + pull_request: |
| 9 | + workflow_dispatch: |
| 10 | + branches: [ "npu/release/18.x" ] |
| 11 | + |
| 12 | +concurrency: |
| 13 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 14 | + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} |
| 15 | + |
| 16 | + |
| 17 | +jobs: |
| 18 | + Build: |
| 19 | + name: Build |
| 20 | + runs-on: ubuntu-latest |
| 21 | + defaults: |
| 22 | + run: |
| 23 | + shell: bash |
| 24 | + env: |
| 25 | + CMAKE_BUILD_TYPE: 'Debug' |
| 26 | + GITHUB_WORKSPACE: /__w/npu-plugin-llvm/npu-plugin-llvm |
| 27 | + NPU_PLUGIN_LLVM_REPO: /__w/npu-plugin-llvm/npu-plugin-llvm/npu-plugin-llvm |
| 28 | + NPU_PLUGIN_LLVM_PROJECT: /__w/npu-plugin-llvm/npu-plugin-llvm/npu-plugin-llvm/llvm |
| 29 | + NPU_PLUGIN_LLVM_PROJECT_BUILD_DIR: /__w/npu-plugin-llvm/npu-plugin-llvm/npu-plugin-llvm/build |
| 30 | + NPU_PLUGIN_LLVM_PROJECT_INSTALL_DIR: /__w/npu-plugin-llvm/npu-plugin-llvm/npu-plugin-llvm/install |
| 31 | + steps: |
| 32 | + - name: Clone NPU Plugin LLVM sources |
| 33 | + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 34 | + with: |
| 35 | + submodules: 'true' |
| 36 | + - name: Print system info |
| 37 | + if: runner.os == 'Linux' |
| 38 | + shell: bash |
| 39 | + run: | |
| 40 | + # Install pre-requisites for Fedora |
| 41 | + if [[ -e /etc/fedora-release ]]; then |
| 42 | + yum update -y -q && yum install -y -q procps |
| 43 | + fi |
| 44 | + |
| 45 | + echo "System: ${{ runner.os }}" |
| 46 | + echo "System Architecture: ${{ runner.arch }}" |
| 47 | + echo "CPU Info: "; lscpu |
| 48 | + echo "RAM Info: "; free -h --si |
| 49 | + echo "MEMORY Info: "; df -h |
| 50 | +
|
| 51 | + - name: Configure CMake |
| 52 | + run: | |
| 53 | + ll /__w/ |
| 54 | + ll /__w/npu-plugin-llvm |
| 55 | + ll /__w/npu-plugin-llvm/npu-plugin-llvm |
| 56 | + ll ${GITHUB_WORKSPACE} |
| 57 | + cmake \ |
| 58 | + -B ${NPU_PLUGIN_LLVM_PROJECT_BUILD_DIR} \ |
| 59 | + -S ${NPU_PLUGIN_LLVM_PROJECT} \ |
| 60 | + -DLLVM_ENABLE_PROJECTS=mlir \ |
| 61 | + -DCMAKE_INSTALL_PREFIX=${NPU_PLUGIN_LLVM_PROJECT_INSTALL_DIR} \ |
| 62 | + -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} |
| 63 | +
|
| 64 | + - name: Build |
| 65 | + run: cmake --build ${NPU_PLUGIN_LLVM_PROJECT_BUILD_DIR} --config ${CMAKE_BUILD_TYPE} |
0 commit comments