Skip to content

Commit

Permalink
Initial CI workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
dxli committed Sep 10, 2023
1 parent 0abc715 commit b20b851
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 14 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ jobs:
run: |
sudo apt-get -y update
sudo apt-get -qq install -y -qq cmake qttools5-dev qttools5-dev-tools libqt5opengl5-dev liblua5.3-dev git gcc \
libcairo2-dev libpango-1.0-0 libpango1.0-dev libboost-dev libboost-all-dev libboost-program-options-dev \
libqt5svg5-dev libgtest-dev libeigen3-dev libcurl4-gnutls-dev libgtk-3-dev libglew-dev rapidjson-dev \
libbz2-dev libglfw3-dev libglm-dev libfltk1.3-dev doxygen mkdocs qtchooser freeglut3-dev fuse
libcairo2-dev libpango-1.0-0 libpango1.0-dev libboost-dev libboost-all-dev libboost-program-options-dev \
libqt5svg5-dev libgtest-dev libeigen3-dev libcurl4-gnutls-dev libgtk-3-dev libglew-dev rapidjson-dev \
libbz2-dev libglfw3-dev libglm-dev libfltk1.3-dev doxygen mkdocs qtchooser freeglut3-dev fuse
sudo ln -snf /usr/lib/x86_64-linux-gnu/qtchooser/qt5.conf /usr/lib/x86_64-linux-gnu/qtchooser/default.conf
sudo rm -rf /usr/local/lib/android
Expand Down
31 changes: 27 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ name: Librecad3 Builders

jobs:
linux:
name: Building LibreCAD3 on ubuntu runner
name: BuildLinux
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -29,8 +29,8 @@ jobs:
- name: Uploading AppImage
uses: actions/upload-artifact@v3
with:
name: assets
path: ${{ github.workspace }}/build/LibreCAD**AppImage
name: LibreCAD3.AppImage
retention-days: 2

#- name: Uploading snap
Expand All @@ -41,7 +41,7 @@ jobs:
# retention-days: 2

windows:
name: Building LibreCAD3 on windows runner
name: BuildWindows
runs-on: windows-latest
steps:

Expand Down Expand Up @@ -85,4 +85,27 @@ jobs:
uses: actions/[email protected]
with:
path: '${{ github.workspace }}/build/bin/LibreCAD3**.exe'
name: LibreCAD3.exe
name: assets

UpdateAssets:
if: github.repository_owner == 'LibreCAD'
needs: [linux, windows]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Fetch artifacts
uses: actions/download-artifact@v3

- name: Upload latest pre-release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
title: "Continuous Build"
files: |
assets/LibreCAD*.*
LICENSE
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ if(EXISTS "${CMAKE_SOURCE_DIR}/conan_toolchain.cmake")
SET(CPACK_NSIS_INSTALLED_ICON_NAME "${CMAKE_SOURCE_DIR}/res/librecad.ico")
SET(CPACK_NSIS_PACKAGE_NAME "LibreCAD3")
set(CPACK_CREATE_DESKTOP_LINKS "LibreCAD3")
set(CPACK_PACKAGE_EXECUTABLES "librecad.exe;LibreCAD3")
set(CPACK_PACKAGE_EXECUTABLES "librecad;LibreCAD3")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "LibreCAD3")
set(CPACK_PACKAGE_NAME "LibreCAD3")
set(CPACK_INSTALL_CMAKE_PROJECTS "build/bin/Release;LibreCAD3;ALL;/")
set(CPACK_INSTALL_CMAKE_PROJECTS "build/bin;LibreCAD3;ALL;/")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
file(COPY "${CMAKE_SOURCE_DIR}/LICENSE" DESTINATION "${FINAL_INSTALL_DIR}")
include(CPack)
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ Compilation Instructions
==========
See https://github.com/LibreCAD/LibreCAD_3/wiki/Building

Releases and Releases and Continuous Building
----------
See https://github.com/LibreCAD/LibreCAD_3/releases


Reading materials for feature usage
=========
Expand Down
6 changes: 2 additions & 4 deletions lckernel/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ project(LCKERNEL)
#TODO: Fix this
set(PATTERN_RESOURCE_PATH ${CMAKE_SOURCE_DIR}/res/hatch)
if (MSVC)
install(DIRECTORY "${PATTERN_RESOURCE_PATH}"
DESTINATION "${FINAL_INSTALL_DIR}/res" )
install(DIRECTORY "${PATTERN_RESOURCE_PATH}" DESTINATION "res")
else()
install(DIRECTORY "${PATTERN_RESOURCE_PATH}"
DESTINATION "${FINAL_INSTALL_DIR}/usr/share/librecad" )
install(DIRECTORY "${PATTERN_RESOURCE_PATH}" DESTINATION "${FINAL_INSTALL_DIR}/usr/share/librecad")
endif()

#Include TinySpline
Expand Down
3 changes: 2 additions & 1 deletion scripts/windows-install/buildLibrecadAndCreatePackage.bat
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ dir

WinDeployQt librecad.exe
dir ..
copy ..\*.lua ..\*.json .
copy ..\*.lua
copy ..\*.json
where makensis.exe
dir ..\..\CPack*.cmake

Expand Down

0 comments on commit b20b851

Please sign in to comment.