egl istead of gl and target for zig #18
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 Zig package | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
clang-x64: | |
name: Build Skia | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install skia dependency | |
run: | | |
sudo apt update | |
sudo apt install -y fontconfig libfreetype-dev libjpeg-turbo8-dev libpng-dev zlib1g-dev libwebp-dev | |
- name: "Clone skia" | |
run: git clone --depth 1 https://github.com/mono/skia.git skia_repo | |
- uses: mlugg/setup-zig@v1 | |
with: | |
version: 0.13.0 | |
- name: "Build skia" | |
run: | | |
cd skia_repo | |
python3 tools/git-sync-deps | |
python3 bin/fetch-ninja | |
bin/gn gen out/lib --args=' | |
target_os="linux" | |
target_cpu="x64" | |
is_debug=false | |
is_component_build=false | |
is_static_skiasharp=true | |
is_official_build=true | |
skia_use_harfbuzz=false | |
skia_use_icu=false | |
skia_enable_tools=false | |
skia_use_expat=false | |
skia_enable_skottie=false | |
skia_enable_gpu=true | |
skia_enable_pdf=true | |
skia_enable_discrete_gpu=true | |
skia_use_egl=true | |
cc="zig cc" | |
cxx="zig c++" | |
extra_cflags=[ "-target x86_64-linux-gnu" ] | |
' | |
third_party/ninja/ninja -C out/lib skia | |
mkdir -p ../skia/lib | |
cp --recursive include ../skia/include | |
cp --recursive out/lib/*.a ../skia/lib | |
cd .. | |
rm -rf skia_repo | |
find -maxdepth 1 -name ".*" ! -name "." ! -name ".." -exec rm -rf {} + | |
ls -lah | |
- name: "Generate zig source" | |
run: sh generate.sh | |
- name: Archive the build | |
uses: actions/upload-artifact@v4 | |
with: | |
name: skia-zig-package | |
path: . |