-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: build | ||
on: [push] | ||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: skiasharp/externals/skia/third_party | ||
key: ${{ runner.os }}-skia-third_party-cache | ||
- uses: actions/cache@v3 | ||
with: | ||
path: skiasharp/external/skia/out/windows/x64/obj | ||
key: ${{ runner.os }}-skia-build-cache | ||
|
||
- name: Clone source | ||
working-directory: ${{github.workspace}} | ||
shell: pwsh | ||
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: | | ||
cd skiasharp\external\skia | ||
python tools\git-sync-deps | ||
python ..\depot_tools\gn.py gen .\out\windows\x64\ | ||
- uses: microsoft/[email protected] | ||
- name: Build skia | ||
working-directory: ${{github.workspace}} | ||
run: | | ||
cp args.gn skiasharp\external\skia\out\windows\x64\ | ||
cd skiasharp\external\skia | ||
..\depot_tools\ninja -C .\out\windows\x64\ SkiaSharp | ||
cd .\out\windows\x64\ | ||
lib.exe /OUT:libSkiaSharp.lib *.lib | ||
- name: Package libSkiaSharp | ||
working-directory: ${{github.workspace}} | ||
run: | | ||
cd skiasharp\external\skia\out\windows\x64\ | ||
7z a -y -mx9 libSkiaSharp.7z ./libSkiaSharp.lib | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: libSkiaSharp | ||
path: skiasharp/external/skia/out/windows/x64/libSkiaSharp.7z |