-
Notifications
You must be signed in to change notification settings - Fork 100
125 lines (120 loc) · 3.37 KB
/
misc-tests.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
name: misc-tests
on:
pull_request:
push:
schedule:
- cron: "0 7 * * *" # Run once daily
permissions:
contents: read # to fetch code (actions/checkout)
defaults:
run:
shell: bash -l {0}
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test-sdist:
name: Test sdist
runs-on: ubuntu-latest
env:
COMMIT_ID: ${{ github.sha }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_IAM_S3_UPLOADER }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_IAM_S3_UPLOADER }}
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
- uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Miniforge3
miniforge-version: latest
activate-environment: dev
environment-file: ops/conda_env/dev.yml
use-mamba: true
- name: Display Conda env
run: |
conda info
conda list
- name: Test sdist
run: |
bash ops/test-sdist.sh
test-cmake-import:
name: Test using Treelite as a library, via CMake export (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
- uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Miniforge3
miniforge-version: latest
activate-environment: dev
environment-file: ops/conda_env/dev.yml
use-mamba: true
- name: Display Conda env
run: |
conda info
conda list
- name: Test using Treelite as a library
run: |
bash ops/test-cmake-import.sh
test-serializer-compatibility:
name: Test backward compatibility of serializers
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
- uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Miniforge3
miniforge-version: latest
activate-environment: dev
environment-file: ops/conda_env/dev.yml
use-mamba: true
- name: Display Conda env
run: |
conda info
conda list
- name: Test compatibility
run: |
bash ops/test-serializer-compatibility.sh
test-custom-libpath:
name: Test Treelite with custom libpath
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
- uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Miniforge3
miniforge-version: latest
activate-environment: dev
environment-file: ops/conda_env/dev.yml
use-mamba: true
- name: Display Conda env
run: |
conda info
conda list
- name: Test Treelite with custom libpath
run: |
mkdir build
cd build
cmake .. -GNinja -DCMAKE_INSTALL_PREFIX=/opt/treelite
ninja install -v
cd ../python
pip install --force-reinstall -v . --config-settings use_system_libtreelite=True \
--config-settings system_libtreelite_dir=/opt/treelite/lib
cd ..
rm -rf build/
python -c "import treelite; print(treelite.core._LIB)"