4444
4545jobs :
4646 run_tests :
47- name : Run tests with ${{ matrix.os }}, Python ${{ matrix.py_v}}, RedisAI ${{ matrix.rai }}
47+ name : Run tests ${{ matrix.subset }} with ${{ matrix.os }}, Python ${{ matrix.py_v}}, RedisAI ${{ matrix.rai }}
4848 runs-on : ${{ matrix.os }}
4949 strategy :
5050 fail-fast : false
5151 matrix :
52+ subset : [backends, slow_tests, group_a, group_b]
5253 os : [macos-12, ubuntu-20.04] # Operating systems
5354 compiler : [8] # GNU compiler version
54- rai : [1.2.5, 1.2. 7] # Redis AI versions
55+ rai : [1.2.7] # Redis AI versions
5556 py_v : [3.8, 3.9, '3.10'] # Python versions
56- exclude :
57- # Do not build with Redis AI 1.2.5 on MacOS
58- - os : macos-12
59- rai : 1.2.5
60- # Do not build Redis AI 1.2.5 with py3.10
61- # as wheels for dependecies are not availble
62- - py_v : ' 3.10'
63- rai : 1.2.5
57+
6458
6559 env :
6660 SMARTSIM_REDISAI : ${{ matrix.rai }}
8680 echo "$(brew --prefix)/opt/make/libexec/gnubin" >> $GITHUB_PATH
8781
8882 - name : Build Singularity from source
89- if : contains( matrix.os, 'ubuntu' ) && matrix.py_v == 3.9 && matrix.rai == '1.2.5'
83+ if : contains( matrix.os, 'ubuntu' ) && matrix.py_v == 3.9
9084 run : |
9185 sudo apt-get install -y libseccomp-dev pkg-config squashfs-tools cryptsetup curl git # wget build-essential
9286 echo 'export PATH=/usr/local/go/bin:$PATH' >> ~/.bashrc
@@ -100,16 +94,18 @@ jobs:
10094 sudo make -C builddir install
10195
10296 - name : singularity pull test container # This lets us time how long the pull takes
103- if : contains( matrix.os, 'ubuntu' ) && matrix.py_v == 3.9 && matrix.rai == '1.2.5'
97+ if : contains( matrix.os, 'ubuntu' ) && matrix.py_v == 3.9
10498 run : singularity pull docker://alrigazzi/smartsim-testing
10599
106100 # Note: The develop branch of smartredis is installed first to ensure that any tests that depend
107101 # on developments of the client are brought in.
108102 - name : Install SmartSim (with ML backends)
109103 run : |
104+
110105 python -m pip install git+https://github.com/CrayLabs/SmartRedis.git@develop#egg=smartredis
111106 python -m pip install .[dev,ml]
112107
108+
113109 - name : Install ML Runtimes with Smart (with pt, tf, and onnx support)
114110 if : (matrix.py_v != '3.10')
115111 run : smart build --device cpu --onnx -v
@@ -119,22 +115,43 @@ jobs:
119115 run : smart build --device cpu -v
120116
121117 - name : Run mypy
122- # TF 2.6.2 has a dep conflict with new mypy versions
123- if : (matrix.rai != '1.2.5')
124118 run : |
125119 python -m pip install .[mypy]
126120 make check-mypy
127121
128122 - name : Run Pylint
129123 run : make check-lint
130124
125+ # Run pytest (backends subdirectory)
131126 - name : Run Pytest
127+ if : (matrix.subset == 'backends')
132128 run : |
133129 echo "SMARTSIM_LOG_LEVEL=debug" >> $GITHUB_ENV
134- py.test -s --import-mode=importlib -o log_cli=true --cov=$(smart site) --cov-report=xml --cov-config=./tests/test_configs/cov/local_cov.cfg --ignore=tests/full_wlm/ ./tests/
130+ py.test -s --import-mode=importlib -o log_cli=true --cov=$(smart site) --cov-report=xml --cov-config=./tests/test_configs/cov/local_cov.cfg --ignore=tests/full_wlm/ ./tests/backends
131+
132+ # Run pytest (test subsets)
133+ - name : Run Pytest
134+ if : " !contains(matrix.subset, 'backends')" # if not running backend tests
135+ run : |
136+ echo "SMARTSIM_LOG_LEVEL=debug" >> $GITHUB_ENV
137+ py.test -s --import-mode=importlib -o log_cli=true --cov=$(smart site) --cov-report=xml --cov-config=./tests/test_configs/cov/local_cov.cfg --ignore=tests/full_wlm/ -m ${{ matrix.subset }} ./tests
138+
139+ # Upload artifacts on failure, ignoring binary files
140+ - name : Upload Artifact
141+ if : failure()
142+ uses : actions/upload-artifact@v3
143+ with :
144+ name : test_artifact
145+ path : |
146+ tests/test_output
147+ !**/*.so
148+ !**/*.pb
149+ !**/*.pt
150+ !**/core
151+ retention-days : 5
135152
136153 - name : Upload Pytest coverage to Codecov
137154 uses : codecov/codecov-action@v2
138155 with :
139- fail_ci_if_error : true
156+ fail_ci_if_error : false
140157 files : ./coverage.xml
0 commit comments