Skip to content

Commit

Permalink
add actions build yml
Browse files Browse the repository at this point in the history
  • Loading branch information
peaceshi committed Nov 18, 2023
1 parent 4657e49 commit 6598b05
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/build.yml
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

0 comments on commit 6598b05

Please sign in to comment.