From 889e8617d557828cf7399b645745dd24fcc678dd Mon Sep 17 00:00:00 2001 From: Sopitive <30811278+Sopitive@users.noreply.github.com> Date: Wed, 11 May 2022 13:55:10 -0600 Subject: [PATCH 01/37] Updated docs for face_toward notes. --- .../ReachVariantTool/help/resources/main.css | 444 ++++++++++++++---- .../api/object/actions/face_toward.html | 330 +++++++------ 2 files changed, 537 insertions(+), 237 deletions(-) diff --git a/native/src/ReachVariantTool/help/resources/main.css b/native/src/ReachVariantTool/help/resources/main.css index 3028c65c..7977383d 100644 --- a/native/src/ReachVariantTool/help/resources/main.css +++ b/native/src/ReachVariantTool/help/resources/main.css @@ -1,101 +1,361 @@ -html{ - --sidebar-back: #EEE; - --line-height: 1.215em; /*take the firefox default for Calibri and make it explicit, so we can size/position other things relative to it*/ +html { + --sidebar-back: #EEE; + --line-height: 1.215em; /*take the firefox default for Calibri and make it explicit, so we can size/position other things relative to it*/ +} + +* { + line-height: var(--line-height) } -*{line-height:var(--line-height)} /* core layout: */ -html{background:#888;margin:0;padding:0} -body{background:var(--sidebar-back);min-height:100vh;display:flex;flex-flow:row nowrap;max-width:1600px;margin:0 auto;padding:0} - body>*{box-sizing:border-box;height:100vh;overflow-y:auto} - #sidebar{width:25%;min-width:18em;padding:.5rem 1rem;font-size:.875rem;flex:0 0 auto} - #sidebar ul{margin:0;padding:0 0 0 1.5em} - #sidebar li{list-style:none;position:relative} - #sidebar li a{display:block;background:#FFF;padding:.25em .5em;text-decoration:none;border-radius:.2rem} - #sidebar li a{text-overflow:ellipsis;overflow-x:hidden} - #sidebar li a{margin:4px 0} /*spacing*/ - #sidebar li a.you-are-here{font-weight:bold} - #sidebar li.collapsed ul{display:none} - #sidebar>ul{list-style:none;margin:0;padding:0} - #sidebar>ul>li{list-style:none} - #sidebar .toggle{all:unset;position:absolute;right:100%;top:0;text-align:center;width:1.5ch;height:var(--line-height);padding:.25em 0;background:#CCC;color:#000;border-radius:.2rem 0 0 .2rem;cursor:default} - #sidebar .toggle{margin:0} /* Edge doesn't understand "all:unset" */ - #sidebar .toggle::before{content:"-";cursor:default} - #sidebar li.collapsed>.toggle::before{content:"+"} - #sidebar .toggle+a{border-radius:0 .2rem .2rem 0} - #sidebar ul hr{border:0;border-top:1px solid #BBB} - main{background:#FFF;padding:1rem;flex:1 1 auto} +html { + background: #888; + margin: 0; + padding: 0 +} + +body { + background: var(--sidebar-back); + min-height: 100vh; + display: flex; + flex-flow: row nowrap; + max-width: 1600px; + margin: 0 auto; + padding: 0 +} + + body > * { + box-sizing: border-box; + height: 100vh; + overflow-y: auto + } + +#sidebar { + width: 25%; + min-width: 18em; + padding: .5rem 1rem; + font-size: .875rem; + flex: 0 0 auto +} + + #sidebar ul { + margin: 0; + padding: 0 0 0 1.5em + } + + #sidebar li { + list-style: none; + position: relative + } + + #sidebar li a { + display: block; + background: #FFF; + padding: .25em .5em; + text-decoration: none; + border-radius: .2rem + } + + #sidebar li a { + text-overflow: ellipsis; + overflow-x: hidden + } + + #sidebar li a { + margin: 4px 0 + } + /*spacing*/ + #sidebar li a.you-are-here { + font-weight: bold + } + + #sidebar li.collapsed ul { + display: none + } + + #sidebar > ul { + list-style: none; + margin: 0; + padding: 0 + } + + #sidebar > ul > li { + list-style: none + } + + #sidebar .toggle { + all: unset; + position: absolute; + right: 100%; + top: 0; + text-align: center; + width: 1.5ch; + height: var(--line-height); + padding: .25em 0; + background: #CCC; + color: #000; + border-radius: .2rem 0 0 .2rem; + cursor: default + } + + #sidebar .toggle { + margin: 0 + } + /* Edge doesn't understand "all:unset" */ + #sidebar .toggle::before { + content: "-"; + cursor: default + } + + #sidebar li.collapsed > .toggle::before { + content: "+" + } + + #sidebar .toggle + a { + border-radius: 0 .2rem .2rem 0 + } + + #sidebar ul hr { + border: 0; + border-top: 1px solid #BBB + } + +main { + background: #FFF; + padding: 1rem; + flex: 1 1 auto +} /* Firefox bug: #sidebar does not scroll to the bottom padding when overflow-y:auto kicks in i.e. there effectively is no bottom padding */ -#sidebar{padding-bottom:0} /* remove the padding-bottom so we don't double-pad for other browsers */ - #sidebar::after{height:.5rem;content:" ";display:block} /* use a pseudo-element instead of padding */ -main{padding-bottom:0} /* this bug affects main, too */ - main::after{height:.5rem;content:" ";display:block} - -main header{margin-bottom:1rem} - main header h1 {margin-bottom:0} - header .a-k-a, - header .type{display:block;color:#666;font-size:1.1rem;font-weight:normal} - -#toc{max-width:20rem;list-style:none;margin:1em 0;padding:.25rem .5rem;border:1px solid #AAA;border-radius:3px;background:#FCFCFC} - #toc::before{display:block;content:"Contents";font-weight:bold;text-align:center} - #toc ul{list-style:none;margin:0;padding:0 0 0 1rem} - #toc li{margin:0;padding:.1em 0} - #toc li+li{border-top:1px solid #E0E0E0} - -p, h1, h2, h3, h4, h5, h6{margin:1rem 0} -/* manage initial/final margins: */ -h1:first-child, -h2:first-child, -h3:first-child, -h4:first-child, -h5:first-child, -h6:first-child, -p:first-child{margin-top:0} -h1:last-child, -h2:last-child, -h3:last-child, -h4:last-child, -h5:last-child, -h6:last-child, -p:last-child{margin-bottom:0} - -.header-permalink{margin-left:1em;font-size:1rem;font-weight:normal} - .header-permalink::before{content:"🔗"} -.header-permalink{display:none} -*:hover>.header-permalink{display:inline} +#sidebar { + padding-bottom: 0 +} + /* remove the padding-bottom so we don't double-pad for other browsers */ + #sidebar::after { + height: .5rem; + content: " "; + display: block + } +/* use a pseudo-element instead of padding */ +main { + padding-bottom: 0 +} + /* this bug affects main, too */ + main::after { + height: .5rem; + content: " "; + display: block + } + + main header { + margin-bottom: 1rem + } + + main header h1 { + margin-bottom: 0 + } + +header .a-k-a, +header .type { + display: block; + color: #666; + font-size: 1.1rem; + font-weight: normal +} + +#toc { + max-width: 20rem; + list-style: none; + margin: 1em 0; + padding: .25rem .5rem; + border: 1px solid #AAA; + border-radius: 3px; + background: #FCFCFC +} + + #toc::before { + display: block; + content: "Contents"; + font-weight: bold; + text-align: center + } + + #toc ul { + list-style: none; + margin: 0; + padding: 0 0 0 1rem + } + + #toc li { + margin: 0; + padding: .1em 0 + } + + #toc li + li { + border-top: 1px solid #E0E0E0 + } + +p, h1, h2, h3, h4, h5, h6 { + margin: 1rem 0 +} + /* manage initial/final margins: */ + h1:first-child, + h2:first-child, + h3:first-child, + h4:first-child, + h5:first-child, + h6:first-child, + p:first-child { + margin-top: 0 + } + + h1:last-child, + h2:last-child, + h3:last-child, + h4:last-child, + h5:last-child, + h6:last-child, + p:last-child { + margin-bottom: 0 + } + +.header-permalink { + margin-left: 1em; + font-size: 1rem; + font-weight: normal +} + + .header-permalink::before { + content: "🔗" + } + +.header-permalink { + display: none +} + +*:hover > .header-permalink { + display: inline +} /* yellow fade when jumping to a header (TODO: wrap sections in
so we can fade the whole section and not just the header) */ @keyframes jump-to-section { - 0% { - background:rgba(255, 255, 128, 0.5); - box-shadow:0 0 6px 6px rgba(255, 255, 128, 0.5); - } - 100% { background:transparent } -} -a:target{animation:jump-to-section 3s ease-in 1} - -h2{border-bottom:1px solid #DDD} - -body{font-family:Calibri,Verdana,sans-serif} -dl{} - dt{font-weight:bold} - dd{} - dd+dt{margin-top:1em} - -main ul>li+li{margin-top:.5em} - -code{background:#EEE} -pre{padding:.5em;background:#F4F4F4;border:1px solid #DDD;overflow-x:auto} - pre .comment{color:#292;font-style:italic} - pre .string{color:#777} - pre .keyword{color:#00F;font-weight:bold} - pre .subkeyword{color:#07B;font-weight:bold} - -a{text-decoration:none} -a:link{color:#03E} -a:visited{color:#938} -a:link:hover{text-decoration:underline} -#sidebar a:link:hover{color:#36F;text-decoration:none} -#sidebar a:visited:hover{color:#B5A} \ No newline at end of file + 0% { + background: rgba(255, 255, 128, 0.5); + box-shadow: 0 0 6px 6px rgba(255, 255, 128, 0.5); + } + + 100% { + background: transparent + } +} + +a:target { + animation: jump-to-section 3s ease-in 1 +} + +h2 { + border-bottom: 1px solid #DDD +} + +body { + font-family: Calibri,Verdana,sans-serif +} + +dl { +} + +dt { + font-weight: bold +} + +dd { +} + + dd + dt { + margin-top: 1em + } + +main ul > li + li { + margin-top: .5em +} + +code { + background: #EEE +} + +pre { + padding: .5em; + background: #F4F4F4; + border: 1px solid #DDD; + overflow-x: auto +} + + pre .comment { + color: #292; + font-style: italic + } + + pre .string { + color: #777 + } + + pre .keyword { + color: #00F; + font-weight: bold + } + + pre .subkeyword { + color: #07B; + font-weight: bold + } + + pre .iterator { + color: #DC143C; + font-weight: bold + } + + pre .function { + color: #2e8c35; + font-weight: bold; + } + + pre .variable { + color: #ad1c73; + font-weight: bold; + } + + pre .operator { + color: #29a6a2; + font-weight: bold; + } + + pre .namespace { + color: #dbb02e; + font-weight: bold; + } + +a { + text-decoration: none +} + + a:link { + color: #03E + } + + a:visited { + color: #938 + } + + a:link:hover { + text-decoration: underline + } + +#sidebar a:link:hover { + color: #36F; + text-decoration: none +} + +#sidebar a:visited:hover { + color: #B5A +} diff --git a/native/src/ReachVariantTool/help/script/api/object/actions/face_toward.html b/native/src/ReachVariantTool/help/script/api/object/actions/face_toward.html index 92862e50..7d657cd8 100644 --- a/native/src/ReachVariantTool/help/script/api/object/actions/face_toward.html +++ b/native/src/ReachVariantTool/help/script/api/object/actions/face_toward.html @@ -1,160 +1,200 @@ - - - object.face_toward | ReachVariantTool Documentation - - - - - - - +
+

object.face_toward

-

- This function can be used to make one object face toward another. It only - affects the object's heading (yaw), not its pitch or roll rotations. -

- -

Arguments

-
-
other
-

- The object whose rotation should be copied. -

-
x
-

- The X-coordinate of an offset-position. The object will rotate to face - other's position plus the offset position. Allowed values are - integer constants between -128 and 127, inclusive, where 10 is equal to - one Forge unit. -

-
y
-

- The Y-coordinate of an offset-position. The object will rotate to face - other's position plus the offset position. Allowed values are - integer constants between -128 and 127, inclusive, where 10 is equal to - one Forge unit. -

-
z
-

- The Z-coordinate of an offset-position. The object will rotate to face - other's position plus the offset position. Allowed values are - integer constants between -128 and 127, inclusive, where 10 is equal to - one Forge unit. -

-
-

Example

+

+ This function can be used to make one object face toward another. It only + affects the object's heading (yaw), not its pitch or roll rotations. +

+ +

Arguments

+
+
other
+
+

+ The object whose rotation should be copied. +

+
+
x
+
+

+ The X-coordinate of an offset-position. The object will rotate to face + other's position plus the offset position. Allowed values are + integer constants between -128 and 127, inclusive, where 10 is equal to + one Forge unit. +

+
+
y
+
+

+ The Y-coordinate of an offset-position. The object will rotate to face + other's position plus the offset position. Allowed values are + integer constants between -128 and 127, inclusive, where 10 is equal to + one Forge unit. +

+
+
z
+
+

+ The Z-coordinate of an offset-position. The object will rotate to face + other's position plus the offset position. Allowed values are + integer constants between -128 and 127, inclusive, where 10 is equal to + one Forge unit. +

+
+
+

Example

-global.object[0].copy_rotation_from(global.object[1], true)
-

Notes

-

See also

- +global.object[0].copy_rotation_from(global.object[1], true) +

Notes

+

See also

+ -
- - - + + + + \ No newline at end of file From 885030d10993987ef4404d03bb9cde0d3be641bf Mon Sep 17 00:00:00 2001 From: Sopitive <30811278+Sopitive@users.noreply.github.com> Date: Tue, 18 Oct 2022 21:24:00 -0700 Subject: [PATCH 02/37] Angle Conversion Input Box --- .../api/object/actions/face_toward.html | 66 ++++++++++++++----- 1 file changed, 50 insertions(+), 16 deletions(-) diff --git a/native/src/ReachVariantTool/help/script/api/object/actions/face_toward.html b/native/src/ReachVariantTool/help/script/api/object/actions/face_toward.html index 7d657cd8..066384b0 100644 --- a/native/src/ReachVariantTool/help/script/api/object/actions/face_toward.html +++ b/native/src/ReachVariantTool/help/script/api/object/actions/face_toward.html @@ -1,5 +1,6 @@ + object.face_toward | ReachVariantTool Documentation @@ -9,7 +10,42 @@ + +
-

object.face_toward

+
+

object.face_toward

+

- This function can be used to make one object face toward another. It only - affects the object's heading (yaw), not its pitch or roll rotations. + This function can be used to make one object face toward another. It only affects the object's heading (yaw), not its pitch or roll rotations.

Arguments

@@ -120,32 +157,28 @@

Arguments

The X-coordinate of an offset-position. The object will rotate to face - other's position plus the offset position. Allowed values are - integer constants between -128 and 127, inclusive, where 10 is equal to - one Forge unit. + other's position plus the offset position. Allowed values are integer constants between -128 and 127, inclusive, where 10 is equal to one Forge unit.

y

The Y-coordinate of an offset-position. The object will rotate to face - other's position plus the offset position. Allowed values are - integer constants between -128 and 127, inclusive, where 10 is equal to - one Forge unit. + other's position plus the offset position. Allowed values are integer constants between -128 and 127, inclusive, where 10 is equal to one Forge unit.

z

The Z-coordinate of an offset-position. The object will rotate to face - other's position plus the offset position. Allowed values are - integer constants between -128 and 127, inclusive, where 10 is equal to - one Forge unit. + other's position plus the offset position. Allowed values are integer constants between -128 and 127, inclusive, where 10 is equal to one Forge unit.

Example

-
+        
+ +
 global.object[0].copy_rotation_from(global.object[1], true)

Notes

    @@ -156,8 +189,7 @@

    Notes

  • - The object.face_toward function only affects the heading (yaw) by default, however you can adjust the pitch and roll of an object using clever placements and attachments. - The following code will roll a warthog 45 degrees: + The object.face_toward function only affects the heading (yaw) by default, however you can adjust the pitch and roll of an object using clever placements and attachments. The following code will roll a warthog 45 degrees:

     
    @@ -184,7 +216,8 @@ 

    Notes

    end
  • -

See also

+ +

See also

  • object.attach_to
  • object.copy_rotation_from
  • @@ -197,4 +230,5 @@

    Notes

    + \ No newline at end of file From 2c41a084ad350ffd474377c1a1164d88c06d762a Mon Sep 17 00:00:00 2001 From: Sopitive <30811278+Sopitive@users.noreply.github.com> Date: Sat, 22 Jul 2023 13:18:35 -0700 Subject: [PATCH 03/37] Create .github --- .github | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github diff --git a/.github b/.github new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/.github @@ -0,0 +1 @@ + From cbe66b752bfbf25abe46d1527179a4c95997710c Mon Sep 17 00:00:00 2001 From: Sopitive <> Date: Sat, 22 Jul 2023 13:24:32 -0700 Subject: [PATCH 04/37] Build Project --- .github | 1 - .github/worlflows/build.txt | 309 ++++++++++++++++++++++++++++++++++++ 2 files changed, 309 insertions(+), 1 deletion(-) delete mode 100644 .github create mode 100644 .github/worlflows/build.txt diff --git a/.github b/.github deleted file mode 100644 index 8b137891..00000000 --- a/.github +++ /dev/null @@ -1 +0,0 @@ - diff --git a/.github/worlflows/build.txt b/.github/worlflows/build.txt new file mode 100644 index 00000000..09bad363 --- /dev/null +++ b/.github/worlflows/build.txt @@ -0,0 +1,309 @@ +name: QMake Build Matrix + +on: [push] + +env: + QT_VERSION: 5.15.2 + QT_CREATOR_VERSION: 4.11.0 + PLUGIN_PRO: doxygen.pro + PLUGIN_NAME: Doxygen + +jobs: + build: + name: ${{ matrix.config.name }} + runs-on: ${{ matrix.config.os }} + strategy: + matrix: + config: + - { + name: "Windows Latest x64", artifact: "Windows-x64.zip", + os: windows-latest, + environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat" + } + - { + name: "Windows Latest x86", artifact: "Windows-x86.zip", + os: windows-latest, + environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars32.bat" + } + - { + name: "Linux Latest x64", artifact: "Linux-x64.zip", + os: ubuntu-latest + } + - { + name: "macOS Latest x64", artifact: "macOS-x64.zip", + os: macos-latest + } + + steps: + - uses: actions/checkout@v1 + + - name: Installing system libs + shell: cmake -P {0} + run: | + if ("${{ runner.os }}" STREQUAL "Linux") + execute_process( + COMMAND sudo apt install libgl1-mesa-dev + ) + endif() + + - name: Download Qt + id: qt + shell: cmake -P {0} + run: | + set(qt_version $ENV{QT_VERSION}) + + string(REPLACE "." "" qt_version_dotless "${qt_version}") + if ("${{ runner.os }}" STREQUAL "Windows") + set(url_os "windows_x86") + if ("${{ matrix.config.environment_script }}" MATCHES "vcvars64.bat") + set(qt_package_name "qt.qt5.${qt_version_dotless}.win64_msvc2017_64") + set(qt_dir_prefix "${qt_version}/msvc2017_64") + elseif ("${{ matrix.config.environment_script }}" MATCHES "vcvars32.bat") + set(qt_package_name "qt.qt5.${qt_version_dotless}.win32_msvc2017") + set(qt_dir_prefix "${qt_version}/msvc2017") + else() + endif() + elseif ("${{ runner.os }}" STREQUAL "Linux") + set(url_os "linux_x64") + set(qt_package_name "qt.qt5.${qt_version_dotless}.gcc_64") + set(qt_dir_prefix "${qt_version}/gcc_64") + elseif ("${{ runner.os }}" STREQUAL "macOS") + set(url_os "mac_x64") + set(qt_package_name "qt.qt5.${qt_version_dotless}.clang_64") + set(qt_dir_prefix "${qt_version}/clang_64") + endif() + + set(qt_base_url "https://download.qt.io/online/qtsdkrepository/${url_os}/desktop/qt5_${qt_version_dotless}") + file(DOWNLOAD "${qt_base_url}/Updates.xml" ./Updates.xml SHOW_PROGRESS) + + file(READ ./Updates.xml updates_xml) + string(REGEX MATCH "${qt_package_name}.*([0-9+-.]+).*qtbase([a-zA-Z0-9_-]+).7z" + updates_xml_output "${updates_xml}") + set(package_version ${CMAKE_MATCH_1}) + set(package_suffix ${CMAKE_MATCH_2}) + string(REPLACE "-debug-symbols" "" package_suffix "${package_suffix}") + + # Workaround for CMake's greedy regex + if ("${{ matrix.config.environment_script }}" MATCHES "vcvars32.bat") + string(REPLACE "X86_64" "X86" package_suffix "${package_suffix}") + endif() + + file(MAKE_DIRECTORY qt5) + + # Save the path for other steps + file(TO_CMAKE_PATH "$ENV{GITHUB_WORKSPACE}/qt5/${qt_dir_prefix}" qt_dir) + message("::set-output name=qt_dir::${qt_dir}") + + foreach(package qtbase qtdeclarative qttools qtsvg) + file(DOWNLOAD + "${qt_base_url}/${qt_package_name}/${package_version}${package}${package_suffix}.7z" ./${package}.7z + SHOW_PROGRESS + ) + execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf ../${package}.7z WORKING_DIRECTORY qt5) + endforeach() + + file(READ "qt5/${qt_dir_prefix}/mkspecs/qconfig.pri" qtconfig) + string(REPLACE "Enterprise" "OpenSource" qtconfig "${qtconfig}") + string(REPLACE "licheck.exe" "" qtconfig "${qtconfig}") + string(REPLACE "licheck64" "" qtconfig "${qtconfig}") + string(REPLACE "licheck_mac" "" qtconfig "${qtconfig}") + file(WRITE "qt5/${qt_dir_prefix}/mkspecs/qconfig.pri" "${qtconfig}") + + - name: Download Qt Creator + id: qt_creator + shell: cmake -P {0} + run: | + string(REGEX MATCH "([0-9]+.[0-9]+).[0-9]+" outvar "$ENV{QT_CREATOR_VERSION}") + set(qtc_base_url "https://download.qt.io/official_releases/qtcreator/${CMAKE_MATCH_1}/$ENV{QT_CREATOR_VERSION}") + + if ("${{ runner.os }}" STREQUAL "Windows") + set(qtc_output_directory "qtcreator/lib/qtcreator/plugins") + set(qtc_binary_name "$ENV{PLUGIN_NAME}4.dll") + if ("${{ matrix.config.environment_script }}" MATCHES "vcvars64.bat") + set(qtc_platform "windows_msvc2017_x64") + elseif ("${{ matrix.config.environment_script }}" MATCHES "vcvars32.bat") + set(qtc_platform "windows_msvc2017_x86") + endif() + elseif ("${{ runner.os }}" STREQUAL "Linux") + set(qtc_output_directory "qtcreator/lib/qtcreator/plugins") + set(qtc_binary_name "lib$ENV{PLUGIN_NAME}.so") + set(qtc_platform "linux_gcc_64_rhel72") + elseif ("${{ runner.os }}" STREQUAL "macOS") + set(qtc_output_directory "qtcreator/bin/Qt Creator.app/Contents/PlugIns") + set(qtc_binary_name "lib$ENV{PLUGIN_NAME}.dylib") + set(qtc_platform "mac_x64") + endif() + + # Save the path for other steps + message("::set-output name=qtc_binary_name::${qtc_binary_name}") + message("::set-output name=qtc_output_directory::${qtc_output_directory}") + + file(MAKE_DIRECTORY qtcreator) + + foreach(package qtcreator qtcreator_dev) + file(DOWNLOAD + "${qtc_base_url}/installer_source/${qtc_platform}/${package}.7z" ./${package}.7z SHOW_PROGRESS) + execute_process(COMMAND + ${CMAKE_COMMAND} -E tar xvf ../${package}.7z WORKING_DIRECTORY qtcreator) + endforeach() + + if ("${{ runner.os }}" STREQUAL "macOS") + execute_process( + COMMAND ${CMAKE_COMMAND} -E make_directory qtcreator/bin + COMMAND ${CMAKE_COMMAND} -E create_symlink + "$ENV{GITHUB_WORKSPACE}/qtcreator/Qt Creator.app" + "$ENV{GITHUB_WORKSPACE}/qtcreator/bin/Qt Creator.app" + ) + endif() + + - name: Configure + shell: cmake -P {0} + run: | + if ("${{ runner.os }}" STREQUAL "Windows" AND NOT "x${{ matrix.config.environment_script }}" STREQUAL "x") + execute_process( + COMMAND "${{ matrix.config.environment_script }}" && set + OUTPUT_FILE environment_script_output.txt + ) + file(STRINGS environment_script_output.txt output_lines) + foreach(line IN LISTS output_lines) + if (line MATCHES "^([a-zA-Z0-9_-]+)=(.*)$") + set(ENV{${CMAKE_MATCH_1}} "${CMAKE_MATCH_2}") + + # Set for other steps + message("::set-env name=${CMAKE_MATCH_1}::${CMAKE_MATCH_2}") + endif() + endforeach() + endif() + + file(TO_CMAKE_PATH "$ENV{GITHUB_WORKSPACE}/qtcreator" qtcreator_dir) + + execute_process( + COMMAND ${{ steps.qt.outputs.qt_dir }}/bin/qmake + $ENV{PLUGIN_PRO} + CONFIG+=release + QTC_SOURCE="${qtcreator_dir}" + QTC_BUILD="${qtcreator_dir}" + RESULT_VARIABLE result + ) + if (NOT result EQUAL 0) + message(FATAL_ERROR "Bad exit status") + endif() + + - name: Build + shell: cmake -P {0} + run: | + if ("${{ runner.os }}" STREQUAL "Windows") + set(ENV{PATH} "${{ steps.qt.outputs.qt_dir }}/bin/;$ENV{PATH}") + else() + set(ENV{PATH} "${{ steps.qt.outputs.qt_dir }}/bin/:$ENV{PATH}") + set(ENV{LD_LIBRARY_PATH} "qtcreator/lib/Qt/lib:$ENV{LD_LIBRARY_PATH}") + endif() + + include(ProcessorCount) + ProcessorCount(N) + + set(make_program make -j ${N}) + if ("${{ runner.os }}" STREQUAL "Windows") + set(make_program "qtcreator/bin/jom") + endif() + + execute_process( + COMMAND ${make_program} + RESULT_VARIABLE result + ) + if (NOT result EQUAL 0) + message(FATAL_ERROR "Bad exit status") + endif() + + file(TO_CMAKE_PATH "$ENV{GITHUB_WORKSPACE}/$ENV{PLUGIN_NAME}-$ENV{QT_CREATOR_VERSION}-${{ matrix.config.artifact }}" artifact) + + execute_process(COMMAND + ${CMAKE_COMMAND} -E tar cvf ${artifact} --format=zip "${{ steps.qt_creator.outputs.qtc_binary_name }}" + WORKING_DIRECTORY "${{ steps.qt_creator.outputs.qtc_output_directory }}" + ) + + - uses: actions/upload-artifact@v1 + id: upload_artifact + with: + path: ./${{ env.PLUGIN_NAME }}-${{ env.QT_CREATOR_VERSION }}-${{ matrix.config.artifact }} + name: ${{ env.PLUGIN_NAME}}-${{ env.QT_CREATOR_VERSION }}-${{ matrix.config.artifact }} + + release: + if: contains(github.ref, 'tags/v') + runs-on: ubuntu-latest + needs: build + + steps: + - name: Create Release + id: create_release + uses: actions/create-release@v1.0.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + + - name: Store Release url + run: | + echo "${{ steps.create_release.outputs.upload_url }}" > ./upload_url + + - uses: actions/upload-artifact@v1 + with: + path: ./upload_url + name: upload_url + + publish: + if: contains(github.ref, 'tags/v') + + name: ${{ matrix.config.name }} + runs-on: ${{ matrix.config.os }} + strategy: + matrix: + config: + - { + name: "Windows Latest x64", artifact: "Windows-x64.zip", + os: ubuntu-latest + } + - { + name: "Windows Latest x86", artifact: "Windows-x86.zip", + os: ubuntu-latest + } + - { + name: "Linux Latest x64", artifact: "Linux-x64.zip", + os: ubuntu-latest + } + - { + name: "macOS Latest x64", artifact: "macOS-x64.zip", + os: macos-latest + } + needs: release + + steps: + - name: Download artifact + uses: actions/download-artifact@v1 + with: + name: ${{ env.PLUGIN_NAME }}-${{ env.QT_CREATOR_VERSION }}-${{ matrix.config.artifact }} + path: ./ + + - name: Download URL + uses: actions/download-artifact@v1 + with: + name: upload_url + path: ./ + - id: set_upload_url + run: | + upload_url=`cat ./upload_url` + echo ::set-output name=upload_url::$upload_url + + - name: Upload to Release + id: upload_to_release + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.set_upload_url.outputs.upload_url }} + asset_path: ./${{ env.PLUGIN_NAME }}-${{ env.QT_CREATOR_VERSION }}-${{ matrix.config.artifact }} + asset_name: ${{ env.PLUGIN_NAME }}-${{ env.QT_CREATOR_VERSION }}-${{ matrix.config.artifact }} + asset_content_type: application/zip \ No newline at end of file From 3692203aaeb37cdbe2ade70512e628b806e7a8d9 Mon Sep 17 00:00:00 2001 From: Sopitive <> Date: Sat, 22 Jul 2023 13:25:51 -0700 Subject: [PATCH 05/37] Fix File Extension --- .github/worlflows/build.yml | 309 ++++++++++++++++++++++++++++++++++++ 1 file changed, 309 insertions(+) create mode 100644 .github/worlflows/build.yml diff --git a/.github/worlflows/build.yml b/.github/worlflows/build.yml new file mode 100644 index 00000000..09bad363 --- /dev/null +++ b/.github/worlflows/build.yml @@ -0,0 +1,309 @@ +name: QMake Build Matrix + +on: [push] + +env: + QT_VERSION: 5.15.2 + QT_CREATOR_VERSION: 4.11.0 + PLUGIN_PRO: doxygen.pro + PLUGIN_NAME: Doxygen + +jobs: + build: + name: ${{ matrix.config.name }} + runs-on: ${{ matrix.config.os }} + strategy: + matrix: + config: + - { + name: "Windows Latest x64", artifact: "Windows-x64.zip", + os: windows-latest, + environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat" + } + - { + name: "Windows Latest x86", artifact: "Windows-x86.zip", + os: windows-latest, + environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars32.bat" + } + - { + name: "Linux Latest x64", artifact: "Linux-x64.zip", + os: ubuntu-latest + } + - { + name: "macOS Latest x64", artifact: "macOS-x64.zip", + os: macos-latest + } + + steps: + - uses: actions/checkout@v1 + + - name: Installing system libs + shell: cmake -P {0} + run: | + if ("${{ runner.os }}" STREQUAL "Linux") + execute_process( + COMMAND sudo apt install libgl1-mesa-dev + ) + endif() + + - name: Download Qt + id: qt + shell: cmake -P {0} + run: | + set(qt_version $ENV{QT_VERSION}) + + string(REPLACE "." "" qt_version_dotless "${qt_version}") + if ("${{ runner.os }}" STREQUAL "Windows") + set(url_os "windows_x86") + if ("${{ matrix.config.environment_script }}" MATCHES "vcvars64.bat") + set(qt_package_name "qt.qt5.${qt_version_dotless}.win64_msvc2017_64") + set(qt_dir_prefix "${qt_version}/msvc2017_64") + elseif ("${{ matrix.config.environment_script }}" MATCHES "vcvars32.bat") + set(qt_package_name "qt.qt5.${qt_version_dotless}.win32_msvc2017") + set(qt_dir_prefix "${qt_version}/msvc2017") + else() + endif() + elseif ("${{ runner.os }}" STREQUAL "Linux") + set(url_os "linux_x64") + set(qt_package_name "qt.qt5.${qt_version_dotless}.gcc_64") + set(qt_dir_prefix "${qt_version}/gcc_64") + elseif ("${{ runner.os }}" STREQUAL "macOS") + set(url_os "mac_x64") + set(qt_package_name "qt.qt5.${qt_version_dotless}.clang_64") + set(qt_dir_prefix "${qt_version}/clang_64") + endif() + + set(qt_base_url "https://download.qt.io/online/qtsdkrepository/${url_os}/desktop/qt5_${qt_version_dotless}") + file(DOWNLOAD "${qt_base_url}/Updates.xml" ./Updates.xml SHOW_PROGRESS) + + file(READ ./Updates.xml updates_xml) + string(REGEX MATCH "${qt_package_name}.*([0-9+-.]+).*qtbase([a-zA-Z0-9_-]+).7z" + updates_xml_output "${updates_xml}") + set(package_version ${CMAKE_MATCH_1}) + set(package_suffix ${CMAKE_MATCH_2}) + string(REPLACE "-debug-symbols" "" package_suffix "${package_suffix}") + + # Workaround for CMake's greedy regex + if ("${{ matrix.config.environment_script }}" MATCHES "vcvars32.bat") + string(REPLACE "X86_64" "X86" package_suffix "${package_suffix}") + endif() + + file(MAKE_DIRECTORY qt5) + + # Save the path for other steps + file(TO_CMAKE_PATH "$ENV{GITHUB_WORKSPACE}/qt5/${qt_dir_prefix}" qt_dir) + message("::set-output name=qt_dir::${qt_dir}") + + foreach(package qtbase qtdeclarative qttools qtsvg) + file(DOWNLOAD + "${qt_base_url}/${qt_package_name}/${package_version}${package}${package_suffix}.7z" ./${package}.7z + SHOW_PROGRESS + ) + execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf ../${package}.7z WORKING_DIRECTORY qt5) + endforeach() + + file(READ "qt5/${qt_dir_prefix}/mkspecs/qconfig.pri" qtconfig) + string(REPLACE "Enterprise" "OpenSource" qtconfig "${qtconfig}") + string(REPLACE "licheck.exe" "" qtconfig "${qtconfig}") + string(REPLACE "licheck64" "" qtconfig "${qtconfig}") + string(REPLACE "licheck_mac" "" qtconfig "${qtconfig}") + file(WRITE "qt5/${qt_dir_prefix}/mkspecs/qconfig.pri" "${qtconfig}") + + - name: Download Qt Creator + id: qt_creator + shell: cmake -P {0} + run: | + string(REGEX MATCH "([0-9]+.[0-9]+).[0-9]+" outvar "$ENV{QT_CREATOR_VERSION}") + set(qtc_base_url "https://download.qt.io/official_releases/qtcreator/${CMAKE_MATCH_1}/$ENV{QT_CREATOR_VERSION}") + + if ("${{ runner.os }}" STREQUAL "Windows") + set(qtc_output_directory "qtcreator/lib/qtcreator/plugins") + set(qtc_binary_name "$ENV{PLUGIN_NAME}4.dll") + if ("${{ matrix.config.environment_script }}" MATCHES "vcvars64.bat") + set(qtc_platform "windows_msvc2017_x64") + elseif ("${{ matrix.config.environment_script }}" MATCHES "vcvars32.bat") + set(qtc_platform "windows_msvc2017_x86") + endif() + elseif ("${{ runner.os }}" STREQUAL "Linux") + set(qtc_output_directory "qtcreator/lib/qtcreator/plugins") + set(qtc_binary_name "lib$ENV{PLUGIN_NAME}.so") + set(qtc_platform "linux_gcc_64_rhel72") + elseif ("${{ runner.os }}" STREQUAL "macOS") + set(qtc_output_directory "qtcreator/bin/Qt Creator.app/Contents/PlugIns") + set(qtc_binary_name "lib$ENV{PLUGIN_NAME}.dylib") + set(qtc_platform "mac_x64") + endif() + + # Save the path for other steps + message("::set-output name=qtc_binary_name::${qtc_binary_name}") + message("::set-output name=qtc_output_directory::${qtc_output_directory}") + + file(MAKE_DIRECTORY qtcreator) + + foreach(package qtcreator qtcreator_dev) + file(DOWNLOAD + "${qtc_base_url}/installer_source/${qtc_platform}/${package}.7z" ./${package}.7z SHOW_PROGRESS) + execute_process(COMMAND + ${CMAKE_COMMAND} -E tar xvf ../${package}.7z WORKING_DIRECTORY qtcreator) + endforeach() + + if ("${{ runner.os }}" STREQUAL "macOS") + execute_process( + COMMAND ${CMAKE_COMMAND} -E make_directory qtcreator/bin + COMMAND ${CMAKE_COMMAND} -E create_symlink + "$ENV{GITHUB_WORKSPACE}/qtcreator/Qt Creator.app" + "$ENV{GITHUB_WORKSPACE}/qtcreator/bin/Qt Creator.app" + ) + endif() + + - name: Configure + shell: cmake -P {0} + run: | + if ("${{ runner.os }}" STREQUAL "Windows" AND NOT "x${{ matrix.config.environment_script }}" STREQUAL "x") + execute_process( + COMMAND "${{ matrix.config.environment_script }}" && set + OUTPUT_FILE environment_script_output.txt + ) + file(STRINGS environment_script_output.txt output_lines) + foreach(line IN LISTS output_lines) + if (line MATCHES "^([a-zA-Z0-9_-]+)=(.*)$") + set(ENV{${CMAKE_MATCH_1}} "${CMAKE_MATCH_2}") + + # Set for other steps + message("::set-env name=${CMAKE_MATCH_1}::${CMAKE_MATCH_2}") + endif() + endforeach() + endif() + + file(TO_CMAKE_PATH "$ENV{GITHUB_WORKSPACE}/qtcreator" qtcreator_dir) + + execute_process( + COMMAND ${{ steps.qt.outputs.qt_dir }}/bin/qmake + $ENV{PLUGIN_PRO} + CONFIG+=release + QTC_SOURCE="${qtcreator_dir}" + QTC_BUILD="${qtcreator_dir}" + RESULT_VARIABLE result + ) + if (NOT result EQUAL 0) + message(FATAL_ERROR "Bad exit status") + endif() + + - name: Build + shell: cmake -P {0} + run: | + if ("${{ runner.os }}" STREQUAL "Windows") + set(ENV{PATH} "${{ steps.qt.outputs.qt_dir }}/bin/;$ENV{PATH}") + else() + set(ENV{PATH} "${{ steps.qt.outputs.qt_dir }}/bin/:$ENV{PATH}") + set(ENV{LD_LIBRARY_PATH} "qtcreator/lib/Qt/lib:$ENV{LD_LIBRARY_PATH}") + endif() + + include(ProcessorCount) + ProcessorCount(N) + + set(make_program make -j ${N}) + if ("${{ runner.os }}" STREQUAL "Windows") + set(make_program "qtcreator/bin/jom") + endif() + + execute_process( + COMMAND ${make_program} + RESULT_VARIABLE result + ) + if (NOT result EQUAL 0) + message(FATAL_ERROR "Bad exit status") + endif() + + file(TO_CMAKE_PATH "$ENV{GITHUB_WORKSPACE}/$ENV{PLUGIN_NAME}-$ENV{QT_CREATOR_VERSION}-${{ matrix.config.artifact }}" artifact) + + execute_process(COMMAND + ${CMAKE_COMMAND} -E tar cvf ${artifact} --format=zip "${{ steps.qt_creator.outputs.qtc_binary_name }}" + WORKING_DIRECTORY "${{ steps.qt_creator.outputs.qtc_output_directory }}" + ) + + - uses: actions/upload-artifact@v1 + id: upload_artifact + with: + path: ./${{ env.PLUGIN_NAME }}-${{ env.QT_CREATOR_VERSION }}-${{ matrix.config.artifact }} + name: ${{ env.PLUGIN_NAME}}-${{ env.QT_CREATOR_VERSION }}-${{ matrix.config.artifact }} + + release: + if: contains(github.ref, 'tags/v') + runs-on: ubuntu-latest + needs: build + + steps: + - name: Create Release + id: create_release + uses: actions/create-release@v1.0.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + + - name: Store Release url + run: | + echo "${{ steps.create_release.outputs.upload_url }}" > ./upload_url + + - uses: actions/upload-artifact@v1 + with: + path: ./upload_url + name: upload_url + + publish: + if: contains(github.ref, 'tags/v') + + name: ${{ matrix.config.name }} + runs-on: ${{ matrix.config.os }} + strategy: + matrix: + config: + - { + name: "Windows Latest x64", artifact: "Windows-x64.zip", + os: ubuntu-latest + } + - { + name: "Windows Latest x86", artifact: "Windows-x86.zip", + os: ubuntu-latest + } + - { + name: "Linux Latest x64", artifact: "Linux-x64.zip", + os: ubuntu-latest + } + - { + name: "macOS Latest x64", artifact: "macOS-x64.zip", + os: macos-latest + } + needs: release + + steps: + - name: Download artifact + uses: actions/download-artifact@v1 + with: + name: ${{ env.PLUGIN_NAME }}-${{ env.QT_CREATOR_VERSION }}-${{ matrix.config.artifact }} + path: ./ + + - name: Download URL + uses: actions/download-artifact@v1 + with: + name: upload_url + path: ./ + - id: set_upload_url + run: | + upload_url=`cat ./upload_url` + echo ::set-output name=upload_url::$upload_url + + - name: Upload to Release + id: upload_to_release + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.set_upload_url.outputs.upload_url }} + asset_path: ./${{ env.PLUGIN_NAME }}-${{ env.QT_CREATOR_VERSION }}-${{ matrix.config.artifact }} + asset_name: ${{ env.PLUGIN_NAME }}-${{ env.QT_CREATOR_VERSION }}-${{ matrix.config.artifact }} + asset_content_type: application/zip \ No newline at end of file From 7ef0c58d5e1d4ad7ab5283b6e8c4e0dcf36fed5d Mon Sep 17 00:00:00 2001 From: Sopitive <30811278+Sopitive@users.noreply.github.com> Date: Sat, 22 Jul 2023 13:35:06 -0700 Subject: [PATCH 06/37] Create c-cpp.yml --- .github/workflows/c-cpp.yml | 309 ++++++++++++++++++++++++++++++++++++ 1 file changed, 309 insertions(+) create mode 100644 .github/workflows/c-cpp.yml diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml new file mode 100644 index 00000000..04486d00 --- /dev/null +++ b/.github/workflows/c-cpp.yml @@ -0,0 +1,309 @@ +name: QMake Build Matrix + +on: [push] + +env: + QT_VERSION: 5.15.2 + QT_CREATOR_VERSION: 4.11.0 + PLUGIN_PRO: doxygen.pro + PLUGIN_NAME: Doxygen + +jobs: + build: + name: ${{ matrix.config.name }} + runs-on: ${{ matrix.config.os }} + strategy: + matrix: + config: + - { + name: "Windows Latest x64", artifact: "Windows-x64.zip", + os: windows-latest, + environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat" + } + - { + name: "Windows Latest x86", artifact: "Windows-x86.zip", + os: windows-latest, + environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars32.bat" + } + - { + name: "Linux Latest x64", artifact: "Linux-x64.zip", + os: ubuntu-latest + } + - { + name: "macOS Latest x64", artifact: "macOS-x64.zip", + os: macos-latest + } + + steps: + - uses: actions/checkout@v1 + + - name: Installing system libs + shell: cmake -P {0} + run: | + if ("${{ runner.os }}" STREQUAL "Linux") + execute_process( + COMMAND sudo apt install libgl1-mesa-dev + ) + endif() + + - name: Download Qt + id: qt + shell: cmake -P {0} + run: | + set(qt_version $ENV{QT_VERSION}) + + string(REPLACE "." "" qt_version_dotless "${qt_version}") + if ("${{ runner.os }}" STREQUAL "Windows") + set(url_os "windows_x86") + if ("${{ matrix.config.environment_script }}" MATCHES "vcvars64.bat") + set(qt_package_name "qt.qt5.${qt_version_dotless}.win64_msvc2017_64") + set(qt_dir_prefix "${qt_version}/msvc2017_64") + elseif ("${{ matrix.config.environment_script }}" MATCHES "vcvars32.bat") + set(qt_package_name "qt.qt5.${qt_version_dotless}.win32_msvc2017") + set(qt_dir_prefix "${qt_version}/msvc2017") + else() + endif() + elseif ("${{ runner.os }}" STREQUAL "Linux") + set(url_os "linux_x64") + set(qt_package_name "qt.qt5.${qt_version_dotless}.gcc_64") + set(qt_dir_prefix "${qt_version}/gcc_64") + elseif ("${{ runner.os }}" STREQUAL "macOS") + set(url_os "mac_x64") + set(qt_package_name "qt.qt5.${qt_version_dotless}.clang_64") + set(qt_dir_prefix "${qt_version}/clang_64") + endif() + + set(qt_base_url "https://download.qt.io/online/qtsdkrepository/${url_os}/desktop/qt5_${qt_version_dotless}") + file(DOWNLOAD "${qt_base_url}/Updates.xml" ./Updates.xml SHOW_PROGRESS) + + file(READ ./Updates.xml updates_xml) + string(REGEX MATCH "${qt_package_name}.*([0-9+-.]+).*qtbase([a-zA-Z0-9_-]+).7z" + updates_xml_output "${updates_xml}") + set(package_version ${CMAKE_MATCH_1}) + set(package_suffix ${CMAKE_MATCH_2}) + string(REPLACE "-debug-symbols" "" package_suffix "${package_suffix}") + + # Workaround for CMake's greedy regex + if ("${{ matrix.config.environment_script }}" MATCHES "vcvars32.bat") + string(REPLACE "X86_64" "X86" package_suffix "${package_suffix}") + endif() + + file(MAKE_DIRECTORY qt5) + + # Save the path for other steps + file(TO_CMAKE_PATH "$ENV{GITHUB_WORKSPACE}/qt5/${qt_dir_prefix}" qt_dir) + message("::set-output name=qt_dir::${qt_dir}") + + foreach(package qtbase qtdeclarative qttools qtsvg) + file(DOWNLOAD + "${qt_base_url}/${qt_package_name}/${package_version}${package}${package_suffix}.7z" ./${package}.7z + SHOW_PROGRESS + ) + execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf ../${package}.7z WORKING_DIRECTORY qt5) + endforeach() + + file(READ "qt5/${qt_dir_prefix}/mkspecs/qconfig.pri" qtconfig) + string(REPLACE "Enterprise" "OpenSource" qtconfig "${qtconfig}") + string(REPLACE "licheck.exe" "" qtconfig "${qtconfig}") + string(REPLACE "licheck64" "" qtconfig "${qtconfig}") + string(REPLACE "licheck_mac" "" qtconfig "${qtconfig}") + file(WRITE "qt5/${qt_dir_prefix}/mkspecs/qconfig.pri" "${qtconfig}") + + - name: Download Qt Creator + id: qt_creator + shell: cmake -P {0} + run: | + string(REGEX MATCH "([0-9]+.[0-9]+).[0-9]+" outvar "$ENV{QT_CREATOR_VERSION}") + set(qtc_base_url "https://download.qt.io/official_releases/qtcreator/${CMAKE_MATCH_1}/$ENV{QT_CREATOR_VERSION}") + + if ("${{ runner.os }}" STREQUAL "Windows") + set(qtc_output_directory "qtcreator/lib/qtcreator/plugins") + set(qtc_binary_name "$ENV{PLUGIN_NAME}4.dll") + if ("${{ matrix.config.environment_script }}" MATCHES "vcvars64.bat") + set(qtc_platform "windows_msvc2017_x64") + elseif ("${{ matrix.config.environment_script }}" MATCHES "vcvars32.bat") + set(qtc_platform "windows_msvc2017_x86") + endif() + elseif ("${{ runner.os }}" STREQUAL "Linux") + set(qtc_output_directory "qtcreator/lib/qtcreator/plugins") + set(qtc_binary_name "lib$ENV{PLUGIN_NAME}.so") + set(qtc_platform "linux_gcc_64_rhel72") + elseif ("${{ runner.os }}" STREQUAL "macOS") + set(qtc_output_directory "qtcreator/bin/Qt Creator.app/Contents/PlugIns") + set(qtc_binary_name "lib$ENV{PLUGIN_NAME}.dylib") + set(qtc_platform "mac_x64") + endif() + + # Save the path for other steps + message("::set-output name=qtc_binary_name::${qtc_binary_name}") + message("::set-output name=qtc_output_directory::${qtc_output_directory}") + + file(MAKE_DIRECTORY qtcreator) + + foreach(package qtcreator qtcreator_dev) + file(DOWNLOAD + "${qtc_base_url}/installer_source/${qtc_platform}/${package}.7z" ./${package}.7z SHOW_PROGRESS) + execute_process(COMMAND + ${CMAKE_COMMAND} -E tar xvf ../${package}.7z WORKING_DIRECTORY qtcreator) + endforeach() + + if ("${{ runner.os }}" STREQUAL "macOS") + execute_process( + COMMAND ${CMAKE_COMMAND} -E make_directory qtcreator/bin + COMMAND ${CMAKE_COMMAND} -E create_symlink + "$ENV{GITHUB_WORKSPACE}/qtcreator/Qt Creator.app" + "$ENV{GITHUB_WORKSPACE}/qtcreator/bin/Qt Creator.app" + ) + endif() + + - name: Configure + shell: cmake -P {0} + run: | + if ("${{ runner.os }}" STREQUAL "Windows" AND NOT "x${{ matrix.config.environment_script }}" STREQUAL "x") + execute_process( + COMMAND "${{ matrix.config.environment_script }}" && set + OUTPUT_FILE environment_script_output.txt + ) + file(STRINGS environment_script_output.txt output_lines) + foreach(line IN LISTS output_lines) + if (line MATCHES "^([a-zA-Z0-9_-]+)=(.*)$") + set(ENV{${CMAKE_MATCH_1}} "${CMAKE_MATCH_2}") + + # Set for other steps + message("::set-env name=${CMAKE_MATCH_1}::${CMAKE_MATCH_2}") + endif() + endforeach() + endif() + + file(TO_CMAKE_PATH "$ENV{GITHUB_WORKSPACE}/qtcreator" qtcreator_dir) + + execute_process( + COMMAND ${{ steps.qt.outputs.qt_dir }}/bin/qmake + $ENV{PLUGIN_PRO} + CONFIG+=release + QTC_SOURCE="${qtcreator_dir}" + QTC_BUILD="${qtcreator_dir}" + RESULT_VARIABLE result + ) + if (NOT result EQUAL 0) + message(FATAL_ERROR "Bad exit status") + endif() + + - name: Build + shell: cmake -P {0} + run: | + if ("${{ runner.os }}" STREQUAL "Windows") + set(ENV{PATH} "${{ steps.qt.outputs.qt_dir }}/bin/;$ENV{PATH}") + else() + set(ENV{PATH} "${{ steps.qt.outputs.qt_dir }}/bin/:$ENV{PATH}") + set(ENV{LD_LIBRARY_PATH} "qtcreator/lib/Qt/lib:$ENV{LD_LIBRARY_PATH}") + endif() + + include(ProcessorCount) + ProcessorCount(N) + + set(make_program make -j ${N}) + if ("${{ runner.os }}" STREQUAL "Windows") + set(make_program "qtcreator/bin/jom") + endif() + + execute_process( + COMMAND ${make_program} + RESULT_VARIABLE result + ) + if (NOT result EQUAL 0) + message(FATAL_ERROR "Bad exit status") + endif() + + file(TO_CMAKE_PATH "$ENV{GITHUB_WORKSPACE}/$ENV{PLUGIN_NAME}-$ENV{QT_CREATOR_VERSION}-${{ matrix.config.artifact }}" artifact) + + execute_process(COMMAND + ${CMAKE_COMMAND} -E tar cvf ${artifact} --format=zip "${{ steps.qt_creator.outputs.qtc_binary_name }}" + WORKING_DIRECTORY "${{ steps.qt_creator.outputs.qtc_output_directory }}" + ) + + - uses: actions/upload-artifact@v1 + id: upload_artifact + with: + path: ./${{ env.PLUGIN_NAME }}-${{ env.QT_CREATOR_VERSION }}-${{ matrix.config.artifact }} + name: ${{ env.PLUGIN_NAME}}-${{ env.QT_CREATOR_VERSION }}-${{ matrix.config.artifact }} + + release: + if: contains(github.ref, 'tags/v') + runs-on: ubuntu-latest + needs: build + + steps: + - name: Create Release + id: create_release + uses: actions/create-release@v1.0.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + + - name: Store Release url + run: | + echo "${{ steps.create_release.outputs.upload_url }}" > ./upload_url + + - uses: actions/upload-artifact@v1 + with: + path: ./upload_url + name: upload_url + + publish: + if: contains(github.ref, 'tags/v') + + name: ${{ matrix.config.name }} + runs-on: ${{ matrix.config.os }} + strategy: + matrix: + config: + - { + name: "Windows Latest x64", artifact: "Windows-x64.zip", + os: ubuntu-latest + } + - { + name: "Windows Latest x86", artifact: "Windows-x86.zip", + os: ubuntu-latest + } + - { + name: "Linux Latest x64", artifact: "Linux-x64.zip", + os: ubuntu-latest + } + - { + name: "macOS Latest x64", artifact: "macOS-x64.zip", + os: macos-latest + } + needs: release + + steps: + - name: Download artifact + uses: actions/download-artifact@v1 + with: + name: ${{ env.PLUGIN_NAME }}-${{ env.QT_CREATOR_VERSION }}-${{ matrix.config.artifact }} + path: ./ + + - name: Download URL + uses: actions/download-artifact@v1 + with: + name: upload_url + path: ./ + - id: set_upload_url + run: | + upload_url=`cat ./upload_url` + echo ::set-output name=upload_url::$upload_url + + - name: Upload to Release + id: upload_to_release + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.set_upload_url.outputs.upload_url }} + asset_path: ./${{ env.PLUGIN_NAME }}-${{ env.QT_CREATOR_VERSION }}-${{ matrix.config.artifact }} + asset_name: ${{ env.PLUGIN_NAME }}-${{ env.QT_CREATOR_VERSION }}-${{ matrix.config.artifact }} + asset_content_type: application/zip From f4ac2dab6942d0b063bdb262e3e1313f2596a3f5 Mon Sep 17 00:00:00 2001 From: Sopitive <30811278+Sopitive@users.noreply.github.com> Date: Sat, 22 Jul 2023 14:03:40 -0700 Subject: [PATCH 07/37] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 04486d00..9e9f64ea 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -56,11 +56,11 @@ jobs: if ("${{ runner.os }}" STREQUAL "Windows") set(url_os "windows_x86") if ("${{ matrix.config.environment_script }}" MATCHES "vcvars64.bat") - set(qt_package_name "qt.qt5.${qt_version_dotless}.win64_msvc2017_64") - set(qt_dir_prefix "${qt_version}/msvc2017_64") + set(qt_package_name "qt.qt5.${qt_version_dotless}.win64_msvc2019_64") + set(qt_dir_prefix "${qt_version}/msvc2019_64") elseif ("${{ matrix.config.environment_script }}" MATCHES "vcvars32.bat") - set(qt_package_name "qt.qt5.${qt_version_dotless}.win32_msvc2017") - set(qt_dir_prefix "${qt_version}/msvc2017") + set(qt_package_name "qt.qt5.${qt_version_dotless}.win32_msvc2019") + set(qt_dir_prefix "${qt_version}/msvc2019") else() endif() elseif ("${{ runner.os }}" STREQUAL "Linux") @@ -120,9 +120,9 @@ jobs: set(qtc_output_directory "qtcreator/lib/qtcreator/plugins") set(qtc_binary_name "$ENV{PLUGIN_NAME}4.dll") if ("${{ matrix.config.environment_script }}" MATCHES "vcvars64.bat") - set(qtc_platform "windows_msvc2017_x64") + set(qtc_platform "windows_msvc2019_x64") elseif ("${{ matrix.config.environment_script }}" MATCHES "vcvars32.bat") - set(qtc_platform "windows_msvc2017_x86") + set(qtc_platform "windows_msvc2019_x86") endif() elseif ("${{ runner.os }}" STREQUAL "Linux") set(qtc_output_directory "qtcreator/lib/qtcreator/plugins") From 24649432dfdccf196973f1c454788883cc11d5b0 Mon Sep 17 00:00:00 2001 From: Sopitive <30811278+Sopitive@users.noreply.github.com> Date: Sat, 22 Jul 2023 14:11:04 -0700 Subject: [PATCH 08/37] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 9e9f64ea..5758e31e 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -10,11 +10,9 @@ env: jobs: build: - name: ${{ matrix.config.name }} - runs-on: ${{ matrix.config.os }} - strategy: - matrix: - config: + name: ${{ matrix.config.name }} + runs-on: ${{ matrix.config.os }} + config: - { name: "Windows Latest x64", artifact: "Windows-x64.zip", os: windows-latest, From 2cb0bdf5015c8322923e2642f29aafb613ad46e6 Mon Sep 17 00:00:00 2001 From: Sopitive <30811278+Sopitive@users.noreply.github.com> Date: Sat, 22 Jul 2023 14:11:56 -0700 Subject: [PATCH 09/37] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 5758e31e..f39fe02f 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -10,9 +10,9 @@ env: jobs: build: - name: ${{ matrix.config.name }} - runs-on: ${{ matrix.config.os }} - config: + name: ${{ matrix.config.name }} + runs-on: ${{ matrix.config.os }} + config: - { name: "Windows Latest x64", artifact: "Windows-x64.zip", os: windows-latest, From 7125034234b0e270e7a3f17d6dfc4677b806e595 Mon Sep 17 00:00:00 2001 From: Sopitive <30811278+Sopitive@users.noreply.github.com> Date: Sat, 22 Jul 2023 14:12:35 -0700 Subject: [PATCH 10/37] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index f39fe02f..ca9717d7 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -13,24 +13,24 @@ jobs: name: ${{ matrix.config.name }} runs-on: ${{ matrix.config.os }} config: - - { - name: "Windows Latest x64", artifact: "Windows-x64.zip", - os: windows-latest, - environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat" - } - - { - name: "Windows Latest x86", artifact: "Windows-x86.zip", - os: windows-latest, - environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars32.bat" - } - - { - name: "Linux Latest x64", artifact: "Linux-x64.zip", - os: ubuntu-latest - } - - { - name: "macOS Latest x64", artifact: "macOS-x64.zip", - os: macos-latest - } + - { + name: "Windows Latest x64", artifact: "Windows-x64.zip", + os: windows-latest, + environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat" + } + - { + name: "Windows Latest x86", artifact: "Windows-x86.zip", + os: windows-latest, + environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars32.bat" + } + - { + name: "Linux Latest x64", artifact: "Linux-x64.zip", + os: ubuntu-latest + } + - { + name: "macOS Latest x64", artifact: "macOS-x64.zip", + os: macos-latest + } steps: - uses: actions/checkout@v1 From e1b52f59a4bb4da296bd5b6e58de20fb4ad5f06e Mon Sep 17 00:00:00 2001 From: Sopitive <30811278+Sopitive@users.noreply.github.com> Date: Sat, 22 Jul 2023 14:15:57 -0700 Subject: [PATCH 11/37] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 382 ++++++++---------------------------- 1 file changed, 82 insertions(+), 300 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index ca9717d7..d1359a40 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -1,307 +1,89 @@ -name: QMake Build Matrix - -on: [push] +name: Windows Release + +on: + push: + branches: + - 'master' + - 'dev' + tags: + - 'v*' + pull_request: + branches: + - 'master' + - 'continuous-integration' + +defaults: + run: + shell: cmd env: - QT_VERSION: 5.15.2 - QT_CREATOR_VERSION: 4.11.0 - PLUGIN_PRO: doxygen.pro - PLUGIN_NAME: Doxygen + SOURCE_DIR: ${{ github.workspace }} + QT_VERSION: 5.15.2 + ARTIFACT: qt-planets-build.zip jobs: build: - name: ${{ matrix.config.name }} - runs-on: ${{ matrix.config.os }} - config: - - { - name: "Windows Latest x64", artifact: "Windows-x64.zip", - os: windows-latest, - environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat" - } - - { - name: "Windows Latest x86", artifact: "Windows-x86.zip", - os: windows-latest, - environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars32.bat" - } - - { - name: "Linux Latest x64", artifact: "Linux-x64.zip", - os: ubuntu-latest - } - - { - name: "macOS Latest x64", artifact: "macOS-x64.zip", - os: macos-latest - } + runs-on: windows-2019 steps: - - uses: actions/checkout@v1 - - - name: Installing system libs - shell: cmake -P {0} - run: | - if ("${{ runner.os }}" STREQUAL "Linux") - execute_process( - COMMAND sudo apt install libgl1-mesa-dev - ) - endif() - - - name: Download Qt - id: qt - shell: cmake -P {0} - run: | - set(qt_version $ENV{QT_VERSION}) - - string(REPLACE "." "" qt_version_dotless "${qt_version}") - if ("${{ runner.os }}" STREQUAL "Windows") - set(url_os "windows_x86") - if ("${{ matrix.config.environment_script }}" MATCHES "vcvars64.bat") - set(qt_package_name "qt.qt5.${qt_version_dotless}.win64_msvc2019_64") - set(qt_dir_prefix "${qt_version}/msvc2019_64") - elseif ("${{ matrix.config.environment_script }}" MATCHES "vcvars32.bat") - set(qt_package_name "qt.qt5.${qt_version_dotless}.win32_msvc2019") - set(qt_dir_prefix "${qt_version}/msvc2019") - else() - endif() - elseif ("${{ runner.os }}" STREQUAL "Linux") - set(url_os "linux_x64") - set(qt_package_name "qt.qt5.${qt_version_dotless}.gcc_64") - set(qt_dir_prefix "${qt_version}/gcc_64") - elseif ("${{ runner.os }}" STREQUAL "macOS") - set(url_os "mac_x64") - set(qt_package_name "qt.qt5.${qt_version_dotless}.clang_64") - set(qt_dir_prefix "${qt_version}/clang_64") - endif() - - set(qt_base_url "https://download.qt.io/online/qtsdkrepository/${url_os}/desktop/qt5_${qt_version_dotless}") - file(DOWNLOAD "${qt_base_url}/Updates.xml" ./Updates.xml SHOW_PROGRESS) - - file(READ ./Updates.xml updates_xml) - string(REGEX MATCH "${qt_package_name}.*([0-9+-.]+).*qtbase([a-zA-Z0-9_-]+).7z" - updates_xml_output "${updates_xml}") - set(package_version ${CMAKE_MATCH_1}) - set(package_suffix ${CMAKE_MATCH_2}) - string(REPLACE "-debug-symbols" "" package_suffix "${package_suffix}") - - # Workaround for CMake's greedy regex - if ("${{ matrix.config.environment_script }}" MATCHES "vcvars32.bat") - string(REPLACE "X86_64" "X86" package_suffix "${package_suffix}") - endif() - - file(MAKE_DIRECTORY qt5) - - # Save the path for other steps - file(TO_CMAKE_PATH "$ENV{GITHUB_WORKSPACE}/qt5/${qt_dir_prefix}" qt_dir) - message("::set-output name=qt_dir::${qt_dir}") - - foreach(package qtbase qtdeclarative qttools qtsvg) - file(DOWNLOAD - "${qt_base_url}/${qt_package_name}/${package_version}${package}${package_suffix}.7z" ./${package}.7z - SHOW_PROGRESS - ) - execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf ../${package}.7z WORKING_DIRECTORY qt5) - endforeach() - - file(READ "qt5/${qt_dir_prefix}/mkspecs/qconfig.pri" qtconfig) - string(REPLACE "Enterprise" "OpenSource" qtconfig "${qtconfig}") - string(REPLACE "licheck.exe" "" qtconfig "${qtconfig}") - string(REPLACE "licheck64" "" qtconfig "${qtconfig}") - string(REPLACE "licheck_mac" "" qtconfig "${qtconfig}") - file(WRITE "qt5/${qt_dir_prefix}/mkspecs/qconfig.pri" "${qtconfig}") - - - name: Download Qt Creator - id: qt_creator - shell: cmake -P {0} - run: | - string(REGEX MATCH "([0-9]+.[0-9]+).[0-9]+" outvar "$ENV{QT_CREATOR_VERSION}") - set(qtc_base_url "https://download.qt.io/official_releases/qtcreator/${CMAKE_MATCH_1}/$ENV{QT_CREATOR_VERSION}") - - if ("${{ runner.os }}" STREQUAL "Windows") - set(qtc_output_directory "qtcreator/lib/qtcreator/plugins") - set(qtc_binary_name "$ENV{PLUGIN_NAME}4.dll") - if ("${{ matrix.config.environment_script }}" MATCHES "vcvars64.bat") - set(qtc_platform "windows_msvc2019_x64") - elseif ("${{ matrix.config.environment_script }}" MATCHES "vcvars32.bat") - set(qtc_platform "windows_msvc2019_x86") - endif() - elseif ("${{ runner.os }}" STREQUAL "Linux") - set(qtc_output_directory "qtcreator/lib/qtcreator/plugins") - set(qtc_binary_name "lib$ENV{PLUGIN_NAME}.so") - set(qtc_platform "linux_gcc_64_rhel72") - elseif ("${{ runner.os }}" STREQUAL "macOS") - set(qtc_output_directory "qtcreator/bin/Qt Creator.app/Contents/PlugIns") - set(qtc_binary_name "lib$ENV{PLUGIN_NAME}.dylib") - set(qtc_platform "mac_x64") - endif() - - # Save the path for other steps - message("::set-output name=qtc_binary_name::${qtc_binary_name}") - message("::set-output name=qtc_output_directory::${qtc_output_directory}") - - file(MAKE_DIRECTORY qtcreator) - - foreach(package qtcreator qtcreator_dev) - file(DOWNLOAD - "${qtc_base_url}/installer_source/${qtc_platform}/${package}.7z" ./${package}.7z SHOW_PROGRESS) - execute_process(COMMAND - ${CMAKE_COMMAND} -E tar xvf ../${package}.7z WORKING_DIRECTORY qtcreator) - endforeach() - - if ("${{ runner.os }}" STREQUAL "macOS") - execute_process( - COMMAND ${CMAKE_COMMAND} -E make_directory qtcreator/bin - COMMAND ${CMAKE_COMMAND} -E create_symlink - "$ENV{GITHUB_WORKSPACE}/qtcreator/Qt Creator.app" - "$ENV{GITHUB_WORKSPACE}/qtcreator/bin/Qt Creator.app" - ) - endif() - - - name: Configure - shell: cmake -P {0} - run: | - if ("${{ runner.os }}" STREQUAL "Windows" AND NOT "x${{ matrix.config.environment_script }}" STREQUAL "x") - execute_process( - COMMAND "${{ matrix.config.environment_script }}" && set - OUTPUT_FILE environment_script_output.txt - ) - file(STRINGS environment_script_output.txt output_lines) - foreach(line IN LISTS output_lines) - if (line MATCHES "^([a-zA-Z0-9_-]+)=(.*)$") - set(ENV{${CMAKE_MATCH_1}} "${CMAKE_MATCH_2}") - - # Set for other steps - message("::set-env name=${CMAKE_MATCH_1}::${CMAKE_MATCH_2}") - endif() - endforeach() - endif() - - file(TO_CMAKE_PATH "$ENV{GITHUB_WORKSPACE}/qtcreator" qtcreator_dir) - - execute_process( - COMMAND ${{ steps.qt.outputs.qt_dir }}/bin/qmake - $ENV{PLUGIN_PRO} - CONFIG+=release - QTC_SOURCE="${qtcreator_dir}" - QTC_BUILD="${qtcreator_dir}" - RESULT_VARIABLE result - ) - if (NOT result EQUAL 0) - message(FATAL_ERROR "Bad exit status") - endif() - - - name: Build - shell: cmake -P {0} - run: | - if ("${{ runner.os }}" STREQUAL "Windows") - set(ENV{PATH} "${{ steps.qt.outputs.qt_dir }}/bin/;$ENV{PATH}") - else() - set(ENV{PATH} "${{ steps.qt.outputs.qt_dir }}/bin/:$ENV{PATH}") - set(ENV{LD_LIBRARY_PATH} "qtcreator/lib/Qt/lib:$ENV{LD_LIBRARY_PATH}") - endif() - - include(ProcessorCount) - ProcessorCount(N) - - set(make_program make -j ${N}) - if ("${{ runner.os }}" STREQUAL "Windows") - set(make_program "qtcreator/bin/jom") - endif() - - execute_process( - COMMAND ${make_program} - RESULT_VARIABLE result - ) - if (NOT result EQUAL 0) - message(FATAL_ERROR "Bad exit status") - endif() - - file(TO_CMAKE_PATH "$ENV{GITHUB_WORKSPACE}/$ENV{PLUGIN_NAME}-$ENV{QT_CREATOR_VERSION}-${{ matrix.config.artifact }}" artifact) - - execute_process(COMMAND - ${CMAKE_COMMAND} -E tar cvf ${artifact} --format=zip "${{ steps.qt_creator.outputs.qtc_binary_name }}" - WORKING_DIRECTORY "${{ steps.qt_creator.outputs.qtc_output_directory }}" - ) - - - uses: actions/upload-artifact@v1 - id: upload_artifact - with: - path: ./${{ env.PLUGIN_NAME }}-${{ env.QT_CREATOR_VERSION }}-${{ matrix.config.artifact }} - name: ${{ env.PLUGIN_NAME}}-${{ env.QT_CREATOR_VERSION }}-${{ matrix.config.artifact }} - - release: - if: contains(github.ref, 'tags/v') - runs-on: ubuntu-latest - needs: build - - steps: - - name: Create Release - id: create_release - uses: actions/create-release@v1.0.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - draft: false - prerelease: false - - - name: Store Release url - run: | - echo "${{ steps.create_release.outputs.upload_url }}" > ./upload_url - - - uses: actions/upload-artifact@v1 - with: - path: ./upload_url - name: upload_url - - publish: - if: contains(github.ref, 'tags/v') - - name: ${{ matrix.config.name }} - runs-on: ${{ matrix.config.os }} - strategy: - matrix: - config: - - { - name: "Windows Latest x64", artifact: "Windows-x64.zip", - os: ubuntu-latest - } - - { - name: "Windows Latest x86", artifact: "Windows-x86.zip", - os: ubuntu-latest - } - - { - name: "Linux Latest x64", artifact: "Linux-x64.zip", - os: ubuntu-latest - } - - { - name: "macOS Latest x64", artifact: "macOS-x64.zip", - os: macos-latest - } - needs: release - - steps: - - name: Download artifact - uses: actions/download-artifact@v1 - with: - name: ${{ env.PLUGIN_NAME }}-${{ env.QT_CREATOR_VERSION }}-${{ matrix.config.artifact }} - path: ./ - - - name: Download URL - uses: actions/download-artifact@v1 - with: - name: upload_url - path: ./ - - id: set_upload_url - run: | - upload_url=`cat ./upload_url` - echo ::set-output name=upload_url::$upload_url - - - name: Upload to Release - id: upload_to_release - uses: actions/upload-release-asset@v1.0.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.set_upload_url.outputs.upload_url }} - asset_path: ./${{ env.PLUGIN_NAME }}-${{ env.QT_CREATOR_VERSION }}-${{ matrix.config.artifact }} - asset_name: ${{ env.PLUGIN_NAME }}-${{ env.QT_CREATOR_VERSION }}-${{ matrix.config.artifact }} - asset_content_type: application/zip + - name: (1) Checkout repo + uses: actions/checkout@v2 + with: + submodules: recursive + + - name: (2) Get all tags for correct version determination + working-directory: ${{ github.workspace }} + run: | + git fetch --all --tags -f + - name: (3) Install Qt + uses: jurplel/install-qt-action@v2 + with: + version: ${{ env.QT_VERSION }} + host: windows + target: desktop + arch: win64_msvc2019_64 + dir: ${{ runner.temp }} + modules: qtcharts qt3d + setup-python: false + + - name: (4) Download JOM + uses: suisei-cn/actions-download-file@v1 + with: + url: http://download.qt.io/official_releases/jom/jom.zip + target: ${{ runner.temp }}\ + + - name: (5) Unzip JOM + working-directory: ${{ runner.temp }} + run: | + 7z x jom.zip -ojom + + - name: (6) Create build directory + run: mkdir ${{ runner.temp }}\build + + - name: (7) Set up Visual Studio shell + uses: egor-tensin/vs-shell@v2 + with: + arch: x64 + + - name: (8) Build + working-directory: ${{ runner.temp }}\build + run: | + qmake -r ${{ env.SOURCE_DIR }}\planets-qml.pro + ${{ runner.temp }}\jom\jom -j2 + cd release + windeployqt --qmldir ${{ env.SOURCE_DIR }} planets-qml.exe --pdb --release --compiler-runtime + copy C:\Windows\System32\concrt140.dll . + copy C:\Windows\System32\vccorlib140.dll . + copy C:\Windows\System32\msvcp140.dll . + copy C:\Windows\System32\vcruntime140.dll . + + - name: (9) Zip build + working-directory: ${{ runner.temp }} + run: | + 7z a qt-planets-build.zip ${{ runner.temp }}\build\* -r + + - name: (10) Save build artifact + uses: actions/upload-artifact@master + with: + name: ${{ env.ARTIFACT }} + path: ${{ runner.temp }}\${{ env.ARTIFACT }} From add2067bca2362348a28f3a5cd5965ca464852fe Mon Sep 17 00:00:00 2001 From: Sopitive <30811278+Sopitive@users.noreply.github.com> Date: Sat, 22 Jul 2023 14:22:13 -0700 Subject: [PATCH 12/37] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index d1359a40..cbce3227 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -17,9 +17,9 @@ defaults: shell: cmd env: - SOURCE_DIR: ${{ github.workspace }} + SOURCE_DIR: ${{ github.workspace }}/native/src QT_VERSION: 5.15.2 - ARTIFACT: qt-planets-build.zip + ARTIFACT: ReachVariantEditor.zip jobs: build: From 9f694bc8afad39a88e52d94b0be2706b9e224604 Mon Sep 17 00:00:00 2001 From: Sopitive <30811278+Sopitive@users.noreply.github.com> Date: Sat, 22 Jul 2023 14:27:56 -0700 Subject: [PATCH 13/37] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index cbce3227..88dbc1f0 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -44,7 +44,7 @@ jobs: arch: win64_msvc2019_64 dir: ${{ runner.temp }} modules: qtcharts qt3d - setup-python: false + setup-python: true - name: (4) Download JOM uses: suisei-cn/actions-download-file@v1 From edcedf632943bfa58dccf336c7f56d785dfd1aa1 Mon Sep 17 00:00:00 2001 From: Sopitive <30811278+Sopitive@users.noreply.github.com> Date: Sat, 22 Jul 2023 14:32:59 -0700 Subject: [PATCH 14/37] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 88dbc1f0..6256300d 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -80,7 +80,7 @@ jobs: - name: (9) Zip build working-directory: ${{ runner.temp }} run: | - 7z a qt-planets-build.zip ${{ runner.temp }}\build\* -r + 7z a ReachVariantEditor.zip ${{ runner.temp }}\build\* -r - name: (10) Save build artifact uses: actions/upload-artifact@master From 353cf00998145becaa2e32a7895f6b09909dee96 Mon Sep 17 00:00:00 2001 From: Sopitive <30811278+Sopitive@users.noreply.github.com> Date: Sat, 22 Jul 2023 14:40:34 -0700 Subject: [PATCH 15/37] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 6256300d..153ac6a6 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -17,7 +17,7 @@ defaults: shell: cmd env: - SOURCE_DIR: ${{ github.workspace }}/native/src + SOURCE_DIR: ${{ github.workspace }}/native/src/ReachVariantTool QT_VERSION: 5.15.2 ARTIFACT: ReachVariantEditor.zip From 57736041c06f146a15e602a5865686cb2a62abb8 Mon Sep 17 00:00:00 2001 From: Sopitive <30811278+Sopitive@users.noreply.github.com> Date: Sat, 22 Jul 2023 14:48:52 -0700 Subject: [PATCH 16/37] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 153ac6a6..aa9dc1e0 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -17,7 +17,7 @@ defaults: shell: cmd env: - SOURCE_DIR: ${{ github.workspace }}/native/src/ReachVariantTool + SOURCE_DIR: ${{ github.workspace }/native/src/ReachVariantTool} QT_VERSION: 5.15.2 ARTIFACT: ReachVariantEditor.zip @@ -80,7 +80,7 @@ jobs: - name: (9) Zip build working-directory: ${{ runner.temp }} run: | - 7z a ReachVariantEditor.zip ${{ runner.temp }}\build\* -r + 7z a ReachVariantEditor ${{ runner.temp }}\build\* -r - name: (10) Save build artifact uses: actions/upload-artifact@master From 7463829302675ace72280fbd9bef1cf0f78bf1f7 Mon Sep 17 00:00:00 2001 From: Sopitive <30811278+Sopitive@users.noreply.github.com> Date: Sat, 22 Jul 2023 14:50:03 -0700 Subject: [PATCH 17/37] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index aa9dc1e0..6da36e8e 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -17,7 +17,7 @@ defaults: shell: cmd env: - SOURCE_DIR: ${{ github.workspace }/native/src/ReachVariantTool} + SOURCE_DIR: ${{ github.workspace }}/native/src/ReachVariantTool QT_VERSION: 5.15.2 ARTIFACT: ReachVariantEditor.zip From 678e25155c40c74d7eee9abf460a3e1260c65c92 Mon Sep 17 00:00:00 2001 From: Sopitive <30811278+Sopitive@users.noreply.github.com> Date: Mon, 24 Jul 2023 10:51:16 -0700 Subject: [PATCH 18/37] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 6da36e8e..6b1ca13a 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -10,14 +10,14 @@ on: pull_request: branches: - 'master' - - 'continuous-integration' + - 'dev' defaults: run: shell: cmd env: - SOURCE_DIR: ${{ github.workspace }}/native/src/ReachVariantTool + SOURCE_DIR: ${{ github.workspace }}/native/src QT_VERSION: 5.15.2 ARTIFACT: ReachVariantEditor.zip @@ -32,7 +32,7 @@ jobs: submodules: recursive - name: (2) Get all tags for correct version determination - working-directory: ${{ github.workspace }} + working-directory: ${{ github.workspace }}/native/src run: | git fetch --all --tags -f - name: (3) Install Qt From 019e97303679bd212f2635766b6c9fd8b48e8083 Mon Sep 17 00:00:00 2001 From: Sopitive <30811278+Sopitive@users.noreply.github.com> Date: Mon, 24 Jul 2023 11:30:51 -0700 Subject: [PATCH 19/37] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 125 ++++++++++++++---------------------- 1 file changed, 47 insertions(+), 78 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 6b1ca13a..70250610 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -1,89 +1,58 @@ -name: Windows Release +name: CMake on: push: - branches: - - 'master' - - 'dev' - tags: - - 'v*' + branches: [ "main" ] pull_request: - branches: - - 'master' - - 'dev' - -defaults: - run: - shell: cmd + branches: [ "main" ] env: - SOURCE_DIR: ${{ github.workspace }}/native/src - QT_VERSION: 5.15.2 - ARTIFACT: ReachVariantEditor.zip + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + BUILD_TYPE: Release jobs: build: - runs-on: windows-2019 + # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. + # You can convert this to a matrix build if you need cross-platform coverage. + # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix + runs-on: windows-latest steps: - - name: (1) Checkout repo - uses: actions/checkout@v2 - with: - submodules: recursive - - - name: (2) Get all tags for correct version determination - working-directory: ${{ github.workspace }}/native/src - run: | - git fetch --all --tags -f - - name: (3) Install Qt - uses: jurplel/install-qt-action@v2 - with: - version: ${{ env.QT_VERSION }} - host: windows - target: desktop - arch: win64_msvc2019_64 - dir: ${{ runner.temp }} - modules: qtcharts qt3d - setup-python: true - - - name: (4) Download JOM - uses: suisei-cn/actions-download-file@v1 - with: - url: http://download.qt.io/official_releases/jom/jom.zip - target: ${{ runner.temp }}\ - - - name: (5) Unzip JOM - working-directory: ${{ runner.temp }} - run: | - 7z x jom.zip -ojom - - - name: (6) Create build directory - run: mkdir ${{ runner.temp }}\build - - - name: (7) Set up Visual Studio shell - uses: egor-tensin/vs-shell@v2 - with: - arch: x64 - - - name: (8) Build - working-directory: ${{ runner.temp }}\build - run: | - qmake -r ${{ env.SOURCE_DIR }}\planets-qml.pro - ${{ runner.temp }}\jom\jom -j2 - cd release - windeployqt --qmldir ${{ env.SOURCE_DIR }} planets-qml.exe --pdb --release --compiler-runtime - copy C:\Windows\System32\concrt140.dll . - copy C:\Windows\System32\vccorlib140.dll . - copy C:\Windows\System32\msvcp140.dll . - copy C:\Windows\System32\vcruntime140.dll . - - - name: (9) Zip build - working-directory: ${{ runner.temp }} - run: | - 7z a ReachVariantEditor ${{ runner.temp }}\build\* -r - - - name: (10) Save build artifact - uses: actions/upload-artifact@master - with: - name: ${{ env.ARTIFACT }} - path: ${{ runner.temp }}\${{ env.ARTIFACT }} + - uses: actions/checkout@v3 + + - name: Install Qt + # Installs the Qt SDK + uses: jurplel/install-qt-action@v2 + with: + version: '5.15.2' + host: 'windows' + target: 'desktop' + arch: 'win64_msvc2019_64' + + - name: Configure CMake + # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. + # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type + run: cmake -B ${{github.workspace}}/native/src/ReachVariantTool/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + + - name: Build + # Build your program with the given configuration + run: cmake --build ${{github.workspace}}/native/src/ReachVariantTool/build --config ${{env.BUILD_TYPE}} + + - name: Test + working-directory: ${{github.workspace}}/build + # Execute tests defined by the CMake configuration. + # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail + run: ctest -C ${{env.BUILD_TYPE}} + + - name: Zip build + working-directory: ${{github.workspace}}/native/src/ReachVariantTool + run: | + 7z a ReachVariantTool.zip ${{ runner.temp }}\build\* -r + + - name: Save build artifact + uses: actions/upload-artifact@master + with: + name: ReachVariantTool.zip + path: ${{github.workspace}}/native/src/ReachVariantTool/ReachVariantTool.zip + + From 9ba62a69b4b62823a8d085add04f4c92562cee5b Mon Sep 17 00:00:00 2001 From: Sopitive <30811278+Sopitive@users.noreply.github.com> Date: Mon, 24 Jul 2023 11:31:43 -0700 Subject: [PATCH 20/37] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 70250610..459d4979 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -2,9 +2,9 @@ name: CMake on: push: - branches: [ "main" ] + branches: [ "dev" ] pull_request: - branches: [ "main" ] + branches: [ "dev" ] env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) From 9bbde98c4f7b6649f652e1b451532b92c36d99b7 Mon Sep 17 00:00:00 2001 From: Sopitive <30811278+Sopitive@users.noreply.github.com> Date: Mon, 24 Jul 2023 11:32:28 -0700 Subject: [PATCH 21/37] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 459d4979..979f45cd 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -2,9 +2,9 @@ name: CMake on: push: - branches: [ "dev" ] + branches: [ "master" ] pull_request: - branches: [ "dev" ] + branches: [ "master" ] env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) From bcb98c043346ddf100ed0322b85fb4a0e3ce1fcf Mon Sep 17 00:00:00 2001 From: Sopitive <30811278+Sopitive@users.noreply.github.com> Date: Mon, 24 Jul 2023 12:32:17 -0700 Subject: [PATCH 22/37] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 979f45cd..473ee525 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -32,11 +32,11 @@ jobs: - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: cmake -B ${{github.workspace}}/native/src/ReachVariantTool/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + run: cmake -B /native/src/ReachVariantTool/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} - name: Build # Build your program with the given configuration - run: cmake --build ${{github.workspace}}/native/src/ReachVariantTool/build --config ${{env.BUILD_TYPE}} + run: cmake --build /native/src/ReachVariantTool/build --config ${{env.BUILD_TYPE}} - name: Test working-directory: ${{github.workspace}}/build From e9b06963768483639b6b15b5d33789dd7af0d499 Mon Sep 17 00:00:00 2001 From: Sopitive <30811278+Sopitive@users.noreply.github.com> Date: Mon, 24 Jul 2023 12:57:27 -0700 Subject: [PATCH 23/37] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 473ee525..5dd1df1a 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -32,27 +32,16 @@ jobs: - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: cmake -B /native/src/ReachVariantTool/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} - name: Build # Build your program with the given configuration - run: cmake --build /native/src/ReachVariantTool/build --config ${{env.BUILD_TYPE}} - + run: + cd native/src/ReachVariantTool + cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + - name: Test working-directory: ${{github.workspace}}/build # Execute tests defined by the CMake configuration. # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail run: ctest -C ${{env.BUILD_TYPE}} - - - name: Zip build - working-directory: ${{github.workspace}}/native/src/ReachVariantTool - run: | - 7z a ReachVariantTool.zip ${{ runner.temp }}\build\* -r - - - name: Save build artifact - uses: actions/upload-artifact@master - with: - name: ReachVariantTool.zip - path: ${{github.workspace}}/native/src/ReachVariantTool/ReachVariantTool.zip - - From cc21bc1fc20c3f3799c35b4d5df8cc834f43ea2a Mon Sep 17 00:00:00 2001 From: Sopitive <30811278+Sopitive@users.noreply.github.com> Date: Mon, 24 Jul 2023 13:02:28 -0700 Subject: [PATCH 24/37] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 5dd1df1a..1a72fa21 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -28,6 +28,7 @@ jobs: host: 'windows' target: 'desktop' arch: 'win64_msvc2019_64' + setup-python: true - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. From 9fff1c7be39a5dd3cdd0f35ac806e7ea0eff8a48 Mon Sep 17 00:00:00 2001 From: Sopitive <30811278+Sopitive@users.noreply.github.com> Date: Mon, 24 Jul 2023 13:40:10 -0700 Subject: [PATCH 25/37] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 49 ++++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 14 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 1a72fa21..dd9fd972 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -27,22 +27,43 @@ jobs: version: '5.15.2' host: 'windows' target: 'desktop' + dir: ${{ runner.temp }} arch: 'win64_msvc2019_64' setup-python: true + + - name: Download JOM + uses: suisei-cn/actions-download-file@v1 + with: + url: http://download.qt.io/official_releases/jom/jom.zip + target: ${{ runner.temp }}\ + + - name: Unzip JOM + working-directory: ${{ runner.temp }} + run: | + 7z x jom.zip -ojom - - name: Configure CMake - # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. - # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + - name: Create build directory + run: mkdir ${{ runner.temp }}\build + + - name: Set up Visual Studio shell + uses: egor-tensin/vs-shell@v2 + with: + arch: x64 - name: Build - # Build your program with the given configuration - run: - cd native/src/ReachVariantTool - cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} - - - name: Test - working-directory: ${{github.workspace}}/build - # Execute tests defined by the CMake configuration. - # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail - run: ctest -C ${{env.BUILD_TYPE}} + working-directory: ${{ runner.temp }}\build + run: | + cd native/src/ReachVariantTool + qmake + nmake + + - name: Zip build + working-directory: ${{ runner.temp }} + run: | + 7z a ReachVariantTool.zip ${{ runner.temp }}\build\* -r + + - name: Save build artifact + uses: actions/upload-artifact@master + with: + name: ReachVariantTool.zip + path: ${{ runner.temp }}\ReachVariantTool.zip From fbe53efc1536f861263a5253ad3890a711c39a3b Mon Sep 17 00:00:00 2001 From: Sopitive <30811278+Sopitive@users.noreply.github.com> Date: Mon, 24 Jul 2023 13:43:36 -0700 Subject: [PATCH 26/37] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index dd9fd972..72c153cb 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -53,7 +53,7 @@ jobs: - name: Build working-directory: ${{ runner.temp }}\build run: | - cd native/src/ReachVariantTool + cd ${{ github.workspace }}/native/src/ReachVariantTool qmake nmake From cc91c17216269066391d861191b3fc77e6c8ce81 Mon Sep 17 00:00:00 2001 From: Sopitive <30811278+Sopitive@users.noreply.github.com> Date: Mon, 24 Jul 2023 13:50:47 -0700 Subject: [PATCH 27/37] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 72c153cb..b55d64c9 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -53,9 +53,14 @@ jobs: - name: Build working-directory: ${{ runner.temp }}\build run: | - cd ${{ github.workspace }}/native/src/ReachVariantTool - qmake - nmake + qmake -r ${{ github.workspace }}\native\src\ReachVariantTool + ${{ runner.temp }}\jom\jom -j2 + cd release + windeployqt --qmldir ${{ github.workspace }}\native\src\ReachVariantTool ReachVariantTool.exe --pdb --release --compiler-runtime + copy C:\Windows\System32\concrt140.dll . + copy C:\Windows\System32\vccorlib140.dll . + copy C:\Windows\System32\msvcp140.dll . + copy C:\Windows\System32\vcruntime140.dll . - name: Zip build working-directory: ${{ runner.temp }} From d8a1ff3a2d8a30e707616049de1e2f72d807f580 Mon Sep 17 00:00:00 2001 From: Sopitive <30811278+Sopitive@users.noreply.github.com> Date: Wed, 26 Jul 2023 17:22:21 -0700 Subject: [PATCH 28/37] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 89 ++++++++++++------------------------- 1 file changed, 28 insertions(+), 61 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index b55d64c9..48f7704c 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -1,74 +1,41 @@ -name: CMake +name: Build and Upload Artifact on: push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - -env: - # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) - BUILD_TYPE: Release + branches: + - main # Adjust this to the branch you want to trigger the build on jobs: build: - # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. - # You can convert this to a matrix build if you need cross-platform coverage. - # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix - runs-on: windows-latest + runs-on: windows-latest # We use Windows runner as MSBuild is used steps: - - uses: actions/checkout@v3 + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup MSBuild + uses: microsoft/setup-msbuild@v1.0.2 # Set up MSBuild on the Windows runner + + - name: Restore NuGet packages (if needed) + run: nuget restore ReachVariantTool.sln # Replace with the correct solution file name - - name: Install Qt - # Installs the Qt SDK - uses: jurplel/install-qt-action@v2 - with: - version: '5.15.2' - host: 'windows' - target: 'desktop' - dir: ${{ runner.temp }} - arch: 'win64_msvc2019_64' - setup-python: true - - - name: Download JOM - uses: suisei-cn/actions-download-file@v1 - with: - url: http://download.qt.io/official_releases/jom/jom.zip - target: ${{ runner.temp }}\ + - name: Build the solution + run: msbuild ReachVariantTool.sln /p:Configuration=Debug /p:Platform=x64 - - name: Unzip JOM - working-directory: ${{ runner.temp }} - run: | - 7z x jom.zip -ojom + - name: Create artifact directory + run: mkdir artifact - - name: Create build directory - run: mkdir ${{ runner.temp }}\build + - name: Copy built files to artifact directory + run: | + robocopy x64\Debug artifact /E - - name: Set up Visual Studio shell - uses: egor-tensin/vs-shell@v2 - with: - arch: x64 + - name: Zip artifact directory + run: | + $zipPath = $env:GITHUB_WORKSPACE + '\artifact.zip' + Compress-Archive -Path $env:GITHUB_WORKSPACE\artifact -DestinationPath $zipPath - - name: Build - working-directory: ${{ runner.temp }}\build - run: | - qmake -r ${{ github.workspace }}\native\src\ReachVariantTool - ${{ runner.temp }}\jom\jom -j2 - cd release - windeployqt --qmldir ${{ github.workspace }}\native\src\ReachVariantTool ReachVariantTool.exe --pdb --release --compiler-runtime - copy C:\Windows\System32\concrt140.dll . - copy C:\Windows\System32\vccorlib140.dll . - copy C:\Windows\System32\msvcp140.dll . - copy C:\Windows\System32\vcruntime140.dll . - - - name: Zip build - working-directory: ${{ runner.temp }} - run: | - 7z a ReachVariantTool.zip ${{ runner.temp }}\build\* -r - - - name: Save build artifact - uses: actions/upload-artifact@master - with: - name: ReachVariantTool.zip - path: ${{ runner.temp }}\ReachVariantTool.zip + - name: Upload artifact + uses: actions/upload-artifact@v2 + with: + name: project-artifact + path: artifact.zip From cfa87ed193f365f886ed8352b1cb2d2e72fe7986 Mon Sep 17 00:00:00 2001 From: Sopitive <30811278+Sopitive@users.noreply.github.com> Date: Wed, 26 Jul 2023 17:23:03 -0700 Subject: [PATCH 29/37] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 48f7704c..ab018b73 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -3,7 +3,8 @@ name: Build and Upload Artifact on: push: branches: - - main # Adjust this to the branch you want to trigger the build on + - master # Adjust this to the branch you want to trigger the build on + - dev jobs: build: From 9b04312fd62d2fe21793e28dce9b5e6ded076b4f Mon Sep 17 00:00:00 2001 From: Sopitive <30811278+Sopitive@users.noreply.github.com> Date: Wed, 26 Jul 2023 17:24:12 -0700 Subject: [PATCH 30/37] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index ab018b73..78f7866c 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -17,9 +17,6 @@ jobs: - name: Setup MSBuild uses: microsoft/setup-msbuild@v1.0.2 # Set up MSBuild on the Windows runner - - name: Restore NuGet packages (if needed) - run: nuget restore ReachVariantTool.sln # Replace with the correct solution file name - - name: Build the solution run: msbuild ReachVariantTool.sln /p:Configuration=Debug /p:Platform=x64 From 7627e55be81db10c16e1a16816f2a44b7e2e4ff2 Mon Sep 17 00:00:00 2001 From: Sopitive <30811278+Sopitive@users.noreply.github.com> Date: Wed, 26 Jul 2023 17:27:52 -0700 Subject: [PATCH 31/37] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 78f7866c..86de68e1 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -18,7 +18,9 @@ jobs: uses: microsoft/setup-msbuild@v1.0.2 # Set up MSBuild on the Windows runner - name: Build the solution - run: msbuild ReachVariantTool.sln /p:Configuration=Debug /p:Platform=x64 + run: + cd ${{ github.workspace }}/native/src + msbuild ReachVariantTool.sln /p:Configuration=Debug /p:Platform=x64 - name: Create artifact directory run: mkdir artifact From 31ac067d18d2cc004a3c795abc4c44183125834c Mon Sep 17 00:00:00 2001 From: Sopitive <30811278+Sopitive@users.noreply.github.com> Date: Wed, 26 Jul 2023 17:29:50 -0700 Subject: [PATCH 32/37] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 86de68e1..3559b8a3 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -19,8 +19,7 @@ jobs: - name: Build the solution run: - cd ${{ github.workspace }}/native/src - msbuild ReachVariantTool.sln /p:Configuration=Debug /p:Platform=x64 + msbuild ${{ github.workspace }}\native\src\ReachVariantTool.sln /p:Configuration=Debug /p:Platform=x64 - name: Create artifact directory run: mkdir artifact From 0ac7dfe8505f7554266df44a727598503f4b04da Mon Sep 17 00:00:00 2001 From: Sopitive <30811278+Sopitive@users.noreply.github.com> Date: Wed, 26 Jul 2023 17:46:54 -0700 Subject: [PATCH 33/37] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 3559b8a3..5d89afd0 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -16,7 +16,26 @@ jobs: - name: Setup MSBuild uses: microsoft/setup-msbuild@v1.0.2 # Set up MSBuild on the Windows runner - + + - name: Install Qt and Generate Project Files + uses: jason0125/setup-qt@v2 + with: + qt-version: '5.15.2' + + - name: Generate Visual Studio project files + run: | + cd ${{ github.workspace }}\native\src\ReachVariantTool + qmake -tp vc + qmake ReachVariantTool.pro + cd ${{ github.workspace }}\native\src\zlib + qmake -tp vc + qmake zlib.pro + cd ${{ github.workspace }}\native\src\RVTDocumentationProcessor + qmake -tp vc + qmake RVTDocumentationProcessor.pro + cd ${{ github.workspace }}\native\src\RVTDocRenderer + qmake -tp vc + qmake RVTDocRenderer.pro - name: Build the solution run: msbuild ${{ github.workspace }}\native\src\ReachVariantTool.sln /p:Configuration=Debug /p:Platform=x64 From b8e4436fbf8c68ab2db08a08ee744c2d5977d8c1 Mon Sep 17 00:00:00 2001 From: Sopitive <30811278+Sopitive@users.noreply.github.com> Date: Wed, 26 Jul 2023 17:49:32 -0700 Subject: [PATCH 34/37] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 5d89afd0..562ac88d 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -17,10 +17,15 @@ jobs: - name: Setup MSBuild uses: microsoft/setup-msbuild@v1.0.2 # Set up MSBuild on the Windows runner - - name: Install Qt and Generate Project Files - uses: jason0125/setup-qt@v2 + - name: Install Qt + uses: jurplel/install-qt-action@v2 with: - qt-version: '5.15.2' + version: 5.15.2 + host: windows + target: desktop + arch: win64_msvc2019_64 + dir: ${{ runner.temp }} + setup-python: false - name: Generate Visual Studio project files run: | From 62d790803ce4f05d6f8e910ba34766869720da71 Mon Sep 17 00:00:00 2001 From: Sopitive <30811278+Sopitive@users.noreply.github.com> Date: Wed, 26 Jul 2023 17:53:05 -0700 Subject: [PATCH 35/37] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 562ac88d..83d40e24 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -30,16 +30,16 @@ jobs: - name: Generate Visual Studio project files run: | cd ${{ github.workspace }}\native\src\ReachVariantTool - qmake -tp vc + qmake -project qmake ReachVariantTool.pro cd ${{ github.workspace }}\native\src\zlib - qmake -tp vc + qmake -project qmake zlib.pro cd ${{ github.workspace }}\native\src\RVTDocumentationProcessor - qmake -tp vc + qmake -project qmake RVTDocumentationProcessor.pro cd ${{ github.workspace }}\native\src\RVTDocRenderer - qmake -tp vc + qmake -project qmake RVTDocRenderer.pro - name: Build the solution run: From f73509bb8dd5f869db583e2548fb26789177e437 Mon Sep 17 00:00:00 2001 From: Sopitive <30811278+Sopitive@users.noreply.github.com> Date: Wed, 26 Jul 2023 18:29:44 -0700 Subject: [PATCH 36/37] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 83d40e24..719855b5 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -3,7 +3,6 @@ name: Build and Upload Artifact on: push: branches: - - master # Adjust this to the branch you want to trigger the build on - dev jobs: @@ -27,20 +26,6 @@ jobs: dir: ${{ runner.temp }} setup-python: false - - name: Generate Visual Studio project files - run: | - cd ${{ github.workspace }}\native\src\ReachVariantTool - qmake -project - qmake ReachVariantTool.pro - cd ${{ github.workspace }}\native\src\zlib - qmake -project - qmake zlib.pro - cd ${{ github.workspace }}\native\src\RVTDocumentationProcessor - qmake -project - qmake RVTDocumentationProcessor.pro - cd ${{ github.workspace }}\native\src\RVTDocRenderer - qmake -project - qmake RVTDocRenderer.pro - name: Build the solution run: msbuild ${{ github.workspace }}\native\src\ReachVariantTool.sln /p:Configuration=Debug /p:Platform=x64 From bca29689dc2f908500fb1f81cc54ef72d97bb662 Mon Sep 17 00:00:00 2001 From: Sopitive <30811278+Sopitive@users.noreply.github.com> Date: Wed, 26 Jul 2023 18:37:49 -0700 Subject: [PATCH 37/37] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 719855b5..a841b34b 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -25,6 +25,14 @@ jobs: arch: win64_msvc2019_64 dir: ${{ runner.temp }} setup-python: false + + - name: Prepare Qt environment + run: | + # Set Qt related environment variables + echo "QTDIR=${{ runner.temp }}/Qt/5.15.2/msvc2019_64" >> $GITHUB_ENV + echo "QTDIR/bin" >> $GITHUB_PATH + echo "QTDIR/lib" >> $GITHUB_PATH + echo "QTDIR/plugins" >> $GITHUB_PATH - name: Build the solution run: