diff --git a/.github/workflows/atomicdex-desktop-ci.yml b/.github/workflows/atomicdex-desktop-ci.yml index b5589050ec..f1dc595d33 100644 --- a/.github/workflows/atomicdex-desktop-ci.yml +++ b/.github/workflows/atomicdex-desktop-ci.yml @@ -74,19 +74,19 @@ jobs: host: 'windows' steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.sha }} submodules: 'true' - name: Setup Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 with: python-version: '3.9' - name: Install MSVC if: runner.os == 'Windows' - uses: ilammy/msvc-dev-cmd@v1.4.1 + uses: ilammy/msvc-dev-cmd@v1.12.0 - name: Build libwally (Windows) if: runner.os == 'Windows' @@ -107,64 +107,54 @@ jobs: - name: Install QT (macOS) if: runner.os == 'macOS' - uses: KomodoPlatform/install-qt-action@v2.14.0 + uses: jurplel/install-qt-action@v3.0.0 with: version: ${{ matrix.qt }} - setup-python: 'false' host: ${{ matrix.host }} - target: 'desktop' dir: '${{ github.workspace }}' - modules: 'qtcharts qtwidgets debug_info qtwebengine qtwebview' + target: 'desktop' + modules: 'qtcharts debug_info qtwebengine' + tools: 'tools_ifw' + setup-python: 'false' + cache: true - name: Install QT (Linux) if: runner.os == 'Linux' - uses: KomodoPlatform/install-qt-action@v2.14.0 + uses: jurplel/install-qt-action@v3.0.0 with: version: ${{ matrix.qt }} - setup-python: 'false' host: ${{ matrix.host }} - target: 'desktop' dir: '${{ github.workspace }}' - modules: 'qtcharts qtwidgets debug_info qtwebengine qtwebview' - aqtversion: '==0.8' - py7zrversion: '==0.6' + target: 'desktop' + modules: 'qtcharts debug_info qtwebengine' + setup-python: 'false' + cache: true - name: Install QT (Windows) if: runner.os == 'Windows' - uses: KomodoPlatform/install-qt-action@v2.14.0 + uses: jurplel/install-qt-action@v3.0.0 with: version: ${{ matrix.qt }} host: ${{ matrix.host }} + dir: 'C:\' target: 'desktop' + modules: 'qtcharts debug_info qtwebengine' + tools: 'tools_ifw' arch: 'win64_msvc2019_64' - dir: 'C:\' - modules: 'qtcharts qtwidgets debug_info qtwebview qtwebengine' - - - name: Install QT IFW (MacOS) - if: runner.os == 'macOS' - run: | - python3 -m aqt tool ${{ matrix.host }} tools_ifw 4.5.1 qt.tools.ifw.45 --outputdir ${{ github.workspace }}/Qt - echo "${{ github.workspace }}/Qt/Tools/QtInstallerFramework/4.5/bin" >> $GITHUB_PATH - - - name: Install QT IFW (Windows) - if: runner.os == 'Windows' - run: | - python -m pip install --upgrade pip - python -m aqt tool ${{ matrix.host }} tools_ifw 4.5.1 qt.tools.ifw.45 --outputdir C:/Qt - echo "C:/Qt/Tools/QtInstallerFramework/4.5/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + cache: true - name: Install nim (Linux) if: runner.os == 'Linux' run: | export DEBIAN_FRONTEND=noninteractive export SHELL=/bin/bash - echo "CHOOSENIM_CHOOSE_VERSION=1.4.8" >> $GITHUB_ENV - export CHOOSENIM_CHOOSE_VERSION=1.4.8 + echo "CHOOSENIM_CHOOSE_VERSION=1.6.10" >> $GITHUB_ENV + export CHOOSENIM_CHOOSE_VERSION=1.6.10 curl https://nim-lang.org/choosenim/init.sh > choosenim.sh chmod +x choosenim.sh ./choosenim.sh -y export PATH=/home/runner/.nimble/bin:$PATH - chmod +x /home/runner/.choosenim/toolchains/nim-1.4.8/bin/* + chmod +x /home/runner/.choosenim/toolchains/nim-1.6.10/bin/* - name: Install deps (Linux) if: runner.os == 'Linux' @@ -191,11 +181,11 @@ jobs: echo "CC=clang-12" >> $GITHUB_ENV - name: vcpkg deps (All) - uses: KomodoPlatform/run-vcpkg@v7 + uses: lukka/run-vcpkg@v10 with: vcpkgDirectory: '${{ github.workspace }}/ci_tools_atomic_dex/vcpkg-repo' - setupOnly: true appendedCacheKey: ${{ hashFiles('vcpkg.json') }} + vcpkgJsonGlob: 'vcpkg.json' - name: import code signing certificates (macos) @@ -222,6 +212,11 @@ jobs: - name: Build AtomicDEX (MacOS) if: runner.os == 'macOS' run: | + xcrun --sdk macosx --show-sdk-path + export SDK_PATH=$(xcrun --sdk macosx --show-sdk-path) + ls /Applications/Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs + echo $HOME/sdk + ls $HOME/sdk export MAC_SIGN_IDENTITY="${{ secrets.MAC_SIGN_IDENTITY }}" export INSTALLER_MAC_SIGN_IDENTITY="${{ secrets.INSTALLER_MAC_SIGN_IDENTITY }}" export APPLE_ATOMICDEX_PASSWORD="${{ secrets.APPLE_ATOMICDEX_PASSWORD }}" @@ -237,6 +232,7 @@ jobs: ./ci_tools_atomic_dex bundle ${{ matrix.type }} --osx_sdk=$HOME/sdk/MacOSX10.15.sdk --compiler=clang++ + - name: Build AtomicDEX (Linux) if: runner.os == 'Linux' run: | @@ -276,7 +272,7 @@ jobs: - name: Upload bundle artifact (Linux ZSTD) if: runner.os == 'Linux' - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: ${{ env.artifact_name_zstd }} path: ./bundled/linux/${{ env.target_name_zstd }} @@ -284,7 +280,7 @@ jobs: - name: Upload bundle artifact (Linux ZIP) if: runner.os == 'Linux' - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: ${{ env.artifact_name_zip }} path: ./bundled/linux/${{ env.target_name_zip }} @@ -292,7 +288,7 @@ jobs: - name: Upload bundle artifact (Linux AppImage) if: runner.os == 'Linux' - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: ${{ env.artifact_name_appimage }} path: ./bundled/linux/${{ env.target_name_appimage }} @@ -306,7 +302,7 @@ jobs: - name: Upload artifacts (MacOS dmg) if: runner.os == 'macOS' - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: ${{ env.artifact_name_dmg }} path: ./bundled/osx/${{ env.DEX_PROJECT_NAME }}.dmg @@ -314,7 +310,7 @@ jobs: - name: Upload artifacts (MacOS installer) if: runner.os == 'macOS' - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: ${{ env.artifact_name_installer }} path: ./bundled/osx/${{ env.DEX_PROJECT_NAME }}_installer.7z @@ -329,7 +325,7 @@ jobs: - name: Upload artifacts (Windows zip) if: runner.os == 'Windows' - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: ${{ env.artifact_name_zip }} path: ./bundled/windows/bin.zip @@ -337,7 +333,7 @@ jobs: - name: Upload artifacts (Windows installer) if: runner.os == 'Windows' - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: ${{ env.artifact_name_installer }} path: ./bundled/windows/${{ env.DEX_PROJECT_NAME }}_installer.exe diff --git a/ci_tools_atomic_dex/ci_scripts/osx_script.sh b/ci_tools_atomic_dex/ci_scripts/osx_script.sh index 3eb78b7d6f..949442963e 100755 --- a/ci_tools_atomic_dex/ci_scripts/osx_script.sh +++ b/ci_tools_atomic_dex/ci_scripts/osx_script.sh @@ -2,9 +2,6 @@ brew update -brew tap-new $USER/local-nim -brew extract --version=1.4.8 nim $USER/local-nim - brew unlink libtool wget https://raw.githubusercontent.com/Homebrew/homebrew-core/0fbd6e24c4122e18ade1ec6c5916cb21de14f352/Formula/libtool.rb brew install libtool.rb @@ -13,7 +10,7 @@ brew install autoconf \ automake \ pkgconfig \ wget \ - nim@1.4.8 \ + nim \ ninja \ gnu-sed \ coreutils \ diff --git a/ci_tools_atomic_dex/src/clean.nim b/ci_tools_atomic_dex/src/clean.nim index a84a1ad28d..888368a376 100644 --- a/ci_tools_atomic_dex/src/clean.nim +++ b/ci_tools_atomic_dex/src/clean.nim @@ -1,13 +1,13 @@ import os proc remove_vcpkg()= - if os.existsDir("vcpkg-repo"): + if os.dirExists("vcpkg-repo"): os.removeDir("vcpkg-repo") proc remove_build()= - if os.existsDir("build-Debug"): + if os.dirExists("build-Debug"): os.removeDir("build-Debug") - if os.existsDir("build-Release"): + if os.dirExists("build-Release"): os.removeDir("build-Release") proc clean*(clean_type: string) = diff --git a/ci_tools_atomic_dex/src/generate.nim b/ci_tools_atomic_dex/src/generate.nim index d2462a201f..d53b6a1ff8 100644 --- a/ci_tools_atomic_dex/src/generate.nim +++ b/ci_tools_atomic_dex/src/generate.nim @@ -6,7 +6,7 @@ import dependencies proc generate_solution*(build_type: string, osx_sdk_path: string, compiler_path: string) = download_packages() var full_name = "build-" & build_type - if not os.existsDir(os.getCurrentDir().joinPath(full_name)): + if not os.dirExists(os.getCurrentDir().joinPath(full_name)): echo "creating directory: " & full_name os.createDir(full_name) else: @@ -16,7 +16,7 @@ proc generate_solution*(build_type: string, osx_sdk_path: string, compiler_path: var cmd_line = "cmake -GNinja -DCMAKE_BUILD_TYPE=" & build_type & " " & os.getCurrentDir().parentDir().parentDir() when defined(osx): - if not osx_sdk_path.isNil() and osx_sdk_path != "nil": + if os.dirExists(osx_sdk_path): cmd_line = cmd_line & " -DCMAKE_OSX_SYSROOT=" & osx_sdk_path & " -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15" echo "cmd line: " & cmd_line discard execCmd(cmd_line) diff --git a/ci_tools_atomic_dex/src/vcpkg.nim b/ci_tools_atomic_dex/src/vcpkg.nim index c679f29a8e..fca94fc080 100644 --- a/ci_tools_atomic_dex/src/vcpkg.nim +++ b/ci_tools_atomic_dex/src/vcpkg.nim @@ -5,10 +5,10 @@ var g_vcpkg_local_path* = "" var g_vcpkg_cmake_script_path* = "" proc check_if_vcpkg_exists*(): bool = - result = os.existsDir("vcpkg-repo") + result = os.dirExists("vcpkg-repo") proc build_vcpkg() = - if not os.existsFile(g_vcpkg_local_path): + if not os.fileExists(g_vcpkg_local_path): echo "building vcpkg" os.setCurrentDir("vcpkg-repo") when defined(windows):