-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (67 loc) · 2.07 KB
/
conan.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
name: CI
on:
push:
branches:
- master
- testing/**
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
release:
types:
- published
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-18.04]
env:
CONAN_USERNAME: "conan"
CONAN_CHANNEL: "testing"
CONAN_REMOTES: https://api.bintray.com/conan/anton-matosov/general
CONAN_LOGIN_USERNAME: ${{ secrets.CONAN_LOGIN_USERNAME }}
CONAN_PASSWORD: ${{ secrets.CONAN_PASSWORD }}
CONAN_STABLE_BRANCH_PATTERN: "v\\d+\\.\\d+\\.\\d+"
CONAN_USER_HOME: "~/.conan"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: '3.7'
architecture: 'x64'
- name: Get pip cache
id: pip-cache
run: |
python -c "from pip._internal.locations import USER_CACHE_DIR; print('::set-output name=dir::' + USER_CACHE_DIR)"
- uses: actions/cache@v1
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- uses: actions/cache@v1
with:
path: ${{ env.CONAN_USER_HOME }}
key: ${{ runner.os }}-conan-${{ hashFiles('**/build.py') }}
restore-keys: |
${{ runner.os }}-conan-
- name: Install CPT
run: |
pip install -r requirements.txt --upgrade
- name: Build only
if: github.event_name == 'pull_request'
run: python build.py
- name: Build and publish
if: github.event_name == 'push'
env:
CONAN_UPLOAD: https://api.bintray.com/conan/anton-matosov/general
run: python build.py
- name: Build and publish stable
if: github.event_name == 'release'
env:
CONAN_CHANNEL: "stable"
CONAN_UPLOAD: https://api.bintray.com/conan/anton-matosov/general
run: python build.py