Merge pull request #4 from Yellow-Dog-Man/fix/convert-errors #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |