Skip to content

Commit 08d2ce8

Browse files
committed
feat(ci): enhance CI workflow with Skia caching and Aseprite build steps
1 parent 918a14a commit 08d2ce8

1 file changed

Lines changed: 63 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 63 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,69 @@ jobs:
3030
if: runner.os == 'Windows'
3131
uses: ilammy/msvc-dev-cmd@v1
3232

33-
- name: Install Aseprite CLI
34-
uses: neomura/setup-aseprite-cli-action@v1.0.1
33+
- name: Install build dependencies (Linux)
34+
if: runner.os == 'Linux'
35+
run: |
36+
sudo apt-get update
37+
sudo apt-get install -y cmake ninja-build libx11-dev libxcursor-dev libxi-dev libgl1-mesa-dev libfontconfig1-dev
38+
39+
- name: Install build dependencies (macOS)
40+
if: runner.os == 'macOS'
41+
run: brew install ninja p7zip
42+
43+
- name: Cache Skia
44+
id: cache-skia
45+
uses: actions/cache@v4
46+
with:
47+
path: skia
48+
key: skia-${{ runner.os }}-m116-2024-01-05
49+
50+
- name: Download Skia
51+
if: steps.cache-skia.outputs.cache-hit != 'true'
52+
run: |
53+
if [ "$RUNNER_OS" == "Linux" ]; then
54+
curl -L https://github.com/aseprite/skia/releases/download/m116-2024-01-05/Skia-Linux-Release-x64-libstdc++.zip -o skia.zip
55+
elif [ "$RUNNER_OS" == "Windows" ]; then
56+
curl -L https://github.com/aseprite/skia/releases/download/m116-2024-01-05/Skia-Windows-Release-x64.zip -o skia.zip
57+
elif [ "$RUNNER_OS" == "macOS" ]; then
58+
curl -L https://github.com/aseprite/skia/releases/download/m116-2024-01-05/Skia-macOS-Release-x64.zip -o skia.zip
59+
fi
60+
unzip skia.zip -d skia
61+
shell: bash
62+
63+
- name: Checkout Aseprite
64+
uses: actions/checkout@v4
65+
with:
66+
repository: aseprite/aseprite
67+
ref: v1.3.10
68+
submodules: recursive
69+
path: aseprite
70+
71+
- name: Build Aseprite
72+
run: |
73+
cd aseprite
74+
mkdir build
75+
cd build
76+
cmake -G Ninja \
77+
-DCMAKE_BUILD_TYPE=Release \
78+
-DENABLE_UI=OFF \
79+
-DENABLE_TESTS=OFF \
80+
-DENABLE_SCRIPTING=ON \
81+
-DLAF_BACKEND=none \
82+
-DSKIA_DIR=${{ github.workspace }}/skia \
83+
-DSKIA_LIBRARY_DIR=${{ github.workspace }}/skia/out/Release-x64 \
84+
..
85+
ninja aseprite
86+
shell: bash
87+
88+
- name: Install Aseprite to PATH
89+
run: |
90+
if [ "$RUNNER_OS" == "Windows" ]; then
91+
echo "${{ github.workspace }}/aseprite/build/bin" >> $GITHUB_PATH
92+
else
93+
echo "${{ github.workspace }}/aseprite/build/bin" >> $GITHUB_PATH
94+
fi
95+
shell: bash
3596

3697
- name: Verify Aseprite installation
3798
run: aseprite --version

0 commit comments

Comments
 (0)