-
Notifications
You must be signed in to change notification settings - Fork 1
96 lines (77 loc) · 2.52 KB
/
python-app.yml
File metadata and controls
96 lines (77 loc) · 2.52 KB
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
# This workflow will install Python dependencies and run tests
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Unit Tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
test-pytest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v6
with:
python-version: "3.10"
cache: "pip"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
if [ -f requirements-ci.txt ]; then pip install -r requirements-ci.txt; fi
- name: Test with pytest
run: |
PYTHONPATH=`pwd` pytest
test-csl:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v6
with:
python-version: "3.10"
cache: "pip"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
if [ -f requirements-ci.txt ]; then pip install -r requirements-ci.txt; fi
- name: Install CSL dependencies
run: |
. /etc/os-release
echo "Using Ubuntu version $UBUNTU_CODENAME"
# Make dependency setup faster
echo 'set man-db/auto-update false' | sudo debconf-communicate >/dev/null
sudo dpkg-reconfigure man-db
sudo apt-get update
sudo apt-get install -y build-essential libssl-dev uuid-dev libgpgme11-dev squashfs-tools
wget -q -O singularity.deb https://github.com/sylabs/singularity/releases/download/v4.2.1/singularity-ce_4.2.1-${UBUNTU_CODENAME}_amd64.deb
sudo apt install ./singularity.deb
singularity --version
- name: Cache dependencies
id: cache-deps
uses: actions/cache@v4
with:
path: cerebras-sdk
key: ${{ runner.os }}-deps
- name: Install Cerebras SDK v1.4.0
if: steps.cache-deps.outputs.cache-hit != 'true'
run: |
mkdir cerebras-sdk
cd cerebras-sdk
wget -q -O sdk-1.4.0.tar.gz "${{ secrets.CSL_SDK_URL }}"
tar xf sdk-1.4.0.tar.gz
rm sdk-1.4.0.tar.gz
cd ..
- name: Test Cerebras SDK
run: |
./cerebras-sdk/cslc -h
- name: Test CSL with simulator
run: |
pip install --no-deps -e .
export PATH=$PATH:`pwd`/cerebras-sdk
./tests/csl_runtime/run_tests.sh