Skip to content

Commit 20b922c

Browse files
Merge pull request #3 from jae1911/jae/ci/feat/build
CI/CD builds for libraries on Linux + Windows
2 parents 67495bc + c59c3b3 commit 20b922c

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

.github/workflows/build-ydms.yaml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: "YDMS Build"
2+
3+
on: [push]
4+
5+
6+
jobs:
7+
build-linux:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Set dist name
13+
run: |
14+
echo "wps=${{ github.workspace }}/builddir" >> "$GITHUB_ENV"
15+
mkdir -p ${{ github.workspace }}/builddir
16+
- name: Install dependencies
17+
run: |
18+
sudo apt-get update
19+
sudo apt-get install -y mesa-common-dev libglew-dev libicu-dev libegl1-mesa-dev libopenexr-dev libopencv-dev libglm-dev
20+
- name: Generate build files
21+
working-directory: ${{ env.wps }}
22+
run: |
23+
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 ..
24+
- name: Build library
25+
working-directory: ${{ env.wps }}
26+
run: |
27+
CPLUS_INCLUDE_PATH=/usr/include/opencv4/ make -j4
28+
- name: Upload artifacts
29+
uses: actions/upload-artifact@v4
30+
with:
31+
name: linux-lib
32+
path: ${{ env.wps }}/lib/**/*.so
33+
34+
build-windows:
35+
runs-on: windows-latest
36+
steps:
37+
- uses: actions/checkout@v4
38+
- name: Setup cmake
39+
run: |
40+
cmake -E make_directory ${{ github.workspace }}/build/bin
41+
python build/fetch_dependencies.py
42+
- name: Setup msbuild
43+
uses: microsoft/setup-msbuild@v2
44+
- name: Build compressonator
45+
run: |
46+
msbuild -target:build -property:Configuration=Release_MD_DLL -property:Platform=x64 -m build_sdk\cmp_framework.sln
47+
msbuild -target:build -property:Configuration=Release_MD_DLL -property:Platform=x64 -m build_sdk\cmp_compressonatorlib.sln
48+
- name: Collect build results
49+
shell: bash
50+
run: |
51+
mkdir results
52+
cp build/Release*/x64/{*.lib,*.dll} results
53+
- name: Upload artifacts
54+
uses: actions/upload-artifact@v4
55+
with:
56+
name: windows-lib
57+
path: results/

0 commit comments

Comments
 (0)