Skip to content

Commit

Permalink
[ci] Testing Static vs Shared versions
Browse files Browse the repository at this point in the history
  • Loading branch information
dacap committed Jan 22, 2025
1 parent 2742b08 commit 6d68ba7
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ jobs:
fail-fast: false
matrix:
os: [windows-latest, macos-latest, ubuntu-20.04]
shared: [Static, Shared]
mode: [Release, Debug]
arch: [x64, x86, arm64]
exclude:
Expand Down Expand Up @@ -57,17 +58,31 @@ jobs:
if [[ "${{ matrix.mode }}" == "Debug" ]] ; then
export is_debug=true
export is_official=false
export is_component=false
else
export is_debug=false
export is_official=true
if [[ "${{ matrix.shared }}" == "Shared" ]] ; then
export is_component=true
else
export is_component=false
fi
fi
if [[ "${{ runner.os }}" == "Windows" ]] ; then
clang++ --version
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"'
if [[ "${{ matrix.mode }}" == "Debug" ]] ; then
export gn_flags="$gn_flags extra_cflags=[\"-MTd\"]"
if [[ "${{ matrix.shared }}" == "Shared" ]] ; then
export gn_flags="$gn_flags extra_cflags=[\"-MDd\"]"
else
export gn_flags="$gn_flags extra_cflags=[\"-MTd\"]"
fi
else
export gn_flags="$gn_flags extra_cflags=[\"-MT\"]"
if [[ "${{ matrix.shared }}" == "Shared" ]] ; then
export gn_flags="$gn_flags extra_cflags=[\"-MD\"]"
else
export gn_flags="$gn_flags extra_cflags=[\"-MT\"]"
fi
fi
elif [[ "${{ runner.os }}" == "macOS" ]] ; then
if [[ "${{ matrix.arch }}" == arm64 ]] ; then
Expand All @@ -78,9 +93,9 @@ jobs:
else
export gn_flags='cc="clang-12" cxx="clang++-12"'
fi
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"
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"
- name: Compiling
run: ninja -C out/${{ matrix.mode }}-${{ matrix.arch }} skia modules
run: ninja -C out/${{ matrix.shared }}-${{ matrix.mode }}-${{ matrix.arch }} skia modules
- name: Copying Files
shell: bash
run: |
Expand All @@ -94,7 +109,7 @@ jobs:
else
export cp=cp
fi
export dst=Skia-${{ runner.os }}-${{ matrix.mode }}-${{ matrix.arch }}
export dst=Skia-${{ runner.os }}-${{ matrix.shared }}-${{ matrix.mode }}-${{ matrix.arch }}
mkdir $dst
$cp -R --parents \
out/${{ matrix.mode }}-${{ matrix.arch }}/args.gn \
Expand Down Expand Up @@ -204,5 +219,5 @@ jobs:
- name: Uploading Artifact
uses: actions/upload-artifact@v4
with:
name: Skia-${{ runner.os }}-${{ matrix.mode }}-${{ matrix.arch }}
path: Skia-${{ runner.os }}-${{ matrix.mode }}-${{ matrix.arch }}
name: Skia-${{ runner.os }}-${{ matrix.shared }}-${{ matrix.mode }}-${{ matrix.arch }}
path: Skia-${{ runner.os }}-${{ matrix.shared }}-${{ matrix.mode }}-${{ matrix.arch }}

0 comments on commit 6d68ba7

Please sign in to comment.