Add CSV translator #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Continuous | |
| on: | |
| pull_request: | |
| paths-ignore: | |
| - "**.md" | |
| - "**.ipynb" | |
| - "**.json" | |
| - "**.html" | |
| - "**.js" | |
| - "**.css" | |
| - "android/**" | |
| push: | |
| paths-ignore: | |
| - "**.md" | |
| - "**.ipynb" | |
| - "**.json" | |
| - "**.html" | |
| - "**.js" | |
| - "**.css" | |
| - "android/**" | |
| jobs: | |
| build: | |
| if: github.repository == 'deepjavalibrary/djl' | |
| runs-on: ${{ matrix.operating-system }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| operating-system: [ ubuntu-latest, macos-latest, windows-latest ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'zulu' | |
| 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- | |
| - name: check disk space | |
| run: df -h | |
| - uses: dorny/paths-filter@v2 | |
| id: sentencepiece_changes | |
| with: | |
| filters: | | |
| src: | |
| - 'extensions/sentencepiece/**' | |
| - name: install libomp on macos | |
| if: ${{ runner.os == 'macOS' }} | |
| run: brew install libomp | |
| - name: Compile Sentencepiece JNI | |
| if: steps.sentencepiece_changes.outputs.src == 'true' | |
| run: | | |
| export CMAKE_POLICY_VERSION_MINIMUM=3.5 | |
| ./gradlew :extensions:sentencepiece:compileJNI | |
| shell: bash | |
| - uses: dorny/paths-filter@v2 | |
| id: fasttext_changes | |
| with: | |
| filters: | | |
| src: | |
| - 'extensions/fasttext/**' | |
| - name: Compile fastText JNI macOs | |
| if: ${{ steps.fasttext_changes.outputs.src == 'true' && runner.os == 'macOs' }} | |
| run: | | |
| export CMAKE_POLICY_VERSION_MINIMUM=3.5 | |
| ./gradlew :extensions:fasttext:compileJNI | |
| - name: Compile fastText JNI linux | |
| if: ${{ steps.fasttext_changes.outputs.src == 'true' && runner.os == 'Linux' }} | |
| # fasttext on linux requires gcc12, but ubuntu-latest uses at least gcc13 | |
| env: | |
| CC: gcc-12 | |
| CXX: g++-12 | |
| run: | | |
| export CMAKE_POLICY_VERSION_MINIMUM=3.5 | |
| ./gradlew :extensions:fasttext:compileJNI | |
| shell: bash | |
| - 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 | |
| - 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 | |
| - name: Test ONNX Runtime | |
| run: | | |
| ./gradlew "-Dai.djl.default_engine=OnnxRuntime" :integration:clean :integration:test | |
| - name: Build with Gradle | |
| run: ./gradlew build :jacoco:testCodeCoverageReport | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: reports-${{ matrix.operating-system }} | |
| path: | | |
| ${{ github.workspace }}/**/build/reports/**/* | |
| !${{ github.workspace }}/**/build/reports/jacoco/* | |
| - name: upload to codecov | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| files: ./jacoco/build/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml | |
| fail_ci_if_error: false | |
| path_to_write_report: ./codecov_report.txt |