forked from GPUOpen-Tools/compressonator
-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (52 loc) · 1.94 KB
/
build-ydms.yaml
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
name: "YDMS Build"
on: [push]
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set dist name
run: |
echo "wps=${{ github.workspace }}/builddir" >> "$GITHUB_ENV"
mkdir -p ${{ github.workspace }}/builddir
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y mesa-common-dev libglew-dev libicu-dev libegl1-mesa-dev libopenexr-dev libopencv-dev libglm-dev
- name: Generate build files
working-directory: ${{ env.wps }}
run: |
cmake -DOPTION_ENABLE_ALL_APPS=OFF -DOPTION_BUILD_CMP_SDK=ON -DOPTION_CMP_QT=OFF -DOPTION_BUILD_KTX2=ON -DOPTION_BUILD_EXR=ON -DOPTION_BUILD_GUI=OFF -DBUILD_SHARED_LIBS=ON ..
- name: Build library
working-directory: ${{ env.wps }}
run: |
CPLUS_INCLUDE_PATH=/usr/include/opencv4/ make -j4
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: linux-lib
path: ${{ env.wps }}/lib/**/*.so
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup cmake
run: |
cmake -E make_directory ${{ github.workspace }}/build/bin
python build/fetch_dependencies.py
- name: Setup msbuild
uses: microsoft/setup-msbuild@v2
- name: Build compressonator
run: |
msbuild -target:build -property:Configuration=Release_MD_DLL -property:Platform=x64 -m build_sdk\cmp_framework.sln
msbuild -target:build -property:Configuration=Release_MD_DLL -property:Platform=x64 -m build_sdk\cmp_compressonatorlib.sln
- name: Collect build results
shell: bash
run: |
mkdir results
cp build/Release*/x64/{*.lib,*.dll} results
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: windows-lib
path: results/