change msbuild shell to cmd #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: [push] | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- uses: actions/cache@v3 | |
with: | |
# build should be beside of git repo because it's submodule must be a empty dir when init. | |
path: out/windows/x64/obj | |
key: ${{ runner.os }}-skia-build-cache | |
- name: Clone source | |
working-directory: ${{github.workspace}} | |
shell: bash | |
run: | | |
mkdir -p skiasharp && cd skiasharp | |
git init && git remote add origin https://github.com/mono/SkiaSharp.git | |
git fetch --depth 1 origin release/2.88.6 | |
git checkout --recurse-submodules -q FETCH_HEAD | |
git submodule update --init --depth 1 | |
- name: Prepare build skia | |
working-directory: ${{github.workspace}} | |
shell: pwsh | |
run: | | |
mkdir -p out\windows\x64\ && cp args.gn out\windows\x64\ | |
cd skiasharp\externals\skia | |
python tools\git-sync-deps | |
python ..\depot_tools\gn.py gen ${{github.workspace}}\out\windows\x64\ | |
- name: Build skia | |
working-directory: ${{github.workspace}} | |
run: | | |
cd skiasharp\externals\skia | |
..\depot_tools\ninja -C ${{github.workspace}}\out\windows\x64\ SkiaSharp | |
cd ${{github.workspace}}\out\windows\x64\ | |
lib.exe /OUT:libSkiaSharp.lib *.lib | |
- name: Build libHarfBuzzSharp | |
working-directory: ${{github.workspace}} | |
shell: cmd | |
run: | | |
cd skiasharp\native\windows\libHarfBuzzSharp | |
msbuild -m -t:rebuild -p:Configuration=Release;Platform=x64;ConfigurationType=StaticLibrary;WindowsTargetPlatformVersion=10.0.19041.0;PlatformToolset=v143 | |
- name: Package libSkiaSharp | |
working-directory: ${{github.workspace}} | |
run: | | |
cd ${{github.workspace}}\out\windows\x64\ | |
7z a -y -mx9 libSkiaSharp.7z ./libSkiaSharp.lib | |
- name: Package libHarfBuzzSharp | |
working-directory: ${{github.workspace}} | |
run: | | |
cd skiasharp\native\windows\libHarfBuzzSharp\bin\x64\Release | |
7z a -y -mx9 libHarfBuzzSharp.7z ./libHarfBuzzSharp.lib | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: libSkiaSharp | |
path: out/windows/x64/libSkiaSharp.7z | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: libHarfBuzzSharp | |
path: skiasharp/native/windows/libHarfBuzzSharp/bin/x64/Release/libHarfBuzzSharp.7z | |