-
Notifications
You must be signed in to change notification settings - Fork 1
85 lines (67 loc) · 2.13 KB
/
ci.yml
File metadata and controls
85 lines (67 loc) · 2.13 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
name: CI
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pipenv"
- name: Install pipenv
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
- name: Install dependencies
run: pipenv install --dev
- name: Lint with flake8
run: pipenv run flake8 . --count --statistics
- name: Check formatting with black
run: pipenv run black --check --verbose .
test:
runs-on: ubuntu-latest
steps:
- name: Install libxsmm
run: |
git clone https://github.com/libxsmm/libxsmm
cd libxsmm
git checkout 4e1aa5332123088916989651ae9b187ecba377dc
make generator
echo "$(pwd)/bin/libxsmm_gemm_generator"
cd ..
- uses: actions/checkout@v3
- name: Install gcc and nasm
run: sudo apt-get install -y gcc nasm
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pipenv"
- name: Install pipenv
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
- name: Install dependencies
run: pipenv install --dev
- name: Run tests
run: |
export PATH=$PATH:$(pwd)/libxsmm/bin
pipenv run make test
deploy_docker_image:
needs: [style, test]
if: github.ref == 'refs/heads/main'
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
push: true
tags: mlomb/onnx2code:latest