diff --git a/.circleci/config.yml b/.circleci/config.yml index 4961644e8..932f1e6c0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -43,7 +43,7 @@ jobs: - restore_cache: name: 'Restore previous checksum.txt from cache' keys: - - cache-nextclade-v6-builder-container-{{ checksum "checksum.current.txt" }} + - cache-nextclade-v7-builder-container-{{ checksum "checksum.current.txt" }} - run: name: 'Compare checksum.txt to cached one, halt if no changes' @@ -80,7 +80,7 @@ jobs: - save_cache: name: 'Save new checksum.txt to cache' - key: cache-nextclade-v6-builder-container-{{ checksum "checksum.previous.txt" }} + key: cache-nextclade-v7-builder-container-{{ checksum "checksum.previous.txt" }} paths: - checksum.previous.txt @@ -101,7 +101,7 @@ jobs: - restore_cache: name: 'Restore WebAssembly module build cache' keys: - - cache-nextclade-v6-web-wasm-{{ arch }}-{{ checksum "conanfile.wasm.txt" }} + - cache-nextclade-v7-web-wasm-{{ arch }}-{{ checksum "conanfile.wasm.txt" }} - run: name: 'Build WebAssembly module' @@ -112,14 +112,14 @@ jobs: - save_cache: name: 'Save WebAssembly module build cache' - key: cache-nextclade-v6-web-wasm-{{ arch }}-{{ checksum "conanfile.wasm.txt" }} + key: cache-nextclade-v7-web-wasm-{{ arch }}-{{ checksum "conanfile.wasm.txt" }} paths: - .cache - restore_cache: name: 'Restore web application build cache' keys: - - cache-nextclade-v6-web-js-{{ arch }}-{{ checksum "packages/web/yarn.lock" }} + - cache-nextclade-v7-web-js-{{ arch }}-{{ checksum "packages/web/yarn.lock" }} - run: name: 'Build web application' @@ -128,7 +128,7 @@ jobs: - save_cache: name: 'Save web application build cache' - key: cache-nextclade-v6-web-js-{{ arch }}-{{ checksum "packages/web/yarn.lock" }} + key: cache-nextclade-v7-web-js-{{ arch }}-{{ checksum "packages/web/yarn.lock" }} paths: - packages/web/.cache - packages/web/.build/production/tmp/cache @@ -188,7 +188,7 @@ jobs: - restore_cache: name: 'Restore build cache' keys: - - cache-nextclade-v6-cache-{{ arch }}-{{ checksum "conanfile.txt" }} + - cache-nextclade-v7-cache-{{ arch }}-{{ checksum "conanfile.txt" }} - run: name: 'Run "Builder" container' @@ -198,7 +198,7 @@ jobs: - save_cache: name: 'Save build cache' - key: cache-nextclade-v6-cache-{{ arch }}-{{ checksum "conanfile.txt" }} + key: cache-nextclade-v7-cache-{{ arch }}-{{ checksum "conanfile.txt" }} paths: - .cache @@ -242,21 +242,28 @@ jobs: - restore_cache: name: 'Restore homebrew cache' keys: - - cache-nextclade-v6-homebrew-{{ arch }}-{{ checksum "Brewfile" }} + - cache-nextclade-v7-homebrew-{{ arch }}-{{ checksum "Brewfile" }} - run: name: 'Install build tools' command: | set -x brew bundle + + mkdir -p .cache + python3 -m venv .cache/venv + source .cache/venv/bin/activate + pip3 install --upgrade -r requirements.txt + conan profile new default --detect + environment: HOMEBREW_NO_AUTO_UPDATE: 1 CONAN_USER_HOME: '/Users/distiller/project/.cache' - save_cache: name: 'Save homebrew cache' - key: cache-nextclade-v6-homebrew-{{ arch }}-{{ checksum "Brewfile" }} + key: cache-nextclade-v7-homebrew-{{ arch }}-{{ checksum "Brewfile" }} paths: - '~/Library/Caches/Homebrew' - '/usr/local/Homebrew' @@ -264,12 +271,13 @@ jobs: - restore_cache: name: 'Restore build cache' keys: - - cache-nextclade-v6-cache-{{ arch }}-{{ checksum "conanfile.txt" }}-<< parameters.macos_arch >> + - cache-nextclade-v7-cache-{{ arch }}-{{ checksum "conanfile.txt" }}-<< parameters.macos_arch >> - run: name: Run macOS << parameters.macos_arch >> build command: | - echo "DATA_FULL_DOMAIN=${DATA_FULL_DOMAIN}" >> .env + source .cache/venv/bin/activate + echo "DATA_FULL_DOMAIN=https://data.master.clades.nextstrain.org" >> .env make prod environment: CONAN_USER_HOME: '/Users/distiller/project/.cache' @@ -277,7 +285,7 @@ jobs: - save_cache: name: 'Save build cache' - key: cache-nextclade-v6-cache-{{ arch }}-{{ checksum "conanfile.txt" }}-<< parameters.macos_arch >> + key: cache-nextclade-v7-cache-{{ arch }}-{{ checksum "conanfile.txt" }}-<< parameters.macos_arch >> paths: - .cache @@ -291,36 +299,36 @@ jobs: path: .out/bin/nextclade-MacOS-<< parameters.macos_arch >> destination: nextclade-MacOS-<< parameters.macos_arch >> - - run: - name: 'Publish binaries to GitHub Releases: MacOS-<< parameters.macos_arch >>' - command: | - OS=darwin ./scripts/download_github_release_tool.sh - ./scripts/publish_github_releases.sh +# - run: +# name: 'Publish binaries to GitHub Releases: MacOS-<< parameters.macos_arch >>' +# command: | +# OS=darwin ./scripts/download_github_release_tool.sh +# ./scripts/publish_github_releases.sh workflows: version: 2 build: jobs: - - Update-Builder-Container: - <<: *major_branches_and_cli_release_only - - - Build-Web: - context: nextclade_web_<< pipeline.git.branch >> - <<: *major_branches_only - requires: - - Update-Builder-Container - - - Build-Linux-x86_64: - context: nextclade_cli_<< pipeline.git.branch >> - <<: *release_cli_only - requires: - - Update-Builder-Container +# - Update-Builder-Container: +# <<: *major_branches_and_cli_release_only +# +# - Build-Web: +# context: nextclade_web_<< pipeline.git.branch >> +# <<: *major_branches_only +# requires: +# - Update-Builder-Container +# +# - Build-Linux-x86_64: +# context: nextclade_cli_<< pipeline.git.branch >> +# <<: *release_cli_only +# requires: +# - Update-Builder-Container - Build-MacOS: - context: nextclade_cli_<< pipeline.git.branch >> +# context: nextclade_cli_<< pipeline.git.branch >> matrix: parameters: macos_arch: - x86_64 - - arm64 - <<: *release_cli_only +# - arm64 +# <<: *release_cli_only diff --git a/.gitignore b/.gitignore index f9266544f..443d978ca 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ paper/paper.pdf tmp build/ *.bak +Brewfile.lock.json diff --git a/Brewfile b/Brewfile index 5dd8544f3..dcba46c39 100644 --- a/Brewfile +++ b/Brewfile @@ -2,7 +2,6 @@ brew "autoconf" brew "automake" brew "ccache" brew "cmake" -brew "conan" brew "coreutils" brew "cppcheck" brew "ghr" diff --git a/conanfile.txt b/conanfile.txt index 2ff09e700..26bb53739 100644 --- a/conanfile.txt +++ b/conanfile.txt @@ -6,7 +6,7 @@ cli11/1.9.1 cxxopts/2.2.1 date/3.0.1 fast-cpp-csv-parser/20191004 -fmt/7.1.3 +fmt/8.0.1 ghc-filesystem/1.4.0 gtest/1.10.0 jemalloc/5.2.1@local/stable diff --git a/docs/dev/developers-guide-cli.md b/docs/dev/developers-guide-cli.md index f2274766a..1ff383dff 100644 --- a/docs/dev/developers-guide-cli.md +++ b/docs/dev/developers-guide-cli.md @@ -55,7 +55,7 @@ The easiest way to start the development is to use the included docker container 💡 Quick install for macOS (click to expand) - You need to install XCode command line tools. After that you can install remaining required dependencies using [Homebrew](https://brew.sh/) and pip + You need to install XCode command line tools. After that you can install remaining required dependencies using [Homebrew](https://brew.sh/) and pip (into a Python virtual environment) ``` xcode-select --install @@ -63,6 +63,11 @@ The easiest way to start the development is to use the included docker container cd nextclade brew bundle --file=Brewfile + mkdir -p .cache + python3 -m venv .cache/venv + source .cache/venv/bin/activate + pip3 install --upgrade -r requirements.txt + ```

diff --git a/packages/nextclade_common/src/datasets.cpp b/packages/nextclade_common/src/datasets.cpp index dc9f7b1d0..d62fe608c 100644 --- a/packages/nextclade_common/src/datasets.cpp +++ b/packages/nextclade_common/src/datasets.cpp @@ -347,7 +347,9 @@ namespace Nextclade { } std::string formatDatasets(const std::vector& datasets, bool verbose /* = false */) { - fmt::memory_buffer buf; + fmt::memory_buffer bufRaw; + auto buf = std::back_inserter(bufRaw); + for (const auto& dataset : datasets) { fmt::format_to(buf, "Dataset\n"); fmt::format_to(buf, "-------\n"); @@ -369,7 +371,7 @@ namespace Nextclade { auto numRefs = std::to_string(dataset.datasetRefs.size()); fmt::format_to(buf, "Specific reference sequences ({:}):\n", numRefs); - fmt::format_to(buf, "-----------------------------" + std::string{"-", numRefs.size() + 3} + "\n\n"); + // fmt::format_to(buf, "-----------------------------" + std::string{"-", numRefs.size() + 3} + "\n\n"); for (const auto& datasetRef : dataset.datasetRefs) { const auto& ref = datasetRef.reference; @@ -394,7 +396,6 @@ namespace Nextclade { auto numTags = std::to_string(datasetRef.versions.size()); fmt::format_to(buf, " Specific versions ({:}):\n", datasetRef.versions.size()); - fmt::format_to(buf, " ------------------" + std::string{"-", numTags.size() + 3} + "\n\n"); for (const auto& version : datasetRef.versions) { fmt::format_to(buf, " Version\n"); @@ -441,7 +442,7 @@ namespace Nextclade { } fmt::format_to(buf, "\n"); } - return fmt::to_string(buf); + return fmt::to_string(bufRaw); } diff --git a/scripts/build_locally.sh b/scripts/build_locally.sh index c029c8c5e..001a56ea9 100755 --- a/scripts/build_locally.sh +++ b/scripts/build_locally.sh @@ -787,9 +787,9 @@ pushd "${BUILD_DIR}" > /dev/null print 30 "Install executable"; cmake --install "${BUILD_DIR}" --config "${CMAKE_BUILD_TYPE}" --strip - strip_executable "${NEXTALIGN_CLI}" +# strip_executable "${NEXTALIGN_CLI}" - strip_executable "${NEXTCLADE_CLI}" +# strip_executable "${NEXTCLADE_CLI}" fi