1
1
name : Desktop Builds
2
2
3
- on :
3
+ on :
4
4
pull_request :
5
5
types : [opened, reopened, synchronize]
6
6
9
9
10
10
jobs :
11
11
build :
12
- name : ${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}
12
+ name : ${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.msvc_runtime }}
13
13
runs-on : ${{ matrix.os }}
14
14
strategy :
15
15
fail-fast : false
16
16
matrix :
17
17
os : [windows-latest, ubuntu-latest, macos-latest]
18
18
build_type : ["Release", "Debug"]
19
- architecture : ["x64",]
19
+ architecture : ["x64", "x86"]
20
+ msvc_runtime : ["static", "dynamic"]
20
21
python_version : [3.7]
21
22
include :
22
23
- os : windows-latest
23
- architecture : " x64"
24
- vcpkg_triplet : " x64-windows-static"
25
- msbuild_platform : " x64"
24
+ vcpkg_triplet_suffix : " windows-static"
25
+ - os : windows-latest
26
+ msvc_runtime : " dynamic"
27
+ vcpkg_triplet_suffix : " windows-static-md"
26
28
- os : ubuntu-latest
27
- architecture : " x64"
28
- vcpkg_triplet : " x64-linux"
29
+ vcpkg_triplet_suffix : " linux"
30
+ - os : macos-latest
31
+ vcpkg_triplet_suffix : " osx"
32
+
33
+ exclude :
29
34
- os : macos-latest
30
- architecture : " x64"
31
- vcpkg_triplet : " x64-osx"
35
+ architecture : " x86"
36
+ - os : macos-latest
37
+ msvc_runtime : " dynamic"
38
+ - os : ubuntu-latest
39
+ msvc_runtime : " dynamic"
32
40
33
41
steps :
34
42
- uses : actions/checkout@v2
@@ -37,15 +45,15 @@ jobs:
37
45
38
46
- name : Set env variables for subsequent steps (all)
39
47
run : |
40
- echo "::set-env name=VCPKG_RESPONSE_FILE::external/vcpkg_ ${{ matrix.vcpkg_triplet }}_response_file .txt"
41
- echo "::set-env name=MATRIX_UNIQUE_NAME::${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.python_version }}"
48
+ echo "::set-env name=VCPKG_RESPONSE_FILE::external/vcpkg_custom_data/response_files/ ${{ matrix.architecture }}-${{ matrix.vcpkg_triplet_suffix }} .txt"
49
+ echo "::set-env name=MATRIX_UNIQUE_NAME::${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.architecture }}-${{ matrix.msvc_runtime }}"
42
50
43
51
- name : Cache vcpkg C++ dependencies
44
52
id : cache_vcpkg
45
53
uses : actions/cache@v2
46
54
with :
47
55
path : external/vcpkg/installed
48
- key : dev-vcpkg-${{ matrix.vcpkg_triplet }}-${{ hashFiles(format('{0}', env.VCPKG_RESPONSE_FILE)) }}-${{ hashFiles('.git/modules/external/vcpkg/HEAD') }}
56
+ key : dev-vcpkg-${{ matrix.architecture }}-${{ matrix.vcpkg_triplet_suffix }}-${{ matrix.msvc_runtime }}-${{ hashFiles(format('{0}', env.VCPKG_RESPONSE_FILE)) }}-${{ hashFiles('.git/modules/external/vcpkg/HEAD') }}
49
57
50
58
- name : Cache ccache files
51
59
if : startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos')
@@ -59,15 +67,15 @@ jobs:
59
67
uses : actions/setup-python@v2
60
68
with :
61
69
python-version : ${{ matrix.python_version }}
62
- architecture : ${{ matrix.architecture }}
70
+ architecture : ' x64 '
63
71
64
72
- name : Install prerequisites
65
73
run : |
66
74
python scripts/gha/install_prereqs_desktop.py
67
75
68
76
- name : Build SDK
69
77
run : |
70
- python scripts/gha/build_desktop.py --build_tests --arch "${{ matrix.architecture }}" --config "${{ matrix.build_type }}"
78
+ python scripts/gha/build_desktop.py --build_tests --arch "${{ matrix.architecture }}" --config "${{ matrix.build_type }}" --msvc_runtime_library "${{ matrix.msvc_runtime }}"
71
79
72
80
- name : Stats for ccache (mac and linux)
73
81
if : startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos')
@@ -82,23 +90,30 @@ jobs:
82
90
find build -name "*.a"
83
91
find build -name "*.so"
84
92
93
+ - name : Inspect firebase libraries for cpu arch and msvc runtime.
94
+ shell : bash
95
+ run : |
96
+ python scripts/gha/inspect_built_libraries.py build/
97
+ continue-on-error : true
98
+
85
99
- name : Prep crash support (linux)
86
- # Ensures directory structure is in place to capture core files on Linux.
100
+ # Ensures directory structure is in place to capture core files on Linux.
87
101
if : startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'ubuntu')
88
102
shell : bash
89
103
run : |
90
104
echo '/tmp/cores/core.%E' | sudo tee /proc/sys/kernel/core_pattern
91
105
sudo mkdir -p /tmp/cores/
92
106
sudo rm -rf /tmp/cores/*
93
-
107
+
94
108
- name : Prep crash support (mac)
95
109
# Ensures no lingering crashes from the previous run.
96
110
if : startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'macos')
97
111
run : |
98
112
rm -rf ~/Library/Logs/DiagnosticReports/*
99
-
113
+
100
114
- name : Run unit tests (windows & macos)
101
- if : startsWith(matrix.os, 'windows') || startsWith(matrix.os, 'macos')
115
+ # TODO: Enable tests for x86 once they are all working
116
+ if : (startsWith(matrix.os, 'windows') || startsWith(matrix.os, 'macos')) && matrix.architecture != 'x86'
102
117
env :
103
118
LANG : en_US
104
119
run : |
@@ -110,14 +125,15 @@ jobs:
110
125
# platform-specific `ulimit` to enable crash collection. The ulimit
111
126
# command must be invoked in same shell instance of that runs the
112
127
# tests.
113
- if : startsWith(matrix.os, 'ubuntu')
128
+ # TODO: Enable tests for x86 once they are all working
129
+ if : startsWith(matrix.os, 'ubuntu') && matrix.architecture != 'x86'
114
130
env :
115
131
LANG : en_US
116
132
run : |
117
- ulimit -c unlimited
133
+ ulimit -c unlimited
118
134
cd build
119
135
sudo ctest --verbose
120
-
136
+
121
137
- name : Prep bins for achive (linux)
122
138
# Copies all of the binary files into one directory for ease in
123
139
# archiving. Directory contents are then marked readable for the
@@ -147,7 +163,7 @@ jobs:
147
163
shell : bash
148
164
if : failure() && startsWith(matrix.build_type, 'Debug') && startsWith(matrix.os, 'macos')
149
165
run : |
150
- sudo chmod -R +rwx ~/Library/Logs/DiagnosticReports/* || :
166
+ sudo chmod -R +rwx ~/Library/Logs/DiagnosticReports/* || :
151
167
152
168
- name : Archive crashes and binaries (linux)
153
169
uses : actions/upload-artifact@v2
@@ -166,4 +182,3 @@ jobs:
166
182
path : |
167
183
~/Library/Logs/DiagnosticReports/*
168
184
/tmp/bins/*
169
-
0 commit comments