Skip to content

Commit 6d68ba7

Browse files
committed
[ci] Testing Static vs Shared versions
1 parent 2742b08 commit 6d68ba7

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

.github/workflows/build.yml

+22-7
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ jobs:
77
fail-fast: false
88
matrix:
99
os: [windows-latest, macos-latest, ubuntu-20.04]
10+
shared: [Static, Shared]
1011
mode: [Release, Debug]
1112
arch: [x64, x86, arm64]
1213
exclude:
@@ -57,17 +58,31 @@ jobs:
5758
if [[ "${{ matrix.mode }}" == "Debug" ]] ; then
5859
export is_debug=true
5960
export is_official=false
61+
export is_component=false
6062
else
6163
export is_debug=false
6264
export is_official=true
65+
if [[ "${{ matrix.shared }}" == "Shared" ]] ; then
66+
export is_component=true
67+
else
68+
export is_component=false
69+
fi
6370
fi
6471
if [[ "${{ runner.os }}" == "Windows" ]] ; then
6572
clang++ --version
6673
export gn_flags='is_trivial_abi=false win_vc="C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC" win_toolchain_version="17.10" win_sdk="C:\\Program Files\\Windows Kits\\10" win_sdk_version="10.0.22621.0" cc="clang" cxx="clang++" clang_win="C:\Program Files\LLVM" clang_win_version="18.1"'
6774
if [[ "${{ matrix.mode }}" == "Debug" ]] ; then
68-
export gn_flags="$gn_flags extra_cflags=[\"-MTd\"]"
75+
if [[ "${{ matrix.shared }}" == "Shared" ]] ; then
76+
export gn_flags="$gn_flags extra_cflags=[\"-MDd\"]"
77+
else
78+
export gn_flags="$gn_flags extra_cflags=[\"-MTd\"]"
79+
fi
6980
else
70-
export gn_flags="$gn_flags extra_cflags=[\"-MT\"]"
81+
if [[ "${{ matrix.shared }}" == "Shared" ]] ; then
82+
export gn_flags="$gn_flags extra_cflags=[\"-MD\"]"
83+
else
84+
export gn_flags="$gn_flags extra_cflags=[\"-MT\"]"
85+
fi
7186
fi
7287
elif [[ "${{ runner.os }}" == "macOS" ]] ; then
7388
if [[ "${{ matrix.arch }}" == arm64 ]] ; then
@@ -78,9 +93,9 @@ jobs:
7893
else
7994
export gn_flags='cc="clang-12" cxx="clang++-12"'
8095
fi
81-
gn gen out/${{ matrix.mode }}-${{ matrix.arch }} --args="is_debug=$is_debug is_official_build=$is_official skia_use_system_expat=false skia_use_system_icu=false skia_use_system_libjpeg_turbo=false skia_use_system_libpng=false skia_use_system_libwebp=false skia_use_system_zlib=false skia_use_freetype=true skia_use_harfbuzz=true skia_pdf_subset_harfbuzz=true skia_use_system_freetype2=false skia_use_system_harfbuzz=false target_cpu=\"${{ matrix.arch }}\" $gn_flags"
96+
gn gen out/${{ matrix.shared }}-${{ matrix.mode }}-${{ matrix.arch }} --args="is_debug=$is_debug is_official_build=$is_official is_component_build=$is_component skia_use_system_expat=false skia_use_system_icu=false skia_use_system_libjpeg_turbo=false skia_use_system_libpng=false skia_use_system_libwebp=false skia_use_system_zlib=false skia_use_freetype=true skia_use_harfbuzz=true skia_pdf_subset_harfbuzz=true skia_use_system_freetype2=false skia_use_system_harfbuzz=false target_cpu=\"${{ matrix.arch }}\" $gn_flags"
8297
- name: Compiling
83-
run: ninja -C out/${{ matrix.mode }}-${{ matrix.arch }} skia modules
98+
run: ninja -C out/${{ matrix.shared }}-${{ matrix.mode }}-${{ matrix.arch }} skia modules
8499
- name: Copying Files
85100
shell: bash
86101
run: |
@@ -94,7 +109,7 @@ jobs:
94109
else
95110
export cp=cp
96111
fi
97-
export dst=Skia-${{ runner.os }}-${{ matrix.mode }}-${{ matrix.arch }}
112+
export dst=Skia-${{ runner.os }}-${{ matrix.shared }}-${{ matrix.mode }}-${{ matrix.arch }}
98113
mkdir $dst
99114
$cp -R --parents \
100115
out/${{ matrix.mode }}-${{ matrix.arch }}/args.gn \
@@ -204,5 +219,5 @@ jobs:
204219
- name: Uploading Artifact
205220
uses: actions/upload-artifact@v4
206221
with:
207-
name: Skia-${{ runner.os }}-${{ matrix.mode }}-${{ matrix.arch }}
208-
path: Skia-${{ runner.os }}-${{ matrix.mode }}-${{ matrix.arch }}
222+
name: Skia-${{ runner.os }}-${{ matrix.shared }}-${{ matrix.mode }}-${{ matrix.arch }}
223+
path: Skia-${{ runner.os }}-${{ matrix.shared }}-${{ matrix.mode }}-${{ matrix.arch }}

0 commit comments

Comments
 (0)