Skip to content

Commit

Permalink
Update builds to generate packages instead of executables
Browse files Browse the repository at this point in the history
  • Loading branch information
ad3154 committed Dec 29, 2023
1 parent d09eaf4 commit e49bb07
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 11 deletions.
58 changes: 48 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,13 @@ jobs:
- name: Compile
run: |
mkdir build
cmake -S . -B build -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF -DCAN_DRIVER=None -DCMAKE_BUILD_TYPE=Debug
cmake --build build --config Debug
cmake -S . -B build -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF -Wno-dev
cmake --build build --config Release --target package
- name: 'Upload Windows Installer'
uses: actions/upload-artifact@v3
with:
name: 'Windows Installer'
path: build/_CPack_Packages/win64/NSIS/*.exe
mac_build:
name: MacOS Build
runs-on: macos-latest
Expand All @@ -27,12 +32,16 @@ jobs:
- name: Compile
run: |
mkdir build
cmake -S . -B build -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF -DCAN_DRIVER=None -DCMAKE_BUILD_TYPE=Debug
cmake --build build --config Debug
ubuntu_build:
name: Ubuntu Build
runs-on: ubuntu-latest
cmake -S . -B build -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF -Wno-dev
cmake --build build --config Release --target package
- name: 'Upload OSX Installer'
uses: actions/upload-artifact@v3
with:
name: 'OSX dmg package'
path: build/_CPack_Packages/OSX/DragNDrop/*.dmg
ubuntu_20_04_build:
name: Ubuntu 20.04 Build
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -42,6 +51,35 @@ jobs:
run: |
mkdir build
sudo apt install libasound2-dev libjack-jackd2-dev ladspa-sdk libcurl4-openssl-dev libfreetype6-dev libx11-dev libxcomposite-dev libxcursor-dev libxcursor-dev libxext-dev libxinerama-dev libxrandr-dev libxrender-dev libwebkit2gtk-4.0-dev libglu1-mesa-dev mesa-common-dev
cmake -S . -B build -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF -DCAN_DRIVER=None -DCMAKE_BUILD_TYPE=Debug
cmake --build build --config Debug
cmake -S . -B build -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF -Wno-dev
cmake --build build --config Release
cd build
cpack -G DEB
- name: 'Upload Ubuntu 20.04 deb package'
uses: actions/upload-artifact@v3
with:
name: 'Ubuntu 20.04 deb package'
path: build/_CPack_Packages/Linux/DEB/*.deb
ubuntu_22_04_build:
name: Ubuntu 22.04 Build
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Compile
run: |
mkdir build
sudo apt install libasound2-dev libjack-jackd2-dev ladspa-sdk libcurl4-openssl-dev libfreetype6-dev libx11-dev libxcomposite-dev libxcursor-dev libxcursor-dev libxext-dev libxinerama-dev libxrandr-dev libxrender-dev libwebkit2gtk-4.0-dev libglu1-mesa-dev mesa-common-dev
cmake -S . -B build -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF -Wno-dev
cmake --build build --config Release
cd build
cpack -G DEB
- name: 'Upload Ubuntu 22.04 deb package'
uses: actions/upload-artifact@v3
with:
name: 'Ubuntu 22.04 deb package'
path: build/_CPack_Packages/Linux/DEB/*.deb


2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ set(CPACK_ALL_INSTALL_TYPES Full)
set(CPACK_COMPONENT_LIBRARIES_INSTALL_TYPES Full)
set(CPACK_COMPONENT_APPLICATIONS_INSTALL_TYPES Full)
set(CPACK_NSIS_INSTALLED_ICON_NAME ${CMAKE_CURRENT_LIST_DIR}/doc/smallLogo.ico)
set(CPACK_PACKAGE_ICON ${CPACK_NSIS_INSTALLED_ICON_NAME})
set(CPACK_NSIS_CONTACT ${CPACK_PACKAGE_CONTACT})
set(CPACK_NSIS_MUI_ICON ${CPACK_NSIS_INSTALLED_ICON_NAME})
set(CPACK_NSIS_MUI_UNICON ${CPACK_NSIS_INSTALLED_ICON_NAME})
Expand All @@ -167,6 +166,7 @@ if(APPLE)
set(CPACK_DMG_VOLUME_NAME "${PROJECT_NAME}")
set(CPACK_SYSTEM_NAME "OSX")
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}")
set(CPACK_PACKAGE_ICON ${CPACK_NSIS_INSTALLED_ICON_NAME})
endif()

# Must be after the last CPACK macros
Expand Down

0 comments on commit e49bb07

Please sign in to comment.