-
Notifications
You must be signed in to change notification settings - Fork 0
101 lines (88 loc) · 2.58 KB
/
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
name: Tests
on:
workflow_dispatch:
pull_request:
branches:
- master
- "**-beta"
jobs:
build-install-test:
strategy:
matrix:
os: ["windows-latest", "ubuntu-latest"] # , "macos-latest"]
python-version: ["3.11"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
#########
# Setup #
#########
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version and OS
run: |
python --version
python -c "import sys; print(sys.platform)"
- name: Add conda to path (Bash)
run: |
echo "$CONDA/condabin" >> $GITHUB_PATH
echo "$CONDA/Library/bin" >> $GITHUB_PATH
echo "CONDA_PREFIX=$CONDA" >> $GITHUB_ENV
shell: bash
###########
# Windows #
###########
- name: Install Conda dependencies (windows)
if: matrix.os == 'windows-latest'
run: |
conda install -c conda-forge mkl-service m2w64-toolchain vs2019_win-64 blas aesara -y
##################
# Linux (Ubuntu) #
##################
- name: Install conda dependencies (linux)
if: matrix.os == 'ubuntu-latest'
run: |
conda install -c conda-forge mkl-service gcc_linux-64 gxx_linux-64 blas aesara -y
###########
# Mac OSX #
###########
- name: Install conda dependencies (macos)
if: matrix.os == 'macos-latest'
run: |
conda install -c conda-forge mkl-service Clang blas aesara -y
- name: Xcode check (macos)
if: matrix.os == 'macos-latest'
run: |
clang --version
xcrun --show-sdk-path
##################
# Install Poetry #
##################
- name: Install package dependencies
run: |
pip install poetry
poetry install --with test
poetry run python -c "import pycmtensor as cmt; print(cmt.__version__)"
- name: Show contents of .aesararc
run: |
cat ~/.aesararc
shell: bash
- name: Show aesara.config ldflags
run: |
poetry run python -c "import aesara; print(aesara.config.blas__ldflags)"
poetry run python -c "import aesara; print(aesara.config.gcc__cxxflags)"
########
# Test #
########
- name: Test with pytest
run: |
poetry run pytest
- name: Upload coverage to codecov.io
if: |
(matrix.os == 'windows-latest') &&
(matrix.python-version == '3.11')
uses: codecov/codecov-action@v2
with:
files: coverage.xml