diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml index cf2536e611..9d80d8853f 100644 --- a/.github/workflows/autobuild.yml +++ b/.github/workflows/autobuild.yml @@ -99,41 +99,41 @@ jobs: - config_name: AndroidAPK (artifact+codeql) target_os: android building_on_os: ubuntu-20.04 - cmd1_prebuild: "sh autobuild/android/autobuild_apk_1_prepare.sh " - cmd2_build: "sh autobuild/android/autobuild_apk_2_build.sh " - cmd3_postbuild: "sh autobuild/android/autobuild_apk_3_copy_files.sh " + cmd1_prebuild: "sh ./autobuild/android/autobuild_apk_1_prepare.sh " + cmd2_build: "./autobuild/android/autobuild_apk_2_build.sh " + cmd3_postbuild: "./autobuild/android/autobuild_apk_3_copy_files.sh " uses_codeql: true - config_name: Linux (codeQL) target_os: linux building_on_os: ubuntu-20.04 - cmd1_prebuild: "sh autobuild/linux/codeQL/auto_1_prepare.sh ${{ needs.create_release.outputs.x_github_workspace }}" - cmd2_build: "sh autobuild/linux/codeQL/auto_2_build_qt_project.sh" - cmd3_postbuild: "sh autobuild/linux/codeQL/auto_3_copy_files.sh" + cmd1_prebuild: "./autobuild/linux/codeQL/auto_1_prepare.sh ${{ needs.create_release.outputs.x_github_workspace }}" + cmd2_build: "./autobuild/linux/codeQL/auto_2_build_qt_project.sh" + cmd3_postbuild: "./autobuild/linux/codeQL/auto_3_copy_files.sh" uses_codeql: true - config_name: Linux (artifacts) target_os: linux building_on_os: ubuntu-20.04 - cmd1_prebuild: "sh autobuild/linux/artifacts/autobuild_deb_1_prepare.sh" - cmd2_build: "sh autobuild/linux/artifacts/autobuild_deb_2_build.sh" - cmd3_postbuild: "sh autobuild/linux/artifacts/autobuild_deb_3_copy_files.sh" + cmd1_prebuild: "./autobuild/linux/artifacts/autobuild_deb_1_prepare.sh" + cmd2_build: "./autobuild/linux/artifacts/autobuild_deb_2_build.sh" + cmd3_postbuild: "./autobuild/linux/artifacts/autobuild_deb_3_copy_files.sh" uses_codeql: false - config_name: MacOS (codeQL) target_os: macos building_on_os: macos-10.15 - cmd1_prebuild: "sh autobuild/mac/codeQL/autobuild_mac_1_prepare.sh" - cmd2_build: "sh autobuild/mac/codeQL/autobuild_mac_2_build.sh" - cmd3_postbuild: "sh autobuild/mac/codeQL/autobuild_mac_3_copy_files.sh" + cmd1_prebuild: "./autobuild/mac/codeQL/autobuild_mac_1_prepare.sh" + cmd2_build: "./autobuild/mac/codeQL/autobuild_mac_2_build.sh" + cmd3_postbuild: "./autobuild/mac/codeQL/autobuild_mac_3_copy_files.sh" uses_codeql: true - config_name: MacOS (artifacts) target_os: macos building_on_os: macos-10.15 - cmd1_prebuild: "sh autobuild/mac/artifacts/autobuild_mac_1_prepare.sh" - cmd2_build: "sh autobuild/mac/artifacts/autobuild_mac_2_build.sh" - cmd3_postbuild: "sh autobuild/mac/artifacts/autobuild_mac_3_copy_files.sh" + cmd1_prebuild: "./autobuild/mac/artifacts/autobuild_mac_1_prepare.sh" + cmd2_build: "./autobuild/mac/artifacts/autobuild_mac_2_build.sh" + cmd3_postbuild: "./autobuild/mac/artifacts/autobuild_mac_3_copy_files.sh" uses_codeql: false - config_name: Windows (artifact+codeql) diff --git a/autobuild/android/archive___android_build_docker/__example__jamulusbuild.sh b/autobuild/android/archive___android_build_docker/__example__jamulusbuild.sh old mode 100644 new mode 100755 diff --git a/autobuild/android/archive___android_build_docker/build_qt_project.sh b/autobuild/android/archive___android_build_docker/build_qt_project.sh old mode 100644 new mode 100755 diff --git a/autobuild/android/archive___android_build_docker/install-qt.sh b/autobuild/android/archive___android_build_docker/install-qt.sh old mode 100644 new mode 100755 diff --git a/autobuild/android/autobuild_apk_1_prepare.sh b/autobuild/android/autobuild_apk_1_prepare.sh old mode 100644 new mode 100755 diff --git a/autobuild/android/autobuild_apk_2_build.sh b/autobuild/android/autobuild_apk_2_build.sh old mode 100644 new mode 100755 index 0d8f1fe007..3a60b2e41b --- a/autobuild/android/autobuild_apk_2_build.sh +++ b/autobuild/android/autobuild_apk_2_build.sh @@ -7,17 +7,7 @@ ### PARAMETERS ### #################### -if [ ! -z "${1}" ]; then - THIS_JAMULUS_PROJECT_PATH="${1}" -elif [ ! -z "${jamulus_project_path}" ]; then - THIS_JAMULUS_PROJECT_PATH="${jamulus_project_path}" -elif [ ! -z "${GITHUB_WORKSPACE}" ]; then - THIS_JAMULUS_PROJECT_PATH="${GITHUB_WORKSPACE}" -else - echo "Please give the path to the repository root as environment variable 'jamulus_project_path' or parameter to this script!" - exit 1 -fi - +source $(dirname $(readlink -f "${BASH_SOURCE[0]}"))/../ensure_THIS_JAMULUS_PROJECT_PATH.sh ################### ### PROCEDURE ### diff --git a/autobuild/android/autobuild_apk_3_copy_files.sh b/autobuild/android/autobuild_apk_3_copy_files.sh old mode 100644 new mode 100755 index 5c906e0a30..43539dd4ea --- a/autobuild/android/autobuild_apk_3_copy_files.sh +++ b/autobuild/android/autobuild_apk_3_copy_files.sh @@ -7,17 +7,7 @@ ### PARAMETERS ### #################### -if [ ! -z "${1}" ]; then - THIS_JAMULUS_PROJECT_PATH="${1}" -elif [ ! -z "${jamulus_project_path}" ]; then - THIS_JAMULUS_PROJECT_PATH="${jamulus_project_path}" -elif [ ! -z "${GITHUB_WORKSPACE}" ]; then - THIS_JAMULUS_PROJECT_PATH="${GITHUB_WORKSPACE}" -else - echo "Please give the path to the repository root as environment variable 'jamulus_project_path' or parameter to this script!" - exit 1 -fi - +source $(dirname $(readlink -f "${BASH_SOURCE[0]}"))/../ensure_THIS_JAMULUS_PROJECT_PATH.sh ################### ### PROCEDURE ### diff --git a/autobuild/android/install-qt.sh b/autobuild/android/install-qt.sh old mode 100644 new mode 100755 diff --git a/autobuild/ensure_THIS_JAMULUS_PROJECT_PATH.sh b/autobuild/ensure_THIS_JAMULUS_PROJECT_PATH.sh new file mode 100644 index 0000000000..f366dcd05b --- /dev/null +++ b/autobuild/ensure_THIS_JAMULUS_PROJECT_PATH.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +echo "ensuring env-variable THIS_JAMULUS_PROJECT_PATH" + +#################### +### PARAMETERS ### +#################### + +if [ ! -z "${1}" ]; then + echo "THIS_JAMULUS_PROJECT_PATH from parameter" + THIS_JAMULUS_PROJECT_PATH="${1}" +elif [ ! -z "${jamulus_project_path}" ]; then + echo "THIS_JAMULUS_PROJECT_PATH from env-variable jamulus_project_path" + THIS_JAMULUS_PROJECT_PATH="${jamulus_project_path}" +elif [ ! -z "${GITHUB_WORKSPACE}" ]; then + echo "THIS_JAMULUS_PROJECT_PATH from env-variable GITHUB_WORKSPACE" + THIS_JAMULUS_PROJECT_PATH="${GITHUB_WORKSPACE}" +else + echo "Please give the path to the repository root as environment variable 'jamulus_project_path' or parameter to this script!" + exit 1 +fi + +if [ -d "$THIS_JAMULUS_PROJECT_PATH" ]; then + echo "THIS_JAMULUS_PROJECT_PATH exists (relative): ${THIS_JAMULUS_PROJECT_PATH}" + ## THIS_JAMULUS_PROJECT_PATH=$(readlink -e "${THIS_JAMULUS_PROJECT_PATH}") # works for linux, but not mac + THIS_JAMULUS_PROJECT_PATH=$(python -c "import os; print(os.path.abspath(\"${THIS_JAMULUS_PROJECT_PATH}\"));") + #python -c "import os; print(os.path.abspath(\"${THIS_JAMULUS_PROJECT_PATH}\"));" + echo "THIS_JAMULUS_PROJECT_PATH exists (absolute): ${THIS_JAMULUS_PROJECT_PATH}" +else + echo "ERROR: non-existing THIS_JAMULUS_PROJECT_PATH: ${THIS_JAMULUS_PROJECT_PATH}" + exit 1 +fi + diff --git a/autobuild/linux/artifacts/autobuild_deb_1_prepare.sh b/autobuild/linux/artifacts/autobuild_deb_1_prepare.sh old mode 100644 new mode 100755 diff --git a/autobuild/linux/artifacts/autobuild_deb_2_build.sh b/autobuild/linux/artifacts/autobuild_deb_2_build.sh old mode 100644 new mode 100755 index 3bc20e2204..c8cee941f8 --- a/autobuild/linux/artifacts/autobuild_deb_2_build.sh +++ b/autobuild/linux/artifacts/autobuild_deb_2_build.sh @@ -7,17 +7,7 @@ ### PARAMETERS ### #################### -if [ ! -z "${1}" ]; then - THIS_JAMULUS_PROJECT_PATH="${1}" -elif [ ! -z "${jamulus_project_path}" ]; then - THIS_JAMULUS_PROJECT_PATH="${jamulus_project_path}" -elif [ ! -z "${GITHUB_WORKSPACE}" ]; then - THIS_JAMULUS_PROJECT_PATH="${GITHUB_WORKSPACE}" -else - echo "Please give the path to the repository root as environment variable 'jamulus_project_path' or parameter to this script!" - exit 1 -fi - +source $(dirname $(readlink -f "${BASH_SOURCE[0]}"))/../../ensure_THIS_JAMULUS_PROJECT_PATH.sh ################### ### PROCEDURE ### diff --git a/autobuild/linux/artifacts/autobuild_deb_3_copy_files.sh b/autobuild/linux/artifacts/autobuild_deb_3_copy_files.sh old mode 100644 new mode 100755 index 5fce7e9286..1e3ac7238c --- a/autobuild/linux/artifacts/autobuild_deb_3_copy_files.sh +++ b/autobuild/linux/artifacts/autobuild_deb_3_copy_files.sh @@ -7,17 +7,7 @@ ### PARAMETERS ### #################### -if [ ! -z "${1}" ]; then - THIS_JAMULUS_PROJECT_PATH="${1}" -elif [ ! -z "${jamulus_project_path}" ]; then - THIS_JAMULUS_PROJECT_PATH="${jamulus_project_path}" -elif [ ! -z "${GITHUB_WORKSPACE}" ]; then - THIS_JAMULUS_PROJECT_PATH="${GITHUB_WORKSPACE}" -else - echo "Please give the path to the repository root as environment variable 'jamulus_project_path' or parameter to this script!" - exit 1 -fi - +source $(dirname $(readlink -f "${BASH_SOURCE[0]}"))/../../ensure_THIS_JAMULUS_PROJECT_PATH.sh ################### ### PROCEDURE ### diff --git a/autobuild/linux/codeQL/auto_1_prepare.sh b/autobuild/linux/codeQL/auto_1_prepare.sh old mode 100644 new mode 100755 diff --git a/autobuild/linux/codeQL/auto_2_build_qt_project.sh b/autobuild/linux/codeQL/auto_2_build_qt_project.sh old mode 100644 new mode 100755 index f35f6d29ea..c912b9b882 --- a/autobuild/linux/codeQL/auto_2_build_qt_project.sh +++ b/autobuild/linux/codeQL/auto_2_build_qt_project.sh @@ -7,16 +7,7 @@ ### PARAMETERS ### #################### -if [ ! -z "${1}" ]; then - THIS_JAMULUS_PROJECT_PATH="${1}" -elif [ ! -z "${jamulus_project_path}" ]; then - THIS_JAMULUS_PROJECT_PATH="${jamulus_project_path}" -elif [ ! -z "${GITHUB_WORKSPACE}" ]; then - THIS_JAMULUS_PROJECT_PATH="${GITHUB_WORKSPACE}" -else - echo "Please give the path to the repository root as environment variable 'jamulus_project_path' or parameter to this script!" - exit 1 -fi +source $(dirname $(readlink -f "${0}"))/../../ensure_THIS_JAMULUS_PROJECT_PATH.sh ################### diff --git a/autobuild/linux/codeQL/auto_3_copy_files.sh b/autobuild/linux/codeQL/auto_3_copy_files.sh old mode 100644 new mode 100755 diff --git a/autobuild/mac/artifacts/autobuild_mac_1_prepare.sh b/autobuild/mac/artifacts/autobuild_mac_1_prepare.sh old mode 100644 new mode 100755 index f86ab4e237..7d22d4cc62 --- a/autobuild/mac/artifacts/autobuild_mac_1_prepare.sh +++ b/autobuild/mac/artifacts/autobuild_mac_1_prepare.sh @@ -2,7 +2,6 @@ # autobuild_1_prepare: set up environment, install Qt & dependencies - ################### ### PROCEDURE ### ################### diff --git a/autobuild/mac/artifacts/autobuild_mac_2_build.sh b/autobuild/mac/artifacts/autobuild_mac_2_build.sh old mode 100644 new mode 100755 index 7f81d1fc12..86c2c384e6 --- a/autobuild/mac/artifacts/autobuild_mac_2_build.sh +++ b/autobuild/mac/artifacts/autobuild_mac_2_build.sh @@ -7,17 +7,7 @@ ### PARAMETERS ### #################### -if [ ! -z "${1}" ]; then - THIS_JAMULUS_PROJECT_PATH="${1}" -elif [ ! -z "${jamulus_project_path}" ]; then - THIS_JAMULUS_PROJECT_PATH="${jamulus_project_path}" -elif [ ! -z "${GITHUB_WORKSPACE}" ]; then - THIS_JAMULUS_PROJECT_PATH="${GITHUB_WORKSPACE}" -else - echo "Please give the path to the repository root as environment variable 'jamulus_project_path' or parameter to this script!" - exit 1 -fi - +source "$(dirname "${BASH_SOURCE[0]}")/../../ensure_THIS_JAMULUS_PROJECT_PATH.sh" ################### ### PROCEDURE ### diff --git a/autobuild/mac/artifacts/autobuild_mac_3_copy_files.sh b/autobuild/mac/artifacts/autobuild_mac_3_copy_files.sh old mode 100644 new mode 100755 index b070e0c94b..64dd55d690 --- a/autobuild/mac/artifacts/autobuild_mac_3_copy_files.sh +++ b/autobuild/mac/artifacts/autobuild_mac_3_copy_files.sh @@ -7,17 +7,7 @@ ### PARAMETERS ### #################### -if [ ! -z "${1}" ]; then - THIS_JAMULUS_PROJECT_PATH="${1}" -elif [ ! -z "${jamulus_project_path}" ]; then - THIS_JAMULUS_PROJECT_PATH="${jamulus_project_path}" -elif [ ! -z "${GITHUB_WORKSPACE}" ]; then - THIS_JAMULUS_PROJECT_PATH="${GITHUB_WORKSPACE}" -else - echo "Please give the path to the repository root as environment variable 'jamulus_project_path' or parameter to this script!" - exit 1 -fi - +source "$(dirname "${BASH_SOURCE[0]}")/../../ensure_THIS_JAMULUS_PROJECT_PATH.sh" ################### ### PROCEDURE ### diff --git a/autobuild/mac/codeQL/autobuild_mac_1_prepare.sh b/autobuild/mac/codeQL/autobuild_mac_1_prepare.sh old mode 100644 new mode 100755 index 769de434c8..9f1567b984 --- a/autobuild/mac/codeQL/autobuild_mac_1_prepare.sh +++ b/autobuild/mac/codeQL/autobuild_mac_1_prepare.sh @@ -2,35 +2,10 @@ # autobuild_1_prepare: set up environment, install Qt & dependencies - -#################### -### PARAMETERS ### -#################### - -if [ ! -z "${1}" ]; then - THIS_JAMULUS_PROJECT_PATH="${1}" -elif [ ! -z "${jamulus_project_path}" ]; then - THIS_JAMULUS_PROJECT_PATH="${jamulus_project_path}" -elif [ ! -z "${GITHUB_WORKSPACE}" ]; then - THIS_JAMULUS_PROJECT_PATH="${GITHUB_WORKSPACE}" -else - echo "Please give the path to the repository root as environment variable 'jamulus_project_path' or parameter to this script!" - exit 1 -fi - - ################### ### PROCEDURE ### ################### -# please run this script with the first parameter being the root of the repo -if [ -z "${jamulus_project_path}" ]; then - echo "Please give the path to the repository root as environment parameter 'jamulus_project_path' to this script!" - exit 1 -fi - -cd "${GITHUB_WORKSPACE}" - echo "Install dependencies..." brew install qt5 brew link qt5 --force diff --git a/autobuild/mac/codeQL/autobuild_mac_2_build.sh b/autobuild/mac/codeQL/autobuild_mac_2_build.sh old mode 100644 new mode 100755 index 793134b1f0..cfb1d716a3 --- a/autobuild/mac/codeQL/autobuild_mac_2_build.sh +++ b/autobuild/mac/codeQL/autobuild_mac_2_build.sh @@ -7,17 +7,7 @@ ### PARAMETERS ### #################### -if [ ! -z "${1}" ]; then - THIS_JAMULUS_PROJECT_PATH="${1}" -elif [ ! -z "${jamulus_project_path}" ]; then - THIS_JAMULUS_PROJECT_PATH="${jamulus_project_path}" -elif [ ! -z "${GITHUB_WORKSPACE}" ]; then - THIS_JAMULUS_PROJECT_PATH="${GITHUB_WORKSPACE}" -else - echo "Please give the path to the repository root as environment variable 'jamulus_project_path' or parameter to this script!" - exit 1 -fi - +source $(dirname $(readlink "${0}"))/../../ensure_THIS_JAMULUS_PROJECT_PATH.sh ################### ### PROCEDURE ### diff --git a/autobuild/mac/codeQL/autobuild_mac_3_copy_files.sh b/autobuild/mac/codeQL/autobuild_mac_3_copy_files.sh old mode 100644 new mode 100755 index b15cca3636..1da36e7b90 --- a/autobuild/mac/codeQL/autobuild_mac_3_copy_files.sh +++ b/autobuild/mac/codeQL/autobuild_mac_3_copy_files.sh @@ -3,5 +3,4 @@ # autobuild_3_copy_files: copy the built files to deploy folder - echo "there are no artifacts in this run for CodeQL" \ No newline at end of file