From 9b3311b51d1a160e52ab6a467bee75f458da4f48 Mon Sep 17 00:00:00 2001 From: saurabh katiyar Date: Tue, 30 Jul 2024 10:47:57 +0000 Subject: [PATCH 1/5] ci workflow for itt python --- .github/workflows/ci_itt_python.yml | 48 +++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/ci_itt_python.yml diff --git a/.github/workflows/ci_itt_python.yml b/.github/workflows/ci_itt_python.yml new file mode 100644 index 0000000..e3e3700 --- /dev/null +++ b/.github/workflows/ci_itt_python.yml @@ -0,0 +1,48 @@ +# Ci workflow to be triggered for every pull-request and push +name: "CI ITT PYTHON" + +on: + push: + branches: ["**"] + pull_request: + # The branches below must be a subset of the branches above + branches: ["master"] + +permissions: + contents: read + +jobs: + build: + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-latest + - os: windows-latest + runs-on: ['${{matrix.os}}'] + + steps: + - name: Checkout code + uses: actions/checkout@v1 + - name: install ittapi + run: | + cd python + python3 -m pip install . + + test: + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-latest + - os: windows-latest + runs-on: ['${{matrix.os}}'] + needs: build + + steps: + - name: Checkout code + uses: actions/checkout@v1 + - name: run unit-test + run: | + cd python + python3 -m unittest discover -s utest -t utest From 9fce0c8726c9e888e0171a4f47a75387ea7203c2 Mon Sep 17 00:00:00 2001 From: saurabh katiyar Date: Wed, 31 Jul 2024 05:49:16 +0000 Subject: [PATCH 2/5] merged python ci to main CI --- .github/workflows/ci_itt_python.yml | 48 ----------------------------- .github/workflows/main.yml | 36 ++++++++++++++++++++++ 2 files changed, 36 insertions(+), 48 deletions(-) delete mode 100644 .github/workflows/ci_itt_python.yml diff --git a/.github/workflows/ci_itt_python.yml b/.github/workflows/ci_itt_python.yml deleted file mode 100644 index e3e3700..0000000 --- a/.github/workflows/ci_itt_python.yml +++ /dev/null @@ -1,48 +0,0 @@ -# Ci workflow to be triggered for every pull-request and push -name: "CI ITT PYTHON" - -on: - push: - branches: ["**"] - pull_request: - # The branches below must be a subset of the branches above - branches: ["master"] - -permissions: - contents: read - -jobs: - build: - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-latest - - os: windows-latest - runs-on: ['${{matrix.os}}'] - - steps: - - name: Checkout code - uses: actions/checkout@v1 - - name: install ittapi - run: | - cd python - python3 -m pip install . - - test: - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-latest - - os: windows-latest - runs-on: ['${{matrix.os}}'] - needs: build - - steps: - - name: Checkout code - uses: actions/checkout@v1 - - name: run unit-test - run: | - cd python - python3 -m unittest discover -s utest -t utest diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b1efb80..6529163 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -92,3 +92,39 @@ jobs: # The Windows CI transforms the `c-library` symlink into a real directory, modifying the Git # state, so we ignore these changes with `--allow-dirty` here. run: scripts/verify-publish.sh --allow-dirty + + itt_python_build: + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-latest + - os: windows-latest + runs-on: ['${{matrix.os}}'] + + steps: + - name: Checkout code + uses: actions/checkout@v1 + - name: install ittapi + run: | + cd python + python3 -m pip install . + + itt_python_unit_test: + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-latest + - os: windows-latest + runs-on: ['${{matrix.os}}'] + needs: itt_python_build + + steps: + - name: Checkout code + uses: actions/checkout@v1 + - name: run unit-test + run: | + cd python + python3 -m unittest discover -s utest -t utest + From e2e6a185462ecfb07be932006c043dc92a311850 Mon Sep 17 00:00:00 2001 From: saurabh katiyar Date: Thu, 1 Aug 2024 12:45:12 +0000 Subject: [PATCH 3/5] fixed review comments --- .github/workflows/main.yml | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6529163..45326b5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -93,7 +93,7 @@ jobs: # state, so we ignore these changes with `--allow-dirty` here. run: scripts/verify-publish.sh --allow-dirty - itt_python_build: + itt_python_build_and_test: strategy: fail-fast: false matrix: @@ -105,26 +105,12 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v1 - - name: install ittapi + - name: Build and Install ittapi run: | cd python python3 -m pip install . - - itt_python_unit_test: - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-latest - - os: windows-latest - runs-on: ['${{matrix.os}}'] - needs: itt_python_build - - steps: - - name: Checkout code - uses: actions/checkout@v1 - - name: run unit-test + - name: Run unit-test run: | cd python python3 -m unittest discover -s utest -t utest - + From adff2cc3a7f19cf9cd5dc3a8fe0d134a34f6eeac Mon Sep 17 00:00:00 2001 From: Saurabh Katiyar Date: Fri, 2 Aug 2024 10:28:14 +0530 Subject: [PATCH 4/5] code review fixes --- .github/workflows/main.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 45326b5..ac67817 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -93,24 +93,27 @@ jobs: # state, so we ignore these changes with `--allow-dirty` here. run: scripts/verify-publish.sh --allow-dirty - itt_python_build_and_test: + python_build: + name: Check Python bindings strategy: fail-fast: false matrix: include: - os: ubuntu-latest - os: windows-latest - runs-on: ['${{matrix.os}}'] + runs-on: ${{ matrix.os }} + + defaults: + run: + working-directory: python steps: - - name: Checkout code - uses: actions/checkout@v1 + - name: Checkout sources + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Build and Install ittapi run: | - cd python python3 -m pip install . - name: Run unit-test run: | - cd python python3 -m unittest discover -s utest -t utest From 9e66e41039e367408f5892ac47527f11ced4b24d Mon Sep 17 00:00:00 2001 From: Saurabh Katiyar Date: Mon, 5 Aug 2024 14:33:43 +0530 Subject: [PATCH 5/5] Update .github/workflows/main.yml Co-authored-by: Eugeny Parshutin --- .github/workflows/main.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ac67817..3023f99 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -95,25 +95,21 @@ jobs: python_build: name: Check Python bindings + runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: include: - os: ubuntu-latest - os: windows-latest - runs-on: ${{ matrix.os }} - defaults: run: working-directory: python - steps: - name: Checkout sources uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Build and Install ittapi - run: | - python3 -m pip install . - - name: Run unit-test - run: | - python3 -m unittest discover -s utest -t utest + - name: Build and install ittapi package + run: python -m pip install . + - name: Run unit tests + run: python -m unittest discover -s utest -t utest