Skip to content

Commit

Permalink
macos
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderDokuchaev committed Nov 25, 2024
1 parent 2284df5 commit 7ac7593
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: MacOS
permissions: read-all

on:
workflow_dispatch:
inputs:
pull_request_number:
description: 'The pull request number'
default: ''
schedule:
- cron: '0 0 * * 0'
pull_request:

jobs:
precommit-common:
runs-on: macos-latest
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
lfs: true
fetch-depth: 0 # Fetch full history to allow checking out any branch or PR
- name: Fetch and Checkout the Pull Request Branch
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.pull_request_number != '' }}
run: |
git fetch origin pull/${{ github.event.inputs.pull_request_number }}/head:pr-${{ github.event.inputs.pull_request_number }}
git checkout pr-${{ github.event.inputs.pull_request_number }}
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: "3.10"
cache: pip
- name: Install dependencies
run: |
pip install .
pip install -r tests/common/requirements.txt
- name: Print installed modules
run: pip list
- name: Run pre-commit
run: pytest -n 2 -ra tests/common

precommit-openvino:
runs-on: macos-latest
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
lfs: true
fetch-depth: 0 # Fetch full history to allow checking out any branch or PR
- name: Fetch and Checkout the Pull Request Branch
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.pull_request_number != '' }}
run: |
git fetch origin pull/${{ github.event.inputs.pull_request_number }}/head:pr-${{ github.event.inputs.pull_request_number }}
git checkout pr-${{ github.event.inputs.pull_request_number }}
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: "3.10"
cache: pip
- name: Install dependencies
run: |
pip install .
pip install -r tests/openvino/requirements.txt
- name: Print installed modules
run: pip list
- name: Run pre-commit
run: pytest -n 2 -ra tests/openvino --dist loadscope
env:
ONEDNN_MAX_CPU_ISA: AVX2
1 change: 1 addition & 0 deletions .github/workflows/precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- reopened
- synchronize
paths-ignore:
- '*' # TODO: remove
- '**/*.md'
- 'docs/**/*'
- 'tests/post_training/*' # post_training tests runs on Jenkins
Expand Down

0 comments on commit 7ac7593

Please sign in to comment.