Skip to content

Commit

Permalink
Linux precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxim-Doronin committed Nov 14, 2024
1 parent 8c06cc7 commit 2b0f759
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/linux-precommit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: "Linux precommit"

permissions:
contents: read

on:
push:
pull_request:
workflow_dispatch:
branches: [ "npu/release/18.x" ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}


jobs:
Build:
name: Build
runs-on: ubuntu-latest
defaults:
run:
shell: bash
env:
CMAKE_BUILD_TYPE: 'Debug'
GITHUB_WORKSPACE: /__w/npu-plugin-llvm
NPU_PLUGIN_LLVM_REPO: /__w/npu-plugin-llvm/npu-plugin-llvm
NPU_PLUGIN_LLVM_PROJECT: /__w/npu-plugin-llvm/npu-plugin-llvm/llvm
NPU_PLUGIN_LLVM_PROJECT_BUILD_DIR: /__w/npu-plugin-llvm/npu-plugin-llvm/build
NPU_PLUGIN_LLVM_PROJECT_INSTALL_DIR: /__w/npu-plugin-llvm/npu-plugin-llvm/install
steps:
- name: Clone npu-plugin-llvm
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: ${{ env.NPU_PLUGIN_LLVM_REPO }}
submodules: 'true'

- name: Print system info
if: runner.os == 'Linux'
shell: bash
run: |
# Install pre-requisites for Fedora
if [[ -e /etc/fedora-release ]]; then
yum update -y -q && yum install -y -q procps
fi
echo "System: ${{ runner.os }}"
echo "System Architecture: ${{ runner.arch }}"
echo "CPU Info: "; lscpu
echo "RAM Info: "; free -h --si
echo "MEMORY Info: "; df -h
- name: Configure CMake
run: |
cmake \
-B ${NPU_PLUGIN_LLVM_PROJECT_BUILD_DIR} \
-S ${NPU_PLUGIN_LLVM_PROJECT} \
-DLLVM_ENABLE_PROJECTS=mlir \
-DCMAKE_INSTALL_PREFIX=${NPU_PLUGIN_LLVM_PROJECT_INSTALL_DIR} \
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
- name: Build
run: cmake --build ${NPU_PLUGIN_LLVM_PROJECT_BUILD_DIR} --config ${CMAKE_BUILD_TYPE}

0 comments on commit 2b0f759

Please sign in to comment.