Skip to content

Commit

Permalink
[ci] fix ci to test windows properly (#3543)
Browse files Browse the repository at this point in the history
  • Loading branch information
siddvenk authored Nov 26, 2024
1 parent 2ceed30 commit 73f7cb0
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 56 deletions.
57 changes: 3 additions & 54 deletions .github/workflows/continuous.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ jobs:
if: github.repository == 'deepjavalibrary/djl'
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ ubuntu-latest, macos-latest ]
operating-system: [ ubuntu-latest, macos-latest, windows-latest ]

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -85,7 +86,7 @@ jobs:
run: ./gradlew :engines:pytorch:pytorch-native:compileJNI
- name: Test ONNX Runtime
run: |
./gradlew -Dai.djl.default_engine=OnnxRuntime :integration:clean :integration:test
./gradlew "-Dai.djl.default_engine=OnnxRuntime" :integration:clean :integration:test
- name: Build with Gradle
run: ./gradlew build :jacoco:testCodeCoverageReport
- name: Upload test results
Expand All @@ -102,55 +103,3 @@ jobs:
files: ./jacoco/build/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml
fail_ci_if_error: false
path_to_write_report: ./codecov_report.txt

# Windows platform for testing hybrid engines
build-windows:
if: github.repository == 'deepjavalibrary/djl'
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: 17
# Enable gradle cache: https://github.com/actions/cache/blob/master/examples.md#java---gradle
- uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('*/build.gradle.kts', 'engines/**/build.gradle.kts', 'extensions/**/build.gradle.kts') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: dorny/paths-filter@v2
id: sentencepiece_changes
with:
filters: |
src:
- 'extensions/sentencepiece/**'
- name: Compile Sentencepiece JNI
if: steps.sentencepiece_changes.outputs.src == 'true'
run: ./gradlew :extensions:sentencepiece:compileJNI
- uses: dorny/paths-filter@v2
id: pytorch_changes
with:
filters: |
src:
- 'engines/pytorch/pytorch-native/**'
- name: Compile PyTorch JNI
if: steps.pytorch_changes.outputs.src == 'true'
run: ./gradlew :engines:pytorch:pytorch-native:compileJNI
- uses: dorny/paths-filter@v2
id: tokenizers_changes
with:
filters: |
src:
- 'extensions/tokenizers/**'
- name: Compile tokenizers JNI
if: steps.tokenizers_changes.outputs.src == 'true'
run: ./gradlew :extensions:tokenizers:compileJNI
- name: Integration tests
# MXNet integration test on Github Action fail due to memory limitation on Windows
run: |
./gradlew -Pjni "-Dai.djl.default_engine=PyTorch" test -x examples:test
./gradlew -Pjni --rerun-tasks "-Dai.djl.default_engine=TensorFlow" test -x examples:test
./gradlew --rerun-tasks "-Dai.djl.default_engine=OnnxRuntime" :integration:test
31 changes: 29 additions & 2 deletions .github/workflows/nightly_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ jobs:
if: github.repository == 'deepjavalibrary/djl'
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ macos-latest, ubuntu-latest ]
operating-system: [ macos-latest, ubuntu-latest, windows-latest ]

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -52,6 +53,7 @@ jobs:
if: github.repository == 'deepjavalibrary/djl'
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ macos-latest, ubuntu-latest, windows-latest ]

Expand All @@ -76,8 +78,9 @@ jobs:
if: github.repository == 'deepjavalibrary/djl'
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ ubuntu-latest, windows-latest ]
operating-system: [ macos-latest, ubuntu-latest, windows-latest ]

steps:
- uses: actions/checkout@v4
Expand All @@ -96,6 +99,30 @@ jobs:
- name: Test with Gradle
run: ./gradlew :integration:test "-Dai.djl.default_engine=TensorFlow"

test-onnx:
if: github.repository == 'deepjavalibrary/djl'
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ macos-latest, ubuntu-latest, windows-latest ]

steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: 17
- uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('*/build.gradle.kts', 'engines/**/build.gradle.kts', 'extensions/**/build.gradle.kts') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Test with Gradle
run: ./gradlew :integration:test "-Dai.djl.default_engine=OnnxRuntime"

test-aarch64:
if: github.repository == 'deepjavalibrary/djl'
runs-on: [ self-hosted, aarch64 ]
Expand Down

0 comments on commit 73f7cb0

Please sign in to comment.