forked from strukturag/libheif
-
Notifications
You must be signed in to change notification settings - Fork 1
85 lines (64 loc) · 3.08 KB
/
test-action.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
name: Build libheif
run-name: ${{ github.actor }} is building libheif
on:
push:
branches:
- cyro/feat/libheif-build-actions
# on: workflow_dispatch
jobs:
Build-Linux:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- run: echo "${{ github.repository }} cloned"
- name: Make build directory
run: mkdir build
- name: Create output directory variable
id: buildoutput
run: echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Configure CMake
working-directory: ${{ steps.buildoutput.outputs.build-output-dir }}
run: cmake --preset=release-noplugins ..
- name: Build libheif
working-directory: ${{ steps.buildoutput.outputs.build-output-dir }}
run: make
- name: Archive and put a pretty bow on it
uses: actions/upload-artifact@v4
with:
name: libheif-linux
path: ${{ steps.buildoutput.outputs.build-output-dir }}/libheif
Build-Windows:
runs-on: windows-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- run: echo "${{ github.repository }} cloned"
- name: Make build directory
run: mkdir build
- name: Create output directory variable
id: buildoutput
run: echo "build-output-dir=${{ github.workspace }}/build" >> "$Env:GITHUB_OUTPUT"
- uses: ilammy/setup-nasm@v1
- uses: seanmiddleditch/gha-setup-ninja@master
- name: Grab AOM for basic AVIF encoding/decoding
working-directory: ${{ github.workspace }}/third-party
run: |
git clone -b v3.9.0 --depth 1 https://aomedia.googlesource.com/aom
cd aom
cmake -S . -B build.libavif -G Ninja -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/third-party/aom/dist" -DCMAKE_BUILD_TYPE=Release -DENABLE_DOCS=0 -DENABLE_EXAMPLES=0 -DENABLE_TESTDATA=0 -DENABLE_TESTS=0 -DENABLE_TOOLS=0
ninja -C build.libavif
ninja -C build.libavif install
cd ..
- name: Configure CMake
working-directory: ${{ steps.buildoutput.outputs.build-output-dir }}
run: |
cmake --preset=release-noplugins .. -DAOM_INCLUDE_DIR="${{ github.workspace }}\third-party\aom" -DAOM_LIBRARY="${{ github.workspace }}\third-party\aom\dist\lib\libaom.a"
- name: Build libheif
working-directory: ${{ steps.buildoutput.outputs.build-output-dir }}
run: cmake --build . --config Release
- name: Archive and put a pretty bow on it
uses: actions/upload-artifact@v4
with:
name: libheif-windows
path: ${{ steps.buildoutput.outputs.build-output-dir }}/libheif/Release