-
Notifications
You must be signed in to change notification settings - Fork 2
139 lines (118 loc) · 4.1 KB
/
ci.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
name: ci
on: push
env:
GITHUB_TOKEN: ${{ secrets.issue_github_token }}
CONAN_SYSREQUIRES_MODE: enabled
PYTHONUNBUFFERED: 1
jobs:
ci-frontend:
runs-on: ubuntu-22.04
steps:
- name: Setup npm
uses: actions/setup-node@v4
with:
node-version: "16"
- name: Checkout
uses: actions/checkout@v3
- name: Build static site
run: |
cd ccb-frontend
npm install
npm run build
- name: Deploy site
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: ccb-frontend/dist
clean: true
ci:
runs-on: ubuntu-20.04
steps:
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
run: |
echo "timestamp=$(date +%Y-%m-%d-%H-%M-%S)" >> $GITHUB_OUTPUT
- name: Configure ccache cache files
uses: actions/cache@v3
with:
path: ~/.ccache
key: ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: |
ccache-
- name: Install and configure ccache
run: |
sudo apt-get install ccache
ccache --version
ccache -s
echo "/usr/lib/ccache" >> $GITHUB_PATH
- name: Install and configure conan
run: |
python3 -m pip install "conan<2"
conan config install https://github.com/conan-io/hooks.git -sf hooks -tf hooks
conan config set hooks.conan-center
conan profile new default --detect
conan profile update settings.compiler.libcxx=libstdc++11 default
conan profile update conf.tools.system.package_manager:mode=install default
conan profile update conf.tools.system.package_manager:sudo=True default
conan profile show default
- name: Checkout
uses: actions/checkout@v3
- name: Edit version for release
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
run: |
CCB_VERSION=${GITHUB_REF:10}
echo "Version: $CCB_VERSION"
sed -i "s/\"0.0.0\"/\"$CCB_VERSION\"/" ccb/_version.py
- name: Install CCB locally
run: python3 -m pip install .
- name: Pylint
run: |
python3 -m pip install pylint
pylint ccb
- name: Clone CCI
run: |
git clone https://qchateau:[email protected]/conan-center-bot-testing/conan-center-index.git
cd conan-center-index
git remote add upstream https://github.com/conan-io/conan-center-index.git
git fetch upstream
git checkout upstream/master
git config --global user.email "[email protected]"
git config --global user.name "Quentin Chateau via Conan Center Bot"
- name: Update recipes
run: |
mkdir status
conan-center-bot auto-update-recipes \
--cci conan-center-index \
--github-token "$GITHUB_TOKEN" \
--push-to origin \
> ./status/v1-update.json
cat ./status/v1-update.json
- name: Update dev issue
run: |
conan-center-bot update-status-issue \
--no-link-pr \
--github-token "$GITHUB_TOKEN" \
./status/v1-update.json \
https://github.com/qchateau/conan-center-bot/issues/4
- name: Package
run: python3 setup.py sdist
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: status
folder: status
target-folder: dev
clean: false
- name: Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}