Skip to content

Commit a1f6f8a

Browse files
committed
linux
1 parent f69de89 commit a1f6f8a

File tree

2 files changed

+38
-3
lines changed

2 files changed

+38
-3
lines changed

.github/workflows/build.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,38 @@ jobs:
7676
name: windows-${{ matrix.arch }}
7777
path: artifacts/windows_${{ matrix.arch }}
7878

79+
linux-all:
80+
name: Linux (all)
81+
runs-on: ubuntu-latest
82+
container: ghcr.io/avaloniaui/clang-cross-builder:latest
83+
steps:
84+
- name: Checkout
85+
uses: actions/checkout@v4
86+
with:
87+
submodules: recursive
88+
fetch-depth: 0
89+
persist-credentials: true
90+
clean: false
91+
92+
- name: Sync Skia dependencies
93+
run: |
94+
export PATH="${GITHUB_WORKSPACE}/depot_tools:${PATH}"
95+
cd depot_tools
96+
./update_depot_tools
97+
cd ../skia
98+
python3 tools/git-sync-deps
99+
100+
- name: Build (all arches)
101+
env:
102+
CLANG_BUILDER_IMAGE: ghcr.io/avaloniaui/clang-cross-builder:latest
103+
run: scripts/build-linux.sh all
104+
105+
- name: Upload artifacts
106+
uses: actions/upload-artifact@v4
107+
with:
108+
name: linux-all
109+
path: artifacts/linux_*
110+
79111
macos:
80112
name: macOS (${{ matrix.arch }})
81113
runs-on: macos-latest

scripts/build-linux.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22
set -x
33
set -e
44
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
5-
cd $SCRIPT_DIR
5+
cd "$SCRIPT_DIR"
66
cd ..
77

8-
IMAGE=clang-builder:latest
8+
# Allow overriding the build container image:
9+
# SKIA_BUILD_IMAGE=myrepo/custom-image:tag ./scripts/build-linux.sh x64
10+
IMAGE="${CLANG_BUILDER_IMAGE:-clang-cross-builder}"
11+
912
docker run --rm -it \
10-
-u $(id -u):$(id -g) \
13+
-u "$(id -u)":"$(id -g)" \
1114
-v "$(pwd)":"$(pwd)" \
1215
-w "$(pwd)" \
1316
"$IMAGE" \

0 commit comments

Comments
 (0)