-
Notifications
You must be signed in to change notification settings - Fork 1
195 lines (167 loc) · 6.99 KB
/
tao.yml
File metadata and controls
195 lines (167 loc) · 6.99 KB
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
name: Build and Test
on: [push, pull_request]
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:
submodules: true
- name: Generate Job Matrix
id: set-matrix
# env:
# MATRIX: '{"config": [{"name": "Linux GCC 10","compiler": "GCC","version": "10","os": "ubuntu-20.04"},{"name": "Linux GCC 9","compiler": "GCC","version": "9","os": "ubuntu-20.04"},{"name": "Linux GCC 8","compiler": "GCC","version": "8","os": "ubuntu-20.04"},{"name": "macOS apple-clang 12","compiler": "apple-clang","version": "12","os": "macos-10.15"}]}'
run: |
MATRIX=$(cat ./.github/matrix.json)
echo "${MATRIX}"
echo "::set-output name=matrix::${MATRIX}"
builds:
needs: generate-matrix
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix: ${{fromJson(needs.generate-matrix.outputs.matrix)}}
name: ${{ matrix.config.name }}
steps:
- name: Set git to use LF (Windows)
if: ${{ matrix.config.compiler == 'Visual Studio' }}
run: |
git config --global core.autocrlf false
git config --global core.eol lf
# git config --global --edit
# git config --global core.autocrlf true
# git config --global --edit
- uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
- uses: actions/setup-python@v1
with:
python-version: "3.8"
- name: Install Dependencies (Unix)
if: ${{ matrix.config.compiler != 'Visual Studio' }}
run: |
chmod +x .travis/install.sh
./.travis/install.sh
shell: bash
- name: Install Dependencies (Windows)
if: ${{ matrix.config.compiler == 'Visual Studio' }}
run: |
set PATH=%PYTHON%;%PYTHON%/Scripts/;%PATH%;
python.exe --version
cmake --version
python.exe -m pip install --upgrade pip
pip.exe install conan_package_tools==0.35.0
pip.exe install conan --upgrade
conan user
shell: cmd
- name: Settting EnvVars (Linux)
if: ${{ matrix.config.compiler == 'GCC' }}
shell: bash
run: |
echo "CONAN_GCC_VERSIONS=${{ matrix.config.version }}" >> $GITHUB_ENV
echo "CONAN_DOCKER_IMAGE=conanio/gcc${{ matrix.config.version }}" >> $GITHUB_ENV
- name: Settting EnvVars (macOS)
if: ${{ matrix.config.compiler == 'apple-clang' }}
shell: bash
run: |
echo "CONAN_APPLE_CLANG_VERSIONS=${{ matrix.config.version }}.0" >> $GITHUB_ENV
- name: Settting EnvVars (Windows)
if: ${{ matrix.config.compiler == 'Visual Studio' }}
# shell: bash
shell: powershell
run: |
echo "CONAN_VISUAL_VERSIONS=${{ matrix.config.version }}" >> $Env:GITHUB_ENV
echo "CONAN_VISUAL_RUNTIMES=${{ matrix.config.msvc_runtime }}" >> $Env:GITHUB_ENV
# echo "GITHUB_SHA_SHORT=$(echo $GITHUB_SHA | cut -c 1-6)" >> $env:GITHUB_ENV
- name: Build (Unix)
if: ${{ matrix.config.compiler != 'Visual Studio' }}
env:
CONAN_LOGIN_USERNAME: ${{ secrets.CONAN_LOGIN_USERNAME }}
CONAN_PASSWORD: ${{ secrets.CONAN_PASSWORD }}
CONAN_STABLE_BRANCH_PATTERN: "master$" #"release/*"
shell: bash
run: |
echo ${{ matrix.config.compiler }}
echo ${BPT_MATRIX}
echo ${CONAN_STABLE_BRANCH_PATTERN}
echo ${CONAN_GCC_VERSIONS}
echo ${CONAN_APPLE_CLANG_VERSIONS}
echo ${CONAN_DOCKER_IMAGE}
echo ${CONAN_LOGIN_USERNAME}
# git rev-list --count master
# git fetch --unshallow
# git fetch origin master:master
git rev-list --count master
chmod +x .travis/run.sh
./.travis/run.sh
- name: Build (Windows)
if: ${{ matrix.config.compiler == 'Visual Studio' }}
env:
CONAN_LOGIN_USERNAME: ${{ secrets.CONAN_LOGIN_USERNAME }}
CONAN_PASSWORD: ${{ secrets.CONAN_PASSWORD }}
CONAN_STABLE_BRANCH_PATTERN: "master$" #"release/*"
CONAN_UPLOAD: "https://taocpp.jfrog.io/artifactory/api/conan/tao"
shell: powershell
run: |
Write-Host "CONAN_VISUAL_VERSIONS: $Env:CONAN_VISUAL_VERSIONS"
Write-Host "CONAN_VISUAL_RUNTIMES: $Env:CONAN_VISUAL_RUNTIMES"
Write-Host "CONAN_UPLOAD: $Env:CONAN_UPLOAD"
# $a = python ci_utils/set_envvars_and_files.py
# Write-Host $a
# Invoke-Expression $a
# $ErrorActionPreference = 'SilentlyContinue'
# conan remote add kth https://taocpp.jfrog.io/artifactory/api/conan/tao
# $ErrorActionPreference = 'Continue'
# # conan info . --only None
# # conan info . --only None -s compiler=gcc -s compiler.version=5 -s compiler.libcxx=libstdc++
# python ci_utils/process_conan_reqs.py
# $ErrorActionPreference = 'SilentlyContinue'
# conan remove "*" -f
# conan remote remove kth
# conan remote remove kthbuild_kth_temp_
# $ErrorActionPreference = 'Continue'
python build.py
upload-aliases:
name: Upload Aliases
needs: [builds]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
- uses: actions/setup-python@v1
with:
python-version: "3.8"
- name: Install Dependencies
run: |
chmod +x .travis/install.sh
./.travis/install.sh
shell: bash
- name: Upload Aliases
env:
CONAN_LOGIN_USERNAME: ${{ secrets.CONAN_LOGIN_USERNAME }}
CONAN_PASSWORD: ${{ secrets.CONAN_PASSWORD }}
shell: bash
run: |
# echo "REPO_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $1}')" >> $GITHUB_ENV
REPO_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')
echo "My repo name is $REPO_NAME"
export TAO_BRANCH=$(echo '${{ github.ref }}' | awk -F '/' '{print $3}')
echo "My branch name is $TAO_BRANCH"
eval $(python ci_utils/set_envvars_and_files.py)
conan user
conan remote add upload_repo https://taocpp.jfrog.io/artifactory/api/conan/tao
conan user
conan user ${CONAN_LOGIN_USERNAME} -r upload_repo -p ${CONAN_PASSWORD}
conan user
echo "conan alias ${REPO_NAME}/0.1.X@tao/${TAO_CONAN_CHANNEL} ${REPO_NAME}/${TAO_CONAN_VERSION}@tao/${TAO_CONAN_CHANNEL}"
conan alias "${REPO_NAME}/0.1.X@tao/${TAO_CONAN_CHANNEL}" "${REPO_NAME}/${TAO_CONAN_VERSION}@tao/${TAO_CONAN_CHANNEL}"
echo "conan upload ${REPO_NAME}/0.1.X@tao/${TAO_CONAN_CHANNEL} --all -r upload_repo"
conan upload "${REPO_NAME}/0.1.X@tao/${TAO_CONAN_CHANNEL}" --all -r upload_repo
# References:
# https://github.com/radareorg/radare2