-
Notifications
You must be signed in to change notification settings - Fork 64
90 lines (90 loc) · 3.22 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: build
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
build_type: [RelWithDebInfo, Debug]
backend: [none, skia]
exclude:
- build_type: Debug
backend: skia
- build_type: RelWithDebInfo
backend: none
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Install Dependencies
shell: bash
run: |
if [[ "${{ runner.os }}" == "Windows" ]] ; then
if [[ "${{ matrix.backend }}" == "skia" ]] ; then
choco install wget
wget https://github.com/aseprite/skia/releases/download/m102-861e4743af/Skia-Windows-Release-x64.zip
unzip Skia-Windows-Release-x64.zip -d skia
fi
elif [[ "${{ runner.os }}" == "macOS" ]] ; then
if [[ "${{ matrix.backend }}" == "skia" ]] ; then
wget https://github.com/aseprite/skia/releases/download/m102-861e4743af/Skia-macOS-Release-arm64.zip
unzip Skia-macOS-Release-arm64.zip -d skia
fi
else
sudo apt-get update -qq
sudo apt-get install -y \
libc++-dev libc++abi-dev \
libpixman-1-dev libfreetype6-dev libharfbuzz-dev zlib1g-dev \
libx11-dev libxcursor-dev libxi-dev libgl1-mesa-dev
if [[ "${{ matrix.backend }}" == "skia" ]] ; then
wget https://github.com/aseprite/skia/releases/download/m102-861e4743af/Skia-Linux-Release-x64-libc++.zip
unzip Skia-Linux-Release-x64-libc++.zip -d skia
fi
fi
- uses: ilammy/msvc-dev-cmd@v1
if: runner.os == 'Windows'
- uses: aseprite/get-ninja@main
- name: Generating Makefiles
shell: bash
run: |
if [[ "${{ runner.os }}" == "Windows" ]] ; then
if [[ "${{ matrix.backend }}" == "skia" ]] ; then
cmake . -G Ninja \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DLAF_BACKEND=${{ matrix.backend }} \
-DSKIA_DIR=skia \
-DSKIA_LIBRARY_DIR=skia/out/Release-x64
else
cmake . -G Ninja \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DLAF_BACKEND=${{ matrix.backend }}
fi
elif [[ "${{ runner.os }}" == "Linux" ]] && \
[[ "${{ matrix.backend }}" == "skia" ]] ; then
export CC=clang
export CXX=clang++
cmake . -G Ninja \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_CXX_FLAGS=-stdlib=libc++ \
-DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ \
-DLAF_BACKEND=${{ matrix.backend }} \
-DSKIA_DIR=skia
else
cmake . -G Ninja \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DLAF_BACKEND=${{ matrix.backend }} \
-DSKIA_DIR=skia
fi
- name: Compiling
shell: bash
run: |
ninja
- name: Running Tests
shell: bash
run: |
if [[ "${{ runner.os }}" == "Linux" ]] ; then
export XVFB=xvfb-run
fi
$XVFB ctest --output-on-failure --exclude-regex app_main_tests