mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-15 07:01:18 +02:00
Move GitHub Actions CI scripts into separate files
Break the workflow into smaller stages (Configure, Build, Install, Package, etc.) so that you can see exactly which stage failed in the GitHub Actions run log. Create a separate Bash CI script for each job stage (configure.sh, build.sh, install.sh, package.sh, etc.) to reduce the size of the main YAML workflow file and enable Bash syntax highlighting. Close #917
This commit is contained in:
committed by
Dmitry Vedenko
parent
3ebebbb360
commit
4b5c95d7fe
@@ -74,6 +74,15 @@ macro( set_cache_value var value )
|
||||
set_property( CACHE ${var} PROPERTY VALUE "${value}" )
|
||||
endmacro()
|
||||
|
||||
# Set a CMake variable to the value of the corresponding environment variable
|
||||
# if the CMake variable is not already defined. Any addition arguments after
|
||||
# the variable name are passed through to set().
|
||||
macro( set_from_env var )
|
||||
if( NOT DEFINED ${var} AND NOT "$ENV{${var}}" STREQUAL "" )
|
||||
set( ${var} "$ENV{${var}}" ${ARGN} ) # pass additional args (e.g. CACHE)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# Set the given property and its config specific brethren to the same value
|
||||
function( set_target_property_all target property value )
|
||||
set_target_properties( "${target}" PROPERTIES "${property}" "${value}" )
|
||||
|
25
cmake-proxies/cmake-modules/Package.cmake
Normal file
25
cmake-proxies/cmake-modules/Package.cmake
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR "${AUDACITY_VERSION}") # X
|
||||
set(CPACK_PACKAGE_VERSION_MINOR "${AUDACITY_RELEASE}") # Y
|
||||
set(CPACK_PACKAGE_VERSION_PATCH "${AUDACITY_REVISION}") # Z
|
||||
|
||||
# X.Y.Z-alpha-20210615
|
||||
set(CPACK_PACKAGE_VERSION "${AUDACITY_VERSION}.${AUDACITY_RELEASE}.${AUDACITY_REVISION}${AUDACITY_SUFFIX}")
|
||||
|
||||
if(NOT AUDACITY_BUILD_LEVEL EQUAL 2)
|
||||
# X.Y.Z-alpha-20210615+a1b2c3d
|
||||
set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}+${GIT_COMMIT_SHORT}")
|
||||
endif()
|
||||
|
||||
# Audacity-X.Y.Z-alpha-20210615
|
||||
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${CPACK_PACKAGE_VERSION}")
|
||||
|
||||
if(NOT "$ENV{AUDACITY_ARCH_LABEL}" STREQUAL "")
|
||||
# Audacity-X.Y.Z-alpha-20210615-x86_64
|
||||
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-$ENV{AUDACITY_ARCH_LABEL}")
|
||||
endif()
|
||||
set(CPACK_PACKAGE_DIRECTORY "${CMAKE_BINARY_DIR}/package")
|
||||
|
||||
set(CPACK_GENERATOR ZIP)
|
||||
|
||||
include(CPack) # do this last
|
Reference in New Issue
Block a user