-
Notifications
You must be signed in to change notification settings - Fork 598
63 lines (52 loc) · 1.77 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# GitHub Actions build workflow
name: build
on: ["push", "pull_request"]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
timeout-minutes: 60
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install Java
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: 17
- name: Install dependencies - Linux
run: sudo apt-get update && sudo apt-get install libportaudio2 libsndfile1
if: matrix.os == 'ubuntu-latest'
- name: Install dependencies - macOS
run: |
echo "OMP_NUM_THREADS=1" >> $GITHUB_ENV
echo "PYTORCH_MPS_DISABLE=1" >> $GITHUB_ENV
echo "LLAMA_NO_METAL=1" >> $GITHUB_ENV
echo "TIKA_STARTUP_SLEEP=30" >> $GITHUB_ENV
echo "TIKA_STARTUP_MAX_RETRY=10" >> $GITHUB_ENV
brew install portaudio
if: matrix.os == 'macos-latest'
- name: Install dependencies - Windows
run: choco install wget
if: matrix.os == 'windows-latest'
- name: Build
run: |
pip install -U wheel
pip install .[all,dev] fasttext==0.9.2 pillow==10.4.0
pip cache purge
python -c "import nltk; nltk.download(['punkt', 'punkt_tab', 'averaged_perceptron_tagger_eng'])"
python --version
make data coverage
- uses: pre-commit/action@v3.0.0
if: matrix.os == 'ubuntu-latest'
- name: Test Coverage
run: coveralls --service=github
if: matrix.os == 'ubuntu-latest'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}