forked from apitrace/apitrace
-
Notifications
You must be signed in to change notification settings - Fork 0
150 lines (141 loc) · 4.67 KB
/
build.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
140
141
142
143
144
145
146
147
148
149
150
name: build
on:
push:
pull_request:
jobs:
ubuntu64:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
submodules: recursive
- name: apt-update
run: sudo apt-get update
- name: apt-install
run: sudo apt-get install -qq -y --no-install-recommends gcc g++ libsnappy-dev zlib1g-dev libpng-dev libbrotli-dev libdwarf-dev libprocps-dev libgtest-dev qtbase5-dev qtdeclarative5-dev python3 ninja-build cmake
- name: cmake
run: cmake -S. -Bbuild -G Ninja -DENABLE_STATIC_SNAPPY=0 -DENABLE_GUI=1
- name: build
run: cmake --build build --use-stderr
- name: check
run: cmake --build build --use-stderr --target check
- name: package
run: cmake --build build --use-stderr --target package
ubuntu32:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
submodules: recursive
- run: echo ${{ secrets.GITHUB_TOKEN }} | docker login docker.pkg.github.com -u $GITHUB_ACTOR --password-stdin
- run: ci/build-ubuntu32.sh
ubuntu64-clang:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
submodules: recursive
- name: apt-update
run: sudo apt-get update
- name: apt-install
run: sudo apt-get install -qq -y --no-install-recommends clang libc++-dev libc++abi-dev zlib1g-dev libdwarf-dev libprocps-dev qtbase5-dev qtdeclarative5-dev python3 ninja-build cmake
- name: cmake
run: cmake -S. -Bbuild -G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DENABLE_GUI=1
- name: build
run: cmake --build build --use-stderr
- name: check
run: cmake --build build --use-stderr --target check
ubuntu-18_04:
runs-on: ubuntu-22.04
env:
PACKAGE: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
submodules: recursive
- run: echo ${{ secrets.GITHUB_TOKEN }} | docker login docker.pkg.github.com -u $GITHUB_ACTOR --password-stdin
- run: ci/build-ubuntu-18.04.sh
- if: env.PACKAGE == 'true'
uses: actions/upload-artifact@v3
with:
name: apitrace-ubuntu-18.04
path: build/docker-ubuntu-18.04/apitrace-*.tar.bz2
if-no-files-found: error
ubuntu-arm64-cross:
runs-on: ubuntu-22.04
env:
PACKAGE: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
submodules: recursive
- run: echo ${{ secrets.GITHUB_TOKEN }} | docker login docker.pkg.github.com -u $GITHUB_ACTOR --password-stdin
- run: ci/build-ubuntu-arm64-cross.sh
- if: env.PACKAGE == 'true'
uses: actions/upload-artifact@v3
with:
name: apitrace-ubuntu-arm64
path: build/docker-ubuntu-arm64-cross/apitrace-*.tar.bz2
if-no-files-found: error
mingw32:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
submodules: recursive
- run: sudo apt-get update
- run: sudo apt-get install -qq -y --no-install-recommends g++-mingw-w64-i686 ninja-build cmake
- run: wget -q -O - https://github.com/apitrace/dxsdk/archive/master.tar.gz | tar -xz
- run: ci/build-mingw.sh mingw32
msvc:
runs-on: windows-2022
strategy:
matrix:
arch: [x86, arm]
target: [win32, win64]
exclude:
# https://learn.microsoft.com/en-us/windows/arm/arm32-to-arm64
- arch: arm
target: win32
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
submodules: recursive
- name: Cache Downloads
id: cache-downloads
uses: actions/cache@v3
with:
path: |
*qtbase-*.7z
*qttools-*.7z
key: ${{ runner.os }}-${{ matrix.target }}-${{ matrix.arch }}-5.15.2-1
- name: Build
run: .\ci\build-msvc.ps1 -arch ${{ matrix.arch }} -target ${{ matrix.target }}
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: apitrace-${{ matrix.target }}-${{ matrix.arch }}
path: build/apitrace-*.7z
if-no-files-found: error
mac64:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
submodules: recursive
- name: Cache Downloads
id: cache-downloads
uses: actions/cache@v3
with:
path: "qt/*qtbase-*.7z"
key: ${{ runner.os }}-5.15.2-1
- name: cmake
run: ci/build-macos.sh