Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/test_CI' into fix/loop_crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
syl committed Oct 20, 2022
2 parents a5f03a4 + e636cb9 commit 3cb2a57
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 35 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/atomicdex-desktop-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
./ci_tools_atomic_dex build release
rm -rf ./vcpkg-repo/downloads
rm -rf ./vcpkg-repo/buildtrees
ls build-Release/bin/AntaraAtomicDexAppDir/usr/bin/atomic_qt
ls build-release/bin/AntaraAtomicDexAppDir/usr/bin/atomic_qt
- name: Pack Installer (Linux/Release)
run: |
Expand Down Expand Up @@ -213,7 +213,7 @@ jobs:
./ci_tools_atomic_dex build debug
rm -rf ./vcpkg-repo/downloads
rm -rf ./vcpkg-repo/buildtrees
ls build-Debug/bin/AntaraAtomicDexAppDir/usr/bin/atomic_qt
ls build-debug/bin/AntaraAtomicDexAppDir/usr/bin/atomic_qt
- name: Pack Installer (Linux/Debug)
run: |
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/atomicdex-desktop-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ jobs:
export PATH=${{ github.workspace }}/Qt/${{ matrix.qt }}/gcc_64/bin:$PATH
export PATH=$HOME/.nimble/bin:$PATH
export PROJECT_ROOT_DIR=${{ github.workspace }}
export BUILD_TYPE=${{ matrix.type }}
#export CXXFLAGS=-stdlib=libc++
#export LDFLAGS=-stdlib=libc++
export CXX=clang++-12
Expand Down Expand Up @@ -246,6 +247,7 @@ jobs:
export QT_ROOT=${{ github.workspace }}/Qt/${{ matrix.qt }}
export MACOSX_DEPLOYMENT_TARGET=10.13
export PROJECT_ROOT_DIR=${{ github.workspace }}
export BUILD_TYPE=${{ matrix.type }}
export CC=clang
export CXX=clang++
cd ${{ github.workspace }}/ci_tools_atomic_dex
Expand Down Expand Up @@ -276,6 +278,7 @@ jobs:
export CXX=clang++-12
export CC=clang-12
export PROJECT_ROOT_DIR=${{ github.workspace }}
export BUILD_TYPE=${{ matrix.type }}
echo "Running tests"
cd ${{ github.workspace }}/ci_tools_atomic_dex
./ci_tools_atomic_dex tests ${{ matrix.type }}
Expand All @@ -298,6 +301,7 @@ jobs:
export CC=clang
export CXX=clang++
export PROJECT_ROOT_DIR=${{ github.workspace }}
export BUILD_TYPE=${{ matrix.type }}
echo "Running tests"
cd ${{ github.workspace }}/ci_tools_atomic_dex
#./ci_tools_atomic_dex tests ${{ matrix.type }}
Expand Down Expand Up @@ -358,7 +362,6 @@ jobs:
- name: Upload env variable for artifacts (macOS)
if: runner.os == 'macOS'
run: |
pwd && ls
echo "artifact_name_dmg=${{ env.DEX_PROJECT_NAME }}-${{ matrix.name }}-$(git rev-parse --short HEAD).dmg" >> $GITHUB_ENV
echo "artifact_name_installer=${{ env.DEX_PROJECT_NAME }}-installer-${{ matrix.name }}-$(git rev-parse --short HEAD).7z" >> $GITHUB_ENV
Expand Down
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ Thumbs.db
/assets/tools/mm2/
/ci_tools_atomic_dex/vcpkg-repo/
/ci_tools_atomic_dex/ci_tools_atomic_dex
ci_tools_atomic_dex/build-Release
ci_tools_atomic_dex/build-Debug
ci_tools_atomic_dex/bundle-Release
ci_tools_atomic_dex/bundle-Debug
ci_tools_atomic_dex/build-release
ci_tools_atomic_dex/build-debug
ci_tools_atomic_dex/bundle-release
ci_tools_atomic_dex/bundle-debug
ci_tools_atomic_dex/installer/windows/packages/com.komodoplatform.atomicdexpro/data
ci_tools_atomic_dex/installer/linux/packages/com.komodoplatform.atomicdexpro/data
cmake-build-*
Expand Down
2 changes: 0 additions & 2 deletions ci_tools_atomic_dex/src/generate.nim
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ proc generate_solution*(build_type: string, osx_sdk_path: string, compiler_path:
echo "creating directory: " & full_name
else:
echo "existing directory: " & full_name

os.setCurrentDir(os.getEnv("PROJECT_ROOT_DIR").joinPath(full_name))

assert(os.existsEnv("QT_INSTALL_CMAKE_PATH"))
var cmd_line = "cmake -GNinja -DCMAKE_BUILD_TYPE=" & build_type & " " & os.getEnv("PROJECT_ROOT_DIR")
when defined(osx):
Expand Down
10 changes: 0 additions & 10 deletions ci_tools_atomic_dex/src/tests.nim
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,19 @@ proc run_tests*(build_type: string, osx_sdk_path: string, compiler_path: string)
var full_name = "build-" & build_type

when defined(osx):
echo os.getCurrentDir()
discard osproc.execCmd("ls")
os.setCurrentDir(os.getEnv("PROJECT_ROOT_DIR").joinPath(full_name).joinPath("bin").joinPath(os.getEnv("DEX_PROJECT_NAME") & "_tests.app").joinPath("Contents").joinPath("MacOS"))
echo os.getCurrentDir()
discard osproc.execCmd("ls")
echo "Running AtomicDex Pro Unit tests"
discard osproc.execCmd("./" & os.getEnv("DEX_PROJECT_NAME") & "_tests --reporters=xml --out=" & os.getEnv("DEX_PROJECT_NAME") & "-tests-result.xml -s")
echo "Successfully Generated ", os.getEnv("DEX_PROJECT_NAME"), "-tests-result.xml"

when defined(linux):
echo os.getCurrentDir()
discard osproc.execCmd("ls")
os.setCurrentDir(os.getEnv("PROJECT_ROOT_DIR").joinPath(full_name).joinPath("bin").joinPath("AntaraAtomicDexTestsAppDir").joinPath("usr").joinPath("bin"))
echo os.getCurrentDir()
discard osproc.execCmd("ls")
echo "Running AtomicDex Pro Unit tests"
discard osproc.execCmd("./" & os.getEnv("DEX_PROJECT_NAME") & "_tests --reporters=xml --out=" & os.getEnv("DEX_PROJECT_NAME") & "-tests-result.xml -s")
echo "Successfully Generated ", os.getEnv("DEX_PROJECT_NAME"), "-tests-result.xml"

when defined(windows):
echo os.getCurrentDir()
os.setCurrentDir(os.getEnv("PROJECT_ROOT_DIR").joinPath(full_name).joinPath("bin"))
echo os.getCurrentDir()
echo "Running AtomicDex Pro Unit tests"
discard osproc.execCmd(".\\" & os.getEnv("DEX_PROJECT_NAME") & "_tests --reporters=xml --out=" & os.getEnv("DEX_PROJECT_NAME") & "-tests-result.xml -s")
echo "Successfully Generated ", os.getEnv("DEX_PROJECT_NAME"), "-tests-result.xml"
4 changes: 2 additions & 2 deletions cmake/install/linux/linux_post_install.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ execute_process(COMMAND bash -c "echo -n `git rev-parse --short HEAD`"
)

get_filename_component(PROJECT_ROOT_DIR ${CMAKE_SOURCE_DIR} DIRECTORY)
if (EXISTS ${PROJECT_ROOT_DIR}/build-Release)
if (EXISTS ${PROJECT_ROOT_DIR}/build-release OR EXISTS ${PROJECT_ROOT_DIR}/build-debug)
message(STATUS "from ci tools, readjusting")
get_filename_component(PROJECT_ROOT_DIR ${PROJECT_ROOT_DIR} DIRECTORY)
endif ()
Expand All @@ -29,7 +29,7 @@ else ()
endif ()

message(STATUS "VCPKG package manager enabled")
set(LINUX_DEPLOY_PATH ${PROJECT_ROOT_DIR}/linux_misc/linuxdeployqt-7-x86_64.AppImage)
set(LINUX_DEPLOY_PATH ${PROJECT_ROOT_DIR}/ci_tools_atomic_dex/linux_misc/linuxdeployqt-7-x86_64.AppImage)

message(STATUS "PROJECT_ROOT_DIR -> ${PROJECT_ROOT_DIR}")
message(STATUS "PROJECT_QML_DIR -> ${PROJECT_QML_DIR}")
Expand Down
27 changes: 14 additions & 13 deletions cmake/install/macos/osx_post_install.cmake
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
include(${CMAKE_CURRENT_LIST_DIR}/../../project.metadata.cmake)

message(STATUS "PROJECT_ROOT_DIR -> ${PROJECT_ROOT_DIR}")
get_filename_component(PROJECT_ROOT_DIR ${CMAKE_SOURCE_DIR} DIRECTORY)
if (EXISTS ${PROJECT_ROOT_DIR}/build-Release OR EXISTS ${PROJECT_ROOT_DIR}/build-Debug)
if (EXISTS ${PROJECT_ROOT_DIR}/build-release OR EXISTS ${PROJECT_ROOT_DIR}/build-debug)
message(STATUS "from ci tools, readjusting")
get_filename_component(PROJECT_ROOT_DIR ${PROJECT_ROOT_DIR} DIRECTORY)
endif ()

message(STATUS "PROJECT_ROOT_DIR -> ${PROJECT_ROOT_DIR}")
set(PROJECT_QML_DIR ${PROJECT_ROOT_DIR}/atomic_defi_design/Dex)

set(PROJECT_QML_DIR ${CMAKE_SOURCE_DIR}/atomic_defi_design/Dex)
message(STATUS "PROJECT_QML_DIR -> ${PROJECT_QML_DIR}")
message(STATUS "bin dir -> ${CMAKE_CURRENT_SOURCE_DIR}/bin")
set(TARGET_APP_PATH ${PROJECT_ROOT_DIR}/bundled/osx/)
set(TARGET_APP_PATH ${CMAKE_SOURCE_DIR}/bundled/osx/)
set(PROJECT_APP_DIR ${DEX_PROJECT_NAME}.app)
set(PROJECT_APP_PATH ${CMAKE_SOURCE_DIR}/bin/${PROJECT_APP_DIR})
if (EXISTS ${PROJECT_APP_PATH})
Expand Down Expand Up @@ -62,15 +63,15 @@ if (NOT EXISTS ${CMAKE_SOURCE_DIR}/bin/${DEX_PROJECT_NAME}.dmg)
ECHO_OUTPUT_VARIABLE
ECHO_ERROR_VARIABLE)

message(STATUS "Fixing QtWebEngineProcess signature codesign --force --verify --verbose --sign \"$ENV{MAC_SIGN_IDENTITY}\" --entitlements ${PROJECT_ROOT_DIR}/cmake/install/macos/QtWebEngineProcess.entitlements --options runtime --timestamp ${PROJECT_APP_PATH}/Contents/Frameworks/QtWebEngineCore.framework/Helpers/QtWebEngineProcess.app/Contents/MacOS/QtWebEngineProcess")
execute_process(COMMAND codesign --force --verify --verbose --sign "$ENV{MAC_SIGN_IDENTITY}" --entitlements ${PROJECT_ROOT_DIR}/cmake/install/macos/QtWebEngineProcess.entitlements --options runtime --timestamp ${PROJECT_APP_PATH}/Contents/Frameworks/QtWebEngineCore.framework/Helpers/QtWebEngineProcess.app/Contents/MacOS/QtWebEngineProcess
message(STATUS "Fixing QtWebEngineProcess signature codesign --force --verify --verbose --sign \"$ENV{MAC_SIGN_IDENTITY}\" --entitlements ${CMAKE_SOURCE_DIR}/cmake/install/macos/QtWebEngineProcess.entitlements --options runtime --timestamp ${PROJECT_APP_PATH}/Contents/Frameworks/QtWebEngineCore.framework/Helpers/QtWebEngineProcess.app/Contents/MacOS/QtWebEngineProcess")
execute_process(COMMAND codesign --force --verify --verbose --sign "$ENV{MAC_SIGN_IDENTITY}" --entitlements ${CMAKE_SOURCE_DIR}/cmake/install/macos/QtWebEngineProcess.entitlements --options runtime --timestamp ${PROJECT_APP_PATH}/Contents/Frameworks/QtWebEngineCore.framework/Helpers/QtWebEngineProcess.app/Contents/MacOS/QtWebEngineProcess
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
ECHO_OUTPUT_VARIABLE
ECHO_ERROR_VARIABLE)

##-------------------------------------------
message(STATUS "Packaging the DMG")
set(PACKAGER_PATH ${PROJECT_ROOT_DIR}/ci_tools_atomic_dex/dmg-packager/package.sh)
set(PACKAGER_PATH ${CMAKE_SOURCE_DIR}/ci_tools_atomic_dex/dmg-packager/package.sh)
if (EXISTS ${PACKAGER_PATH})
message(STATUS "packager path is -> ${PACKAGER_PATH}")
else ()
Expand All @@ -87,7 +88,7 @@ if (NOT EXISTS ${CMAKE_SOURCE_DIR}/bin/${DEX_PROJECT_NAME}.dmg)
ECHO_OUTPUT_VARIABLE
ECHO_ERROR_VARIABLE)

execute_process(COMMAND ${PROJECT_ROOT_DIR}/cmake/install/macos/macos_notarize.sh --asc-public-id=$ENV{ASC_PUBLIC_ID} --app-specific-password=$ENV{APPLE_ATOMICDEX_PASSWORD} --apple-id=$ENV{APPLE_ID} --primary-bundle-id=com.komodoplatform.atomicdex --target-binary=${CMAKE_SOURCE_DIR}/bin/${DEX_PROJECT_NAME}.dmg
execute_process(COMMAND ${CMAKE_SOURCE_DIR}/cmake/install/macos/macos_notarize.sh --asc-public-id=$ENV{ASC_PUBLIC_ID} --app-specific-password=$ENV{APPLE_ATOMICDEX_PASSWORD} --apple-id=$ENV{APPLE_ID} --primary-bundle-id=com.komodoplatform.atomicdex --target-binary=${CMAKE_SOURCE_DIR}/bin/${DEX_PROJECT_NAME}.dmg
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
ECHO_OUTPUT_VARIABLE
ECHO_ERROR_VARIABLE)
Expand All @@ -111,24 +112,24 @@ else()
message(STATUS "${DEX_PROJECT_NAME}.7z already created - skipping")
endif()

file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/bin/${DEX_PROJECT_NAME}.7z DESTINATION ${PROJECT_ROOT_DIR}/ci_tools_atomic_dex/installer/osx/packages/com.komodoplatform.atomicdex/data)
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/bin/${DEX_PROJECT_NAME}.7z DESTINATION ${CMAKE_SOURCE_DIR}/ci_tools_atomic_dex/installer/osx/packages/com.komodoplatform.atomicdex/data)

execute_process(COMMAND ${IFW_BINDIR}/binarycreator -c ./config/config.xml -p ./packages/ ${DEX_PROJECT_NAME}_installer -s $ENV{MAC_SIGN_IDENTITY}
WORKING_DIRECTORY ${PROJECT_ROOT_DIR}/ci_tools_atomic_dex/installer/osx
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/ci_tools_atomic_dex/installer/osx
ECHO_OUTPUT_VARIABLE
ECHO_ERROR_VARIABLE)

execute_process(COMMAND codesign --deep --force -v -s "$ENV{MAC_SIGN_IDENTITY}" -o runtime --timestamp ${PROJECT_ROOT_DIR}/ci_tools_atomic_dex/installer/osx/${DEX_PROJECT_NAME}_installer.app
execute_process(COMMAND codesign --deep --force -v -s "$ENV{MAC_SIGN_IDENTITY}" -o runtime --timestamp ${CMAKE_SOURCE_DIR}/ci_tools_atomic_dex/installer/osx/${DEX_PROJECT_NAME}_installer.app
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
ECHO_OUTPUT_VARIABLE
ECHO_ERROR_VARIABLE)

execute_process(COMMAND ${PROJECT_ROOT_DIR}/cmake/install/macos/macos_notarize.sh --asc-public-id=$ENV{ASC_PUBLIC_ID} --app-specific-password=$ENV{APPLE_ATOMICDEX_PASSWORD} --apple-id=$ENV{APPLE_ID} --primary-bundle-id=com.komodoplatform.atomicdex --target-binary=${PROJECT_ROOT_DIR}/ci_tools_atomic_dex/installer/osx/${DEX_PROJECT_NAME}_installer.app
execute_process(COMMAND ${CMAKE_SOURCE_DIR}/cmake/install/macos/macos_notarize.sh --asc-public-id=$ENV{ASC_PUBLIC_ID} --app-specific-password=$ENV{APPLE_ATOMICDEX_PASSWORD} --apple-id=$ENV{APPLE_ID} --primary-bundle-id=com.komodoplatform.atomicdex --target-binary=${CMAKE_SOURCE_DIR}/ci_tools_atomic_dex/installer/osx/${DEX_PROJECT_NAME}_installer.app
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
ECHO_OUTPUT_VARIABLE
ECHO_ERROR_VARIABLE)

file(COPY ${PROJECT_ROOT_DIR}/ci_tools_atomic_dex/installer/osx/${DEX_PROJECT_NAME}_installer.app DESTINATION ${TARGET_APP_PATH})
file(COPY ${CMAKE_SOURCE_DIR}/ci_tools_atomic_dex/installer/osx/${DEX_PROJECT_NAME}_installer.app DESTINATION ${TARGET_APP_PATH})

execute_process(COMMAND ${IFW_BINDIR}/archivegen ${DEX_PROJECT_NAME}_installer.7z ${DEX_PROJECT_NAME}_installer.app
WORKING_DIRECTORY ${TARGET_APP_PATH}
Expand Down
2 changes: 1 addition & 1 deletion cmake/install/windows/windows_post_install.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include(${CMAKE_CURRENT_LIST_DIR}/../../project.metadata.cmake)

get_filename_component(PROJECT_ROOT_DIR ${CMAKE_SOURCE_DIR} DIRECTORY)
if (EXISTS ${PROJECT_ROOT_DIR}/build-Release)
if (EXISTS ${PROJECT_ROOT_DIR}/build-release OR EXISTS ${PROJECT_ROOT_DIR}/build-debug)
message(STATUS "from ci tools, readjusting")
get_filename_component(PROJECT_ROOT_DIR ${PROJECT_ROOT_DIR} DIRECTORY)
endif ()
Expand Down

0 comments on commit 3cb2a57

Please sign in to comment.