This repository has been archived by the owner on Aug 23, 2021. It is now read-only.
generated from bincrafters/template-default
-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (69 loc) · 2.17 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
on: [push, pull_request]
# bincrafters-conventions:gha-workflow-version:10
# You can add custom environment variables above the version tag
# Do not modify the tag or anything below the tag
# This script gets automatically updated
#
# Possible configurations:
# env:
# splitByBuildTypes: "false" # Possible values "false", "true", default: false
#
# You can furthermore set any environment variable understood by Conan and Conan Package Tools
#
# You can also update the event triggers, which default to
# on: [push, pull_request]
name: conan
jobs:
generate-matrix:
name: Generate Job Matrix
runs-on: ubuntu-20.04
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: "0"
- uses: actions/setup-python@v1
with:
python-version: "3.8"
- name: Install Package Tools
run: |
pip install bincrafters_package_tools
conan user
- name: Generate Job Matrix
id: set-matrix
env:
splitByBuildTypes: ${{ env.splitByBuildTypes }}
run: |
MATRIX=$(bincrafters-package-tools generate-ci-jobs --platform gha)
echo "${MATRIX}"
echo "::set-output name=matrix::${MATRIX}"
conan:
needs: generate-matrix
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix: ${{fromJson(needs.generate-matrix.outputs.matrix)}}
name: ${{ matrix.config.name }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: "0"
- uses: actions/setup-python@v1
with:
python-version: "3.8"
- name: Install Conan
env:
BPT_MATRIX: ${{toJson(matrix.config)}}
run: |
pip install bincrafters_package_tools
# remove newlines from matrix first
matrix=$(echo ${BPT_MATRIX})
bincrafters-package-tools prepare-env --platform gha --config "${matrix}"
shell: bash
- name: Run
env:
CONAN_LOGIN_USERNAME: ${{ secrets.CONAN_LOGIN_USERNAME }}
CONAN_PASSWORD: ${{ secrets.CONAN_PASSWORD }}
run: |
bincrafters-package-tools --auto