|
1 | 1 | name: CI |
2 | 2 | env: |
3 | | - BINUTILS_VERSION: 2.35.2 |
| 3 | + BUILD_DIR: xa-build |
4 | 4 |
|
5 | 5 | on: |
6 | 6 | push: |
|
11 | 11 | workflow_dispatch: |
12 | 12 |
|
13 | 13 | jobs: |
14 | | - build_linux: |
15 | | - runs-on: ubuntu-18.04 |
| 14 | + build_llvm_linux: |
| 15 | + runs-on: ubuntu-20.04 |
16 | 16 | steps: |
17 | 17 | - uses: actions/checkout@v2 |
| 18 | + with: |
| 19 | + submodules: recursive |
| 20 | + |
| 21 | + - name: Install LLVM build dependencies |
| 22 | + run: >- |
| 23 | + sudo apt-get update; |
| 24 | + sudo apt-get -f -u install cmake ninja-build chrpath texinfo sharutils libffi-dev |
| 25 | + lsb-release patchutils diffstat xz-utils python3-dev libedit-dev libncurses5-dev swig |
| 26 | + python3-six python3-sphinx binutils-dev libxml2-dev libjsoncpp-dev pkg-config lcov |
| 27 | + procps help2man zlib1g-dev g++-multilib libjs-mathjax python3-recommonmark libpfm4-dev |
| 28 | + python3-setuptools libz3-dev ccache |
| 29 | +
|
| 30 | + - name: build Linux LLVM |
| 31 | + run: ./build-llvm.sh |
| 32 | + |
| 33 | + - name: package LLVM config and build logs |
| 34 | + if: ${{ always() }} |
| 35 | + run: find ${BUILD_DIR} -name 'config.*' -o -name '*.log' -o -name 'CMakeCache.txt' | zip -9 build-logs-linux-llvm.zip -@ |
| 36 | + |
| 37 | + - name: upload LLVM config and build logs |
| 38 | + if: ${{ always() }} |
| 39 | + uses: actions/upload-artifact@v2 |
| 40 | + with: |
| 41 | + name: build-logs |
| 42 | + path: build-logs-linux-llvm.zip |
| 43 | + |
| 44 | + - name: package LLVM artifacts |
| 45 | + run: tar cjf artifacts-linux-llvm.tar.bz2 artifacts |
| 46 | + |
| 47 | + - name: upload Linux LLVM artifacts |
| 48 | + uses: actions/upload-artifact@v2 |
| 49 | + with: |
| 50 | + name: linux |
| 51 | + path: artifacts-linux-llvm.tar.bz2 |
| 52 | + |
| 53 | + build_binutils_linux: |
| 54 | + runs-on: ubuntu-20.04 |
| 55 | + steps: |
| 56 | + - uses: actions/checkout@v2 |
| 57 | + with: |
| 58 | + submodules: recursive |
| 59 | + |
| 60 | + - name: Install Binutils build dependencies |
| 61 | + run: >- |
| 62 | + sudo apt-get update; |
| 63 | + sudo apt-get -f -u install mingw-w64 autoconf gettext texinfo dwz xz-utils zlib1g-dev libz-mingw-w64-dev |
| 64 | +
|
| 65 | + - name: build Linux and Windows Binutils |
| 66 | + run: ./build-binutils.sh |
| 67 | + |
| 68 | + - name: package Binutils config and build logs |
| 69 | + if: ${{ always() }} |
| 70 | + run: find ${BUILD_DIR} -name 'config.*' | zip -9 build-logs-linux-binutils.zip -@ |
| 71 | + |
| 72 | + - name: upload Binutils config and build logs |
| 73 | + if: ${{ always() }} |
| 74 | + uses: actions/upload-artifact@v2 |
| 75 | + with: |
| 76 | + name: build-logs |
| 77 | + path: build-logs-linux-binutils.zip |
| 78 | + |
| 79 | + - name: package Binutils artifacts |
| 80 | + run: tar cjf artifacts-linux-binutils.tar.bz2 artifacts |
| 81 | + |
| 82 | + - name: upload Linux and Windows Binutils artifacts |
| 83 | + uses: actions/upload-artifact@v2 |
| 84 | + with: |
| 85 | + name: linux |
| 86 | + path: artifacts-linux-binutils.tar.bz2 |
| 87 | + |
| 88 | + build_xautils_linux: |
| 89 | + runs-on: ubuntu-20.04 |
| 90 | + steps: |
| 91 | + - uses: actions/checkout@v2 |
| 92 | + with: |
| 93 | + submodules: recursive |
| 94 | + |
| 95 | + - name: Install Xamarin.Android Utilities build dependencies |
| 96 | + run: >- |
| 97 | + sudo apt-get update; |
| 98 | + sudo apt-get -f -u install mingw-w64 cmake ninja-build xz-utils zlib1g-dev libz-mingw-w64-dev |
| 99 | +
|
| 100 | + - name: build Linux and Windows Xamarin.Android Utilities |
| 101 | + run: CC=gcc-10 CXX=g++-10 ./build-xa-utils.sh |
| 102 | + |
| 103 | + - name: package Xamarin.Android Utilities config and build logs |
| 104 | + if: ${{ always() }} |
| 105 | + run: find ${BUILD_DIR} -name 'CMakeCache.txt' -o -name 'CMake*.log' | zip -9 build-logs-linux-xa-utils.zip -@ |
| 106 | + |
| 107 | + - name: upload Xamarin.Android Utilities config and build logs |
| 108 | + if: ${{ always() }} |
| 109 | + uses: actions/upload-artifact@v2 |
| 110 | + with: |
| 111 | + name: build-logs |
| 112 | + path: build-logs-linux-xa-utils.zip |
| 113 | + |
| 114 | + - name: package Xamarin.Android Utilities artifacts |
| 115 | + run: tar cjf artifacts-linux-xa-utils.tar.bz2 artifacts |
| 116 | + |
| 117 | + - name: upload Linux and Windows Xamarin.Android Utilities artifacts |
| 118 | + uses: actions/upload-artifact@v2 |
| 119 | + with: |
| 120 | + name: linux |
| 121 | + path: artifacts-linux-xa-utils.tar.bz2 |
| 122 | + |
| 123 | + build_llvm_macos: |
| 124 | + runs-on: macos-11 |
| 125 | + steps: |
| 126 | + - uses: actions/checkout@v2 |
| 127 | + with: |
| 128 | + submodules: recursive |
18 | 129 |
|
19 | | - - name: Install build dependencies |
| 130 | + - name: Install LLVM build dependencies |
20 | 131 | run: | |
21 | | - sudo apt-get update |
22 | | - sudo apt-get -f -u install mingw-w64 autoconf gettext texinfo dwz xz-utils zlib1g-dev |
| 132 | + brew update |
| 133 | + brew install cmake ninja ccache |
23 | 134 |
|
24 | | - - name: build Linux and Windows |
25 | | - run: ./build.sh ${BINUTILS_VERSION} |
| 135 | + - name: build macOS LLVM |
| 136 | + run: bash ./build-llvm.sh |
26 | 137 |
|
27 | | - - name: package config and build logs |
| 138 | + - name: package LLVM config and build logs |
28 | 139 | if: ${{ always() }} |
29 | | - run: find build -name 'config.*' | zip -9 linux-build-logs.zip -@ |
| 140 | + run: find ${BUILD_DIR} -name 'config.*' -o -name '*.log' -o -name 'CMakeCache.txt' | zip -9 build-logs-macos-llvm.zip -@ |
30 | 141 |
|
31 | | - - name: upload config and build logs |
| 142 | + - name: upload LLVM config and build logs |
32 | 143 | if: ${{ always() }} |
33 | 144 | uses: actions/upload-artifact@v2 |
34 | 145 | with: |
35 | 146 | name: build-logs |
36 | | - path: linux-build-logs.zip |
| 147 | + path: build-logs-macos-llvm.zip |
37 | 148 |
|
38 | | - - name: package artifacts |
39 | | - run: tar cjf linux-artifacts.tar.bz2 artifacts |
| 149 | + - name: package LLVM artifacts |
| 150 | + run: tar cjf artifacts-macos-llvm.tar.bz2 artifacts |
40 | 151 |
|
41 | | - - name: upload Linux and Windows artifacts |
| 152 | + - name: upload macOS LLVM artifacts |
42 | 153 | uses: actions/upload-artifact@v2 |
43 | 154 | with: |
44 | | - name: linux-windows |
45 | | - path: linux-artifacts.tar.bz2 |
| 155 | + name: macOS |
| 156 | + path: artifacts-macos-llvm.tar.bz2 |
46 | 157 |
|
47 | | - build_macos: |
48 | | - runs-on: macos-10.15 |
| 158 | + build_binutils_macos: |
| 159 | + runs-on: macos-11 |
49 | 160 | steps: |
50 | 161 | - uses: actions/checkout@v2 |
| 162 | + with: |
| 163 | + submodules: recursive |
51 | 164 |
|
52 | | - - name: Install build dependencies |
| 165 | + - name: Install Binutils build dependencies |
53 | 166 | run: | |
54 | 167 | brew update |
55 | 168 | brew install make autoconf gettext xz |
56 | 169 |
|
57 | | - - name: build macOS |
58 | | - run: bash -x ./build.sh ${BINUTILS_VERSION} |
| 170 | + - name: build macOS Binutils |
| 171 | + run: bash ./build-binutils.sh |
| 172 | + |
| 173 | + - name: package Binutils config and build logs |
| 174 | + if: ${{ always() }} |
| 175 | + run: find ${BUILD_DIR} -name 'config.*' | zip -9 build-logs-macos-binutils.zip -@ |
| 176 | + |
| 177 | + - name: upload Binutils config and build logs |
| 178 | + if: ${{ always() }} |
| 179 | + uses: actions/upload-artifact@v2 |
| 180 | + with: |
| 181 | + name: build-logs |
| 182 | + path: build-logs-macos-binutils.zip |
| 183 | + |
| 184 | + - name: package Binutils artifacts |
| 185 | + run: tar cjf artifacts-macos-binutils.tar.bz2 artifacts |
| 186 | + |
| 187 | + - name: upload macOS Binutils artifacts |
| 188 | + uses: actions/upload-artifact@v2 |
| 189 | + with: |
| 190 | + name: macOS |
| 191 | + path: artifacts-macos-binutils.tar.bz2 |
| 192 | + |
| 193 | + build_xautils_macos: |
| 194 | + runs-on: macos-11 |
| 195 | + steps: |
| 196 | + - uses: actions/checkout@v2 |
| 197 | + with: |
| 198 | + submodules: recursive |
| 199 | + |
| 200 | + - name: Install Xamarin.Android Utilities build dependencies |
| 201 | + run: | |
| 202 | + brew update |
| 203 | + brew install make cmake xz ninja |
| 204 | +
|
| 205 | + - name: build macOS Xamarin.Android Utilities |
| 206 | + run: bash ./build-xa-utils.sh |
59 | 207 |
|
60 | | - - name: package config and build logs |
| 208 | + - name: package Xamarin.Android Utilities config and build logs |
61 | 209 | if: ${{ always() }} |
62 | | - run: find build -name 'config.*' | zip -9 macos-build-logs.zip -@ |
| 210 | + run: find ${BUILD_DIR} -name 'CMakeCache.txt' -o -name 'CMake*.log' | zip -9 build-logs-macos-xa-utils.zip -@ |
63 | 211 |
|
64 | | - - name: upload config and build logs |
| 212 | + - name: upload Xamarin.Android Utilities config and build logs |
65 | 213 | if: ${{ always() }} |
66 | 214 | uses: actions/upload-artifact@v2 |
67 | 215 | with: |
68 | 216 | name: build-logs |
69 | | - path: macos-build-logs.zip |
| 217 | + path: build-logs-macos-xa-utils.zip |
70 | 218 |
|
71 | | - - name: package artifacts |
72 | | - run: tar cjf macos-artifacts.tar.bz2 artifacts |
| 219 | + - name: package Xamarin.Android Utilities artifacts |
| 220 | + run: tar cjf artifacts-macos-xa-utils.tar.bz2 artifacts |
73 | 221 |
|
74 | | - - name: upload macOS artifacts |
| 222 | + - name: upload macOS Xamarin.Android Utilities artifacts |
75 | 223 | uses: actions/upload-artifact@v2 |
76 | 224 | with: |
77 | 225 | name: macOS |
78 | | - path: macos-artifacts.tar.bz2 |
| 226 | + path: artifacts-macos-xa-utils.tar.bz2 |
| 227 | + |
| 228 | + build_llvm_windows: |
| 229 | + runs-on: windows-2019 |
| 230 | + steps: |
| 231 | + - uses: actions/checkout@v2 |
| 232 | + with: |
| 233 | + submodules: recursive |
| 234 | + |
| 235 | + - name: Add msbuild to PATH |
| 236 | + uses: microsoft/setup-msbuild@v1.1 |
| 237 | + |
| 238 | + - name: build Windows LLVM |
| 239 | + run: ./build-llvm.cmd |
| 240 | + |
| 241 | + - name: package LLVM artifacts |
| 242 | + run: 7z a artifacts-windows-llvm.7z artifacts |
| 243 | + |
| 244 | + - name: upload Windows LLVM artifacts |
| 245 | + uses: actions/upload-artifact@v2 |
| 246 | + with: |
| 247 | + name: Windows |
| 248 | + path: artifacts-windows-llvm.7z |
79 | 249 |
|
80 | 250 | package_binaries: |
81 | | - runs-on: ubuntu-18.04 |
82 | | - needs: [build_linux, build_macos] |
| 251 | + runs-on: ubuntu-20.04 |
| 252 | + needs: [build_llvm_linux, build_binutils_linux, build_xautils_linux, build_llvm_macos, build_binutils_macos, build_xautils_macos, build_llvm_windows] |
83 | 253 | steps: |
84 | | - - name: Download Linux and Windows artifacts |
| 254 | + - uses: actions/checkout@v2 |
| 255 | + |
| 256 | + - name: Download Linux artifacts |
85 | 257 | uses: actions/download-artifact@v2 |
86 | 258 | with: |
87 | | - name: linux-windows |
| 259 | + name: linux |
88 | 260 |
|
89 | 261 | - name: Download macOS artifacts |
90 | 262 | uses: actions/download-artifact@v2 |
91 | 263 | with: |
92 | 264 | name: macOS |
93 | 265 |
|
94 | | - - name: Unpack Linux and Windows artifacts |
| 266 | + - name: Download Windows artifacts |
| 267 | + uses: actions/download-artifact@v2 |
| 268 | + with: |
| 269 | + name: Windows |
| 270 | + |
| 271 | + - name: Unpack Linux artifacts |
95 | 272 | run: | |
96 | | - tar xf linux-artifacts.tar.bz2 |
| 273 | + tar xf artifacts-linux-llvm.tar.bz2 |
| 274 | + tar xf artifacts-linux-binutils.tar.bz2 |
| 275 | + tar xf artifacts-linux-xa-utils.tar.bz2 |
97 | 276 |
|
98 | 277 | - name: Unpack macOS artifacts |
99 | 278 | run: | |
100 | | - tar xf macos-artifacts.tar.bz2 |
| 279 | + tar xf artifacts-macos-llvm.tar.bz2 |
| 280 | + tar xf artifacts-macos-binutils.tar.bz2 |
| 281 | + tar xf artifacts-macos-xa-utils.tar.bz2 |
| 282 | +
|
| 283 | + - name: Unpack Windows artifacts |
| 284 | + run: | |
| 285 | + 7z x artifacts-windows-llvm.7z |
101 | 286 |
|
102 | | - - name: Pack Linux, macOS and Windows artifacts |
103 | | - run: tar cjf xamarin-android-binutils.tar.bz2 artifacts |
| 287 | + - name: Package Linux, macOS and Windows artifacts |
| 288 | + run: ./package.sh |
104 | 289 |
|
105 | | - - name: upload Xamarin.Android Binutils |
| 290 | + - name: upload Xamarin.Android Toolchain |
106 | 291 | uses: actions/upload-artifact@v2 |
107 | 292 | with: |
108 | 293 | name: Xamarin.Android |
109 | | - path: xamarin-android-binutils.tar.bz2 |
| 294 | + path: artifacts/xamarin-android-toolchain.tar.bz2 |
0 commit comments