-
Notifications
You must be signed in to change notification settings - Fork 0
137 lines (131 loc) · 5.16 KB
/
Copy pathbuild.yml
File metadata and controls
137 lines (131 loc) · 5.16 KB
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
name: Build & Test
on:
push:
branches: [main, "feat/**"]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
# ── Linux x64 ──────────────────────────────────────────────────────────────
build-linux-x64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y cmake pkg-config \
libavif-dev libwebp-dev libjpeg-dev libpng-dev libheif-dev
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Build
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build --parallel
- name: Test — Lanczos-3 precision
run: bun run test/lanczos_precision.ts
- name: Test — ops precision
run: bun run test/ops_precision.ts
- uses: actions/upload-artifact@v4
with:
name: libpict-linux-x64
path: build/libpict.so
# ── Linux arm64 ────────────────────────────────────────────────────────────
build-linux-arm64:
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y cmake pkg-config \
libavif-dev libwebp-dev libjpeg-dev libpng-dev libheif-dev
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Build
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build --parallel
- name: Test — Lanczos-3 precision
run: bun run test/lanczos_precision.ts
- name: Test — ops precision
run: bun run test/ops_precision.ts
- uses: actions/upload-artifact@v4
with:
name: libpict-linux-arm64
path: build/libpict.so
# ── macOS arm64 (Apple Silicon) ────────────────────────────────────────────
build-darwin-arm64:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: brew install libavif webp jpeg-turbo libpng libheif
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Build
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build --parallel
- name: Test — Lanczos-3 precision
run: bun run test/lanczos_precision.ts
- name: Test — ops precision
run: bun run test/ops_precision.ts
- uses: actions/upload-artifact@v4
with:
name: libpict-darwin-arm64
path: build/libpict.dylib
# ── macOS x64 (Intel) ──────────────────────────────────────────────────────
build-darwin-x64:
runs-on: macos-15-intel
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: brew install libavif webp jpeg-turbo libpng libheif
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Build
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build --parallel
- name: Test — Lanczos-3 precision
run: bun run test/lanczos_precision.ts
- name: Test — ops precision
run: bun run test/ops_precision.ts
- uses: actions/upload-artifact@v4
with:
name: libpict-darwin-x64
path: build/libpict.dylib
# ── Windows x64 ────────────────────────────────────────────────────────────
build-windows-x64:
runs-on: windows-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- name: Enable MSVC (x64)
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Cache vcpkg
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/vcpkg_installed
key: vcpkg-x64-windows-static-md-${{ hashFiles('vcpkg.json') }}-v1
- name: Install vcpkg dependencies
run: vcpkg install --triplet x64-windows-static-md
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Build
run: |
cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" \
-DVCPKG_TARGET_TRIPLET=x64-windows-static-md
cmake --build build --parallel
- name: Test — Lanczos-3 precision
run: bun run test/lanczos_precision.ts
- name: Test — ops precision
run: bun run test/ops_precision.ts
- uses: actions/upload-artifact@v4
with:
name: libpict-win32-x64
path: build/libpict.dll