-
Notifications
You must be signed in to change notification settings - Fork 131
82 lines (78 loc) · 2.24 KB
/
build.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
name: "On Commit Workflow"
on:
pull_request:
push:
tags:
- v**
branches:
- master
jobs:
build-test:
runs-on: ubuntu-20.04
container: python:${{ matrix.python }}
strategy:
matrix:
python: ["3.10", "3.11", "3.12"]
steps:
- run: python3 --version
- name: Check out code
uses: actions/checkout@v3
- name: Install Python dependencies, Build, and Test
run: make setup-build-test
run-integration-tests:
runs-on: ubuntu-20.04
strategy:
matrix:
python: ["3.10", "3.11", "3.12"]
steps:
- name: Check out code
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python }}"
- name: Test Python version
run: |
installed="$(python --version)"
expected="${{ matrix.python }}"
echo $installed
[[ $installed =~ "Python ${expected}" ]] && echo "Configured Python" || (echo "Failed to configure Python" && exit 1)
- name: Integration tests using algod
run: make algod-integration
build-docset:
runs-on: ubuntu-20.04
strategy:
matrix:
python: ["3.10"]
steps:
- name: Check out code
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python }}"
- name: Install python dependencies
run: make setup-docs
- name: Make docs
run: make bundle-docs
- name: Archive docset
if: ${{ !env.ACT }}
uses: actions/upload-artifact@v3
with:
name: pyteal.docset
path: docs/pyteal.docset.tar.gz
upload-to-pypi:
runs-on: ubuntu-20.04
container: python:3.10
needs: ['build-test', 'run-integration-tests', 'build-docset']
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags') }}
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Install dependencies
run: make setup-wheel
- name: Build package
run: make bdist-wheel
- name: Release
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}