From e9b30130d318e4076fbe849362ea6961d3b16738 Mon Sep 17 00:00:00 2001 From: Cornelius Roemer Date: Fri, 12 Jul 2024 16:09:32 +0200 Subject: [PATCH 1/8] Attempt to build for osx-arm64 --- .github/workflows/ci.yaml | 3 ++- README.md | 2 +- devel/conda-subdir | 2 +- src/recipe.yaml | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 006a061..3750b3b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -42,7 +42,8 @@ jobs: matrix: os: - ubuntu-22.04 - - macos-12 + - macos-12 # x86_64 + - macos-14 # arm64 name: build and test (os=${{ matrix.os }}) runs-on: ${{ matrix.os }} diff --git a/README.md b/README.md index 1ff86fe..0ad9ad0 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ To build this package locally, run: The final built package will be written to `build/locked//nextstrain-base-*.conda`, where `` is a Conda -subdir, e.g. `linux-64` or `osx-64`. +subdir, i.e. `linux-64`, `osx-64` or `osx-arm64`. [CI][] builds store the entire `build/` and `locked/` directories as an artifact attached to each CI run. You can download the artifacts to inspect diff --git a/devel/conda-subdir b/devel/conda-subdir index 1ea9037..52b51c0 100755 --- a/devel/conda-subdir +++ b/devel/conda-subdir @@ -15,7 +15,7 @@ case "$kernel/$machine" in echo "osx-64";; Darwin/arm64) - echo "osx-64";; + echo "osx-arm64";; *) echo "unsupported kernel/machine: $kernel/$machine" >&2 diff --git a/src/recipe.yaml b/src/recipe.yaml index 45680d0..20e1681 100644 --- a/src/recipe.yaml +++ b/src/recipe.yaml @@ -46,6 +46,7 @@ requirements: - nextclade - nextstrain-cli - pathogen-embed + - pango_aliasor # # Third-party @@ -73,7 +74,6 @@ requirements: - iqtree >=2 - jq - ncbi-datasets-cli - - pango_aliasor - perl # Pin pulp <2.8 for snakemake: https://github.com/snakemake/snakemake/issues/2607 - pulp <2.8 From 25ebcce3f6406ca04230741a04cb43f85750df98 Mon Sep 17 00:00:00 2001 From: Cornelius Roemer Date: Fri, 12 Jul 2024 16:23:48 +0200 Subject: [PATCH 2/8] don't require gzip for now until https://github.com/conda-forge/gzip-feedstock/issues/8 is fixed --- src/recipe.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/recipe.yaml b/src/recipe.yaml index 20e1681..0114eeb 100644 --- a/src/recipe.yaml +++ b/src/recipe.yaml @@ -70,7 +70,10 @@ requirements: - epiweeks - git - google-cloud-storage - - gzip + # gzip is not yet available for arm64 on conda-forge + # https://github.com/conda-forge/gzip-feedstock/issues/8 + # however gzip is already installed on stock macOS + - gzip # [not arm64] - iqtree >=2 - jq - ncbi-datasets-cli From 82fa64d4353efec3c360cda32e59cde2db88f0c0 Mon Sep 17 00:00:00 2001 From: Cornelius Roemer Date: Fri, 12 Jul 2024 16:27:56 +0200 Subject: [PATCH 3/8] temporarily remove gzip for testing --- devel/build | 6 ------ src/recipe.yaml | 6 ++++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/devel/build b/devel/build index 2c4f866..198b17a 100755 --- a/devel/build +++ b/devel/build @@ -11,12 +11,6 @@ main() { export PATH="$env/bin:$PATH" export VERSION="${VERSION:-$(./devel/generate-version)}" - # Set CONDA_SUBDIR unless it's already set. This helps macOS users on - # arm64 chips use and produce osx-64 Conda packages instead of osx-arm64 - # packages (which we don't yet support). - CONDA_SUBDIR="${CONDA_SUBDIR:-$(./devel/conda-subdir)}" - export CONDA_SUBDIR - clean build src lock diff --git a/src/recipe.yaml b/src/recipe.yaml index 0114eeb..a4d460a 100644 --- a/src/recipe.yaml +++ b/src/recipe.yaml @@ -73,15 +73,17 @@ requirements: # gzip is not yet available for arm64 on conda-forge # https://github.com/conda-forge/gzip-feedstock/issues/8 # however gzip is already installed on stock macOS - - gzip # [not arm64] + # We don't seem to support selectors, so temporarily disable gzip globally + # - gzip # [not arm64] - iqtree >=2 - jq - ncbi-datasets-cli - perl - # Pin pulp <2.8 for snakemake: https://github.com/snakemake/snakemake/issues/2607 + # Pin pulp <2.8 for snakemake: https://github.com/snakemake/snakemake/issues/2607 - pulp <2.8 - ruby - seqkit + # TODO: We should avoid pinning too long, this pin was placed in 2023-12-21 - snakemake <8 - tsv-utils - unzip From c5d09d537801120e27109d6e79a8dd345a568449 Mon Sep 17 00:00:00 2001 From: Cornelius Roemer Date: Fri, 12 Jul 2024 16:35:38 +0200 Subject: [PATCH 4/8] switch on x for debugging --- devel/diff-pkgs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/devel/diff-pkgs b/devel/diff-pkgs index f07d44f..eb17c7f 100755 --- a/devel/diff-pkgs +++ b/devel/diff-pkgs @@ -3,7 +3,7 @@ # # Diffs two .conda packages, emitting plain text output which can be treated as # Markdown. -set -euo pipefail +set -exuo pipefail source "$(dirname "$0")/_common" export PATH="$env/bin:$PATH" @@ -51,8 +51,8 @@ diff-deps() { --singular package \ --plural packages \ <(deps "$1") \ - <(deps "$2") \ - | perl -pe 's/^ / /' + <(deps "$2") | + perl -pe 's/^ / /' # ^ Increase default indentation so these blocks render verbatim in Markdown } From 0ff11b47d1892ebc4a462d7a3e26dc9ebf5a0160 Mon Sep 17 00:00:00 2001 From: Cornelius Roemer Date: Fri, 12 Jul 2024 16:47:01 +0200 Subject: [PATCH 5/8] skip diff step on arm --- .github/workflows/ci.yaml | 4 ++++ devel/diff-pkgs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3750b3b..05d84fc 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -88,6 +88,10 @@ jobs: - name: Generate summary run: | + if [[ "$(uname -m)" == "arm64" ]]; then + echo "Skip on arm64 until the package is published" >&2 + exit 0 + fi ./devel/download-latest ./devel/diff-pkgs nextstrain-base-*.conda build/locked/*/nextstrain-base-*.conda \ > "$GITHUB_STEP_SUMMARY" diff --git a/devel/diff-pkgs b/devel/diff-pkgs index eb17c7f..908bfbb 100755 --- a/devel/diff-pkgs +++ b/devel/diff-pkgs @@ -3,7 +3,7 @@ # # Diffs two .conda packages, emitting plain text output which can be treated as # Markdown. -set -exuo pipefail +set -euo pipefail source "$(dirname "$0")/_common" export PATH="$env/bin:$PATH" From 27041953f25141c8216edb8d3ffbd6ea6e1b2a1e Mon Sep 17 00:00:00 2001 From: Cornelius Roemer Date: Fri, 12 Jul 2024 17:06:20 +0200 Subject: [PATCH 6/8] undo errant diff --- devel/diff-pkgs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devel/diff-pkgs b/devel/diff-pkgs index 908bfbb..f07d44f 100755 --- a/devel/diff-pkgs +++ b/devel/diff-pkgs @@ -51,8 +51,8 @@ diff-deps() { --singular package \ --plural packages \ <(deps "$1") \ - <(deps "$2") | - perl -pe 's/^ / /' + <(deps "$2") \ + | perl -pe 's/^ / /' # ^ Increase default indentation so these blocks render verbatim in Markdown } From 05ff02367a51ca24a47c10bde610012ff6f6cb6a Mon Sep 17 00:00:00 2001 From: Cornelius Roemer Date: Wed, 17 Jul 2024 19:48:19 +0200 Subject: [PATCH 7/8] try boa selector --- src/recipe.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/recipe.yaml b/src/recipe.yaml index a4d460a..5d4b8e0 100644 --- a/src/recipe.yaml +++ b/src/recipe.yaml @@ -74,7 +74,10 @@ requirements: # https://github.com/conda-forge/gzip-feedstock/issues/8 # however gzip is already installed on stock macOS # We don't seem to support selectors, so temporarily disable gzip globally - # - gzip # [not arm64] + # TODO: Remove selector once gzip is available for arm64 + # i.e. once https://github.com/conda-forge/gzip-feedstock/pull/9 is merged + - sel(not arm64): + - gzip - iqtree >=2 - jq - ncbi-datasets-cli From 0b2f72d0daeba4ce6a12983272191ddfa2f110ba Mon Sep 17 00:00:00 2001 From: Cornelius Roemer Date: Thu, 18 Jul 2024 20:06:36 +0200 Subject: [PATCH 8/8] gzip now available for osx-arm64 https://github.com/conda-forge/gzip-feedstock/pull/11 --- src/recipe.yaml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/recipe.yaml b/src/recipe.yaml index 5d4b8e0..5eb7bce 100644 --- a/src/recipe.yaml +++ b/src/recipe.yaml @@ -70,14 +70,7 @@ requirements: - epiweeks - git - google-cloud-storage - # gzip is not yet available for arm64 on conda-forge - # https://github.com/conda-forge/gzip-feedstock/issues/8 - # however gzip is already installed on stock macOS - # We don't seem to support selectors, so temporarily disable gzip globally - # TODO: Remove selector once gzip is available for arm64 - # i.e. once https://github.com/conda-forge/gzip-feedstock/pull/9 is merged - - sel(not arm64): - - gzip + - gzip - iqtree >=2 - jq - ncbi-datasets-cli