From b10c3c267951bd49fd43c0ddc6f2f01cdc0d6045 Mon Sep 17 00:00:00 2001 From: udaij12 Date: Thu, 8 Feb 2024 14:01:49 -0800 Subject: [PATCH] adding m1 to normal tests and ci --- .github/workflows/ci_cpu.yml | 26 +++--- .github/workflows/regression_tests_cpu.yml | 18 +++-- .github/workflows/regression_tests_cpu_m1.yml | 80 +++++++++---------- 3 files changed, 68 insertions(+), 56 deletions(-) diff --git a/.github/workflows/ci_cpu.yml b/.github/workflows/ci_cpu.yml index 85951f1e88..a2dbdec8f9 100644 --- a/.github/workflows/ci_cpu.yml +++ b/.github/workflows/ci_cpu.yml @@ -4,10 +4,10 @@ on: workflow_dispatch: push: branches: - - master + - M1_changes pull_request: branches: - - master + - M1_changes merge_group: @@ -21,9 +21,15 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-20.04, macOS-latest] + os: [ubuntu-20.04, macOS-latest, macos-14] steps: - - name: Setup Python 3.8 + - name: Setup Python for M1 + if: matrix.os == 'macos-14' + uses: actions/setup-python@v5 + with: + python-version: '3.10' + - name: Setup Python for all other OS + if: matrix.os != 'macos-14' uses: actions/setup-python@v4 with: python-version: 3.8 @@ -50,9 +56,9 @@ jobs: python torchserve_sanity.py # Any coverage.xml will be picked up by this step # Just make sure each coverage.xml is in a different folder - - name: Upload codecov - if: matrix.os == 'ubuntu-20.04' - run : | - curl -Os https://uploader.codecov.io/latest/linux/codecov - chmod +x codecov - ./codecov + # - name: Upload codecov + # if: matrix.os == 'ubuntu-20.04' + # run : | + # curl -Os https://uploader.codecov.io/latest/linux/codecov + # chmod +x codecov + # ./codecov diff --git a/.github/workflows/regression_tests_cpu.yml b/.github/workflows/regression_tests_cpu.yml index 324c8cad05..188a17eb8f 100644 --- a/.github/workflows/regression_tests_cpu.yml +++ b/.github/workflows/regression_tests_cpu.yml @@ -3,10 +3,10 @@ name: Run Regression Tests on CPU on: push: branches: - - master + - M1_changes pull_request: branches: - - master + - M1_changes merge_group: concurrency: @@ -15,15 +15,21 @@ concurrency: jobs: regression-cpu: - # creates workflows for OS: ubuntu, macOS + # creates workflows for OS: ubuntu, macOS, macOS M1 runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - os: [ubuntu-20.04, macOS-latest] + os: [ubuntu-20.04, macOS-latest, macos-14] steps: - - name: Setup Python 3.8 - uses: actions/setup-python@v3 + - name: Setup Python for M1 + if: matrix.os == 'macos-14' + uses: actions/setup-python@v5 + with: + python-version: '3.10' + - name: Setup Python for all other OS + if: matrix.os != 'macos-14' + uses: actions/setup-python@v4 with: python-version: 3.8 architecture: x64 diff --git a/.github/workflows/regression_tests_cpu_m1.yml b/.github/workflows/regression_tests_cpu_m1.yml index e9b2b3ab56..14354e6992 100644 --- a/.github/workflows/regression_tests_cpu_m1.yml +++ b/.github/workflows/regression_tests_cpu_m1.yml @@ -1,43 +1,43 @@ -name: Run Regression Tests on CPU +# name: Run Regression Tests on CPU -on: - push: - branches: - - M1_changes - pull_request: - branches: - - M1_changes - merge_group: +# on: +# push: +# branches: +# - M1_changes +# pull_request: +# branches: +# - M1_changes +# merge_group: -concurrency: - group: ci-cpu-${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }} - cancel-in-progress: true +# concurrency: +# group: ci-cpu-${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }} +# cancel-in-progress: true -jobs: - regression-cpu: - # creates workflows for Mac OS M1 - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [macos-14] - steps: - - name: Setup Python 3.10 - uses: actions/setup-python@v5 - with: - python-version: '3.10' - - name: Setup Java 17 - uses: actions/setup-java@v3 - with: - distribution: 'zulu' - java-version: '17' - - name: Checkout TorchServe - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Install dependencies - run: | - python ts_scripts/install_dependencies.py --environment=dev - - name: Torchserve Regression Tests - run: | - python test/regression_tests.py +# jobs: +# regression-cpu: +# # creates workflows for Mac OS M1 +# runs-on: ${{ matrix.os }} +# strategy: +# fail-fast: false +# matrix: +# os: [macos-14] +# steps: +# - name: Setup Python 3.10 +# uses: actions/setup-python@v5 +# with: +# python-version: '3.10' +# - name: Setup Java 17 +# uses: actions/setup-java@v3 +# with: +# distribution: 'zulu' +# java-version: '17' +# - name: Checkout TorchServe +# uses: actions/checkout@v3 +# with: +# submodules: recursive +# - name: Install dependencies +# run: | +# python ts_scripts/install_dependencies.py --environment=dev +# - name: Torchserve Regression Tests +# run: | +# python test/regression_tests.py