Skip to content

Commit

Permalink
addign graviton ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Aug 1, 2024
1 parent cd2898b commit f12da93
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 36 deletions.
38 changes: 19 additions & 19 deletions .github/workflows/ci_cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,24 @@ concurrency:

jobs:
ci-cpu:
runs-on: [self-hosted, graviton-test]
# strategy:
# fail-fast: false
# matrix:
# os: [ubuntu-20.04, macos-latest]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, macos-latest]
steps:
- name: Setup Python for M1
# if: matrix.os == 'macos-latest'
if: matrix.os == 'macos-latest'
uses: actions/setup-python@v5
with:
python-version: '3.10'
architecture: arm64
# - name: Setup Python for all other OS
# if: matrix.os != 'macos-latest'
# uses: actions/setup-python@v5
# with:
# python-version: '3.9'
# architecture: x64
- name: Setup Python for all other OS
if: matrix.os != 'macos-latest'
uses: actions/setup-python@v5
with:
python-version: '3.9'
architecture: x64
- name: Setup Java 17
uses: actions/setup-java@v3
with:
Expand All @@ -49,7 +49,7 @@ jobs:
python ts_scripts/install_dependencies.py --environment=dev
- name: Torchserve Sanity
env:
TS_MAC_ARM64_CPU_ONLY: 'False'
TS_MAC_ARM64_CPU_ONLY: ${{ matrix.os == 'macos-latest' && 'True' || 'False' }}
uses: nick-fields/retry@v3
with:
timeout_minutes: 60
Expand All @@ -59,9 +59,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
33 changes: 16 additions & 17 deletions .github/workflows/regression_tests_cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Run Regression Tests on CPU
on:
push:
branches:
- graviton_test
- master
pull_request:
branches:
- graviton_test
- master
merge_group:

concurrency:
Expand All @@ -16,24 +16,24 @@ concurrency:
jobs:
regression-cpu:
# creates workflows for OS: ubuntu, macOS M1
runs-on: [self-hosted, graviton-test]
# strategy:
# fail-fast: false
# matrix:
# os: [ubuntu-20.04, macos-latest]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, macos-latest]
steps:
- name: Setup Python for M1
# if: matrix.os == 'macos-latest'
if: matrix.os == 'macos-latest'
uses: actions/setup-python@v5
with:
python-version: '3.10'
architecture: arm64
# - name: Setup Python for all other OS
# if: matrix.os != 'macos-latest'
# uses: actions/setup-python@v5
# with:
# python-version: '3.9'
# architecture: x64
- name: Setup Python for all other OS
if: matrix.os != 'macos-latest'
uses: actions/setup-python@v5
with:
python-version: '3.9'
architecture: x64
- name: Setup Java 17
uses: actions/setup-java@v3
with:
Expand All @@ -46,9 +46,8 @@ jobs:
- name: Install dependencies
run: |
python ts_scripts/install_dependencies.py --environment=dev
pip install torchtext --no-deps
- name: Torchserve Regression Tests
env:
TS_MAC_ARM64_CPU_ONLY: 'False'
TS_MAC_ARM64_CPU_ONLY: ${{ matrix.os == 'macos-latest' && 'True' || 'False' }}
run: |
python test/regression_tests.py
python test/regression_tests.py
42 changes: 42 additions & 0 deletions .github/workflows/regression_tests_graviton_cpu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Run Regression Tests on CPU for Graviton

on:
push:
branches:
- master
pull_request:
branches:
- master
merge_group:

concurrency:
group: ci-cpu-${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }}
cancel-in-progress: true

jobs:
regression-cpu:
runs-on: [self-hosted, graviton-test]
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
architecture: arm64
- 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
pip install torchtext --no-deps
- name: Torchserve Regression Tests
env:
TS_MAC_ARM64_CPU_ONLY: 'False'
run: |
python test/regression_tests.py

0 comments on commit f12da93

Please sign in to comment.