-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (81 loc) · 2.43 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
77
78
79
80
81
82
83
84
85
env:
recipeType: "header_only"
on: [push, pull_request]
# bincrafters-conventions:gha-workflow-version:14
# 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:
# BPT_MATRIX_SPLIT_BY_BUILD_TYPES: "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 }}
env:
BPT_CONFIG_FILE_VERSION: "12"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: "0"
- uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Install Package Tools
run: |
pip install bincrafters_package_tools
conan user
- name: Generate Job Matrix
id: set-matrix
run: |
MATRIX=$(bincrafters-package-tools generate-ci-jobs --platform gha)
echo "${MATRIX}"
echo "matrix=${MATRIX}" >> $GITHUB_OUTPUT
conan:
needs: generate-matrix
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix: ${{fromJson(needs.generate-matrix.outputs.matrix)}}
name: ${{ matrix.config.name }}
env:
BPT_CONFIG_FILE_VERSION: "12"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: "0"
- uses: actions/setup-python@v4
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
finished:
needs: conan
runs-on: ubuntu-20.04
name: "All GitHub Actions Jobs Finished"
steps:
- name: Finish
run: |
echo "All GitHub Actions jobs finished"