-
Notifications
You must be signed in to change notification settings - Fork 2
58 lines (56 loc) · 1.98 KB
/
build-package-and-test.yml
File metadata and controls
58 lines (56 loc) · 1.98 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
name: C/C++ CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
name: build
steps:
- uses: actions/checkout@v4
id: checkout-code
name: Checkout
- uses: actions/setup-node@v4
name: Setup Node
with:
node-version: '18'
- id: dependencies
name: Build Dependencies
run: sudo apt-get update && sudo apt-get install -y build-essential python3 pkg-config
- id: get-libjpeg
name: Get libjpeg
run: curl -fsSL http://www.ijg.org/files/jpegsrc.v9d.tar.gz -o jpegsrc.v9d.tar.gz
- id: install-libjpeg
name: Install libjpeg
run: tar xzf jpegsrc.v9d.tar.gz && cd jpeg-9d && ./configure --with-pic && make -j"$(nproc)" && sudo make install
- id: get-libraw
name: Download LibRaw Release
run: curl -fsSL https://www.libraw.org/data/LibRaw-0.21.2.tar.gz -o LibRaw-0.21.2.tar.gz
- id: install-libraw
name: Install LibRaw
run: tar xzf LibRaw-0.21.2.tar.gz && cd LibRaw-0.21.2 && ./configure --with-pic --disable-openmp && make -j"$(nproc)" && sudo make install
- id: pkg-config-check
name: Check pkg-config
run: |
echo "pkg-config libraw --libs: $(pkg-config --libs libraw 2>/dev/null || echo 'not found')"
echo "pkg-config libjpeg --libs: $(pkg-config --libs libjpeg 2>/dev/null || echo 'not found')"
- id: clean-libjpeg-files
name: Clean libjpeg files
run: rm -rf jpeg-9d jpegsrc.v9d.tar.gz
- id: clean-libraw-files
name: Clean LibRaw Build Files
run: rm -rf LibRaw-0.21.2 LibRaw-0.21.2.tar.gz
- id: install-npm
name: Install npm Packages
run: npm ci
- id: lint
name: Lint
run: npm run format-check && npm run lint
- id: build-package
name: Build Package
run: npm run build
- id: unit-tests
name: Run Unit Tests
run: npm run test