Skip to content

Commit 39d1067

Browse files
committed
ci
1 parent 12487b2 commit 39d1067

File tree

3 files changed

+47
-33
lines changed

3 files changed

+47
-33
lines changed

.github/workflows/build.yml

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -9,34 +9,6 @@ on:
99
- '**'
1010

1111
jobs:
12-
headers:
13-
if: false
14-
name: Headers
15-
runs-on: ubuntu-latest
16-
steps:
17-
- name: Checkout
18-
uses: actions/checkout@v4
19-
with:
20-
submodules: recursive
21-
fetch-depth: 0
22-
persist-credentials: true
23-
clean: false
24-
25-
- name: Sync Skia dependencies
26-
run: |
27-
export PATH="${GITHUB_WORKSPACE}/depot_tools:${PATH}"
28-
cd skia
29-
python3 tools/git-sync-deps
30-
31-
- name: Build headers
32-
run: python3 scripts/build.py headers
33-
34-
- name: Upload headers
35-
uses: actions/upload-artifact@v4
36-
with:
37-
name: headers
38-
path: artifacts/headers
39-
4012
windows:
4113
name: Windows
4214
runs-on: windows-latest
@@ -71,7 +43,7 @@ jobs:
7143
name: windows-all
7244
path: artifacts/*
7345

74-
linux-all:
46+
linux:
7547
name: Linux (all)
7648
runs-on: ubuntu-latest
7749
steps:
@@ -97,17 +69,18 @@ jobs:
9769
./update_depot_tools
9870
cd ../skia
9971
python3 tools/git-sync-deps
100-
72+
- name: Extract headers
73+
run: python3 scripts/build.py headers
10174
- name: Build (all arches)
10275
env:
10376
CLANG_BUILDER_IMAGE: ghcr.io/avaloniaui/clang-cross-builder:latest
104-
run: scripts/build-linux.sh all
77+
run: scripts/build-linux.sh all
10578

10679
- name: Upload artifacts
10780
uses: actions/upload-artifact@v4
10881
with:
10982
name: linux-all
110-
path: artifacts/linux_*
83+
path: artifacts/*
11184

11285
macos:
11386
name: macOS
@@ -138,3 +111,32 @@ jobs:
138111
with:
139112
name: macos-all
140113
path: artifacts/*
114+
115+
create-release:
116+
name: Create GitHub Release
117+
runs-on: ubuntu-latest
118+
needs: [linux, windows, macos]
119+
if: github.event_name == 'push'
120+
permissions:
121+
contents: write
122+
123+
steps:
124+
- name: Checkout code
125+
uses: actions/checkout@v4
126+
127+
- name: Download all artifacts
128+
uses: actions/download-artifact@v4
129+
with:
130+
path: skia_sdk
131+
132+
- name: Generate release id
133+
run: ./genrelease.sh
134+
- name: Create Release
135+
uses: softprops/action-gh-release@v1
136+
with:
137+
tag_name: ${{ env.RELEASE_ID }}
138+
name: ${{ env.RELEASE_ID }}
139+
draft: false
140+
body_path: ./release.txt
141+
prerelease: false
142+
files: release/*

scripts/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def gen_linux(arch, self_contained, args):
146146
args.update({
147147
"skia_use_vulkan": True,
148148
"skia_use_x11": False,
149-
"skia_use_system_freetype2": not self_contained,
149+
"skia_use_system_freetype2": False,
150150
"cc": "clang",
151151
"cxx": "clang++",
152152
"target_os": "linux",

scripts/genrelease.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
set -x
3+
set -e
4+
git submodule status skia
5+
SKIA_COMMIT=`git submodule status skia|awk '{print $1}'|sed 's/-//'`
6+
echo "Build for commit https://github.com/google/skia/commit/$SKIA_COMMIT" > release.txt
7+
# include GitHub Actions run number (fallback to 'local' when not set)
8+
RUN_NUMBER="${GITHUB_RUN_NUMBER:-local}"
9+
echo "RELEASE_ID=sk_${SKIA_COMMIT}_${RUN_NUMBER}" >> $GITHUB_ENV
10+
11+
mkdir files
12+
tar -czf

0 commit comments

Comments
 (0)