Fix consensus_tree segfault on arm64 by implementing dynamic stack/heap allocation #1469
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag. | |
| # https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 4 * * 4' # Thursdays, 4am | |
| push: | |
| branches: | |
| - main | |
| - master | |
| paths-ignore: | |
| - "Meta**" | |
| - "memcheck**" | |
| - "docs**" | |
| - "**.git" | |
| - "**.json" | |
| - "**.md" | |
| - "**.yaml" | |
| - "**.yml" | |
| - "!**R-CMD-check.yml" | |
| - "**.R[dD]ata" | |
| - "**.Rpro*" | |
| pull_request: | |
| branches: | |
| - main | |
| - master | |
| paths-ignore: | |
| - "Meta**" | |
| - "memcheck**" | |
| - "docs**" | |
| - "**.git" | |
| - "**.json" | |
| - "**.md" | |
| - "**.yaml" | |
| - "**.yml" | |
| - "!**R-CMD-check.yml" | |
| - "**.R[dD]ata" | |
| - "**.Rpro*" | |
| name: R-CMD-check | |
| jobs: | |
| check-release: | |
| runs-on: ubuntu-24.04 | |
| name: ubuntu-24.04 (release) | |
| env: | |
| _R_CHECK_CRAN_INCOMING_: true # Seemingly not set by --as-cran | |
| _R_CHECK_FORCE_SUGGESTS_: false # CRAN settings | |
| R_COMPILE_AND_INSTALL_PACKAGES: 'never' | |
| _R_CHECK_THINGS_IN_CHECK_DIR_: false | |
| R_REMOTES_STANDALONE: true | |
| R_REMOTES_NO_ERRORS_FROM_WARNINGS: true | |
| RSPM: "https://packagemanager.posit.co/cran/__linux__/noble/latest" | |
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - name: Checkout git repo | |
| uses: actions/checkout@v5 | |
| - name: Temporarily bump package version | |
| run: | | |
| old_version=$(grep "Version:" DESCRIPTION | awk '{print $2}') | |
| if [[ $(echo "$old_version" | tr -cd '.' | wc -c) -eq 2 ]]; then | |
| new_version="${old_version}.8888" | |
| if [[ "$RUNNER_OS" == "macOS" ]]; then | |
| sed -i "" "s/Version: .*/Version: ${new_version}/" DESCRIPTION | |
| else | |
| sed -i "s/Version: .*/Version: ${new_version}/" DESCRIPTION | |
| fi | |
| fi | |
| shell: bash | |
| - name: Set up R | |
| uses: r-lib/actions/setup-r@v2 | |
| - name: Set up R dependencies | |
| uses: r-lib/actions/setup-r-dependencies@v2 | |
| with: | |
| needs: | | |
| check | |
| - name: Check package | |
| uses: r-lib/actions/check-r-package@v2 | |
| check-all: | |
| runs-on: ${{ matrix.config.os }} | |
| name: ${{ matrix.config.os }} (${{ matrix.config.r }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - {os: windows-latest, r: "release"} | |
| - {os: macos-15-intel, r: "release"} # Until Intel architecture retired 2027-11 | |
| - {os: macOS-latest, r: "release"} | |
| - {os: ubuntu-24.04-arm, r: "release", rspm: "https://packagemanager.posit.co/cran/__linux__/noble/latest"} | |
| - {os: ubuntu-24.04, r: "3.6", rspm: "https://packagemanager.posit.co/cran/2022-10-11"} | |
| - {os: ubuntu-24.04, r: "4.0", rspm: "https://packagemanager.posit.co/cran/2022-10-11"} | |
| - {os: ubuntu-24.04, r: "devel", rspm: "https://packagemanager.posit.co/cran/__linux__/noble/latest"} | |
| env: | |
| _R_CHECK_CRAN_INCOMING_: ${{ github.event_name == 'pull_request' }} | |
| _R_CHECK_FORCE_SUGGESTS_: false # CRAN settings | |
| R_COMPILE_AND_INSTALL_PACKAGES: 'never' | |
| _R_CHECK_THINGS_IN_CHECK_DIR_: false | |
| R_REMOTES_STANDALONE: true | |
| R_REMOTES_NO_ERRORS_FROM_WARNINGS: true | |
| R_REALLY_FORCE_SYMBOLS: true # Until R4.3 | |
| _R_CHECK_CRAN_INCOMING_USE_ASPELL_: false # Set to true when can figure how to install aspell on Windows | |
| RSPM: ${{ matrix.config.rspm }} | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - name: Checkout git repo | |
| uses: actions/checkout@v5 | |
| - name: Temporarily bump package version | |
| run: | | |
| old_version=$(grep "Version:" DESCRIPTION | awk '{print $2}') | |
| if [[ $(echo "$old_version" | tr -cd '.' | wc -c) -eq 2 ]]; then | |
| new_version="${old_version}.9999" | |
| if [[ "$RUNNER_OS" == "macOS" ]]; then | |
| sed -i "" "s/Version: .*/Version: ${new_version}/" DESCRIPTION | |
| else | |
| sed -i "s/Version: .*/Version: ${new_version}/" DESCRIPTION | |
| fi | |
| fi | |
| echo "Current package version is now: $(grep "Version:" DESCRIPTION | awk '{print $2}')" | |
| shell: bash | |
| - name: Set up R | |
| uses: r-lib/actions/setup-r@v2 | |
| with: | |
| r-version: ${{ matrix.config.r }} | |
| - name: Install apt packages | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get install texlive-latex-base texlive-fonts-recommended | |
| - name: Install system dependencies (R 3.x) | |
| if: matrix.config.r < '4.0' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libpng-dev \ | |
| libfreetype6-dev \ | |
| libjpeg-dev \ | |
| libxml2-dev \ | |
| libharfbuzz-dev \ | |
| libfribidi-dev | |
| - name: Install system dependencies (R 4.0) | |
| if: matrix.config.r == '4.0' && runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libgsl-dev \ | |
| libpng-dev \ | |
| libfreetype6-dev \ | |
| libjpeg-dev \ | |
| libxml2-dev \ | |
| libharfbuzz-dev \ | |
| libfribidi-dev | |
| - name: Force C++17 (R 4.0) | |
| if: matrix.config.r == '4.0' && runner.os == 'Linux' | |
| run: | | |
| mkdir -p ~/.R | |
| echo "CXX14STD = -std=gnu++17" >> ~/.R/Makevars | |
| echo "CXX17STD = -std=gnu++17" >> ~/.R/Makevars | |
| - name: Install vdiffr dependencies (R 4.0) | |
| if: matrix.config.r == '4.0' && runner.os == 'Linux' | |
| run: | | |
| Rscript -e "install.packages(c('diffobj','glue','htmltools','lifecycle','rlang','testthat','xml2','cpp11'), repos = 'https://packagemanager.posit.co/cran/2022-10-11')" | |
| - name: Install vdiffr patched (R 4.0) | |
| if: matrix.config.r == '4.0' && runner.os == 'Linux' | |
| run: | | |
| git clone --branch v1.0.4 https://github.com/r-lib/vdiffr.git vdiffr-src | |
| sed -i '1i#include <cstdint>' vdiffr-src/src/devSVG.cpp | |
| R CMD INSTALL --preclean --no-multiarch --with-keep.source vdiffr-src | |
| rm -rf vdiffr-src | |
| - name: Install vdiffr dependencies (R 3.x) | |
| if: matrix.config.r < '4.0' | |
| run: | | |
| Rscript -e "install.packages(c('diffobj','glue','htmltools','lifecycle','rlang','testthat','xml2','cpp11', 'rcmdcheck'), repos = 'https://packagemanager.posit.co/cran/2022-04-01')" | |
| - name: Install vdiffr patched (R 3.x) | |
| if: matrix.config.r < '4.0' | |
| run: | | |
| git clone --branch v1.0.0 https://github.com/r-lib/vdiffr.git vdiffr-src | |
| sed -i '1i#include <cstdint>' vdiffr-src/src/devSVG.cpp | |
| R CMD INSTALL --preclean --no-multiarch --with-keep.source vdiffr-src | |
| rm -rf vdiffr-src | |
| - name: Set up R dependencies (R 3.x) | |
| if: matrix.config.r < '4.0' | |
| uses: r-lib/actions/setup-r-dependencies@v2 | |
| with: | |
| dependencies: '"hard"' | |
| extra-packages: | |
| github::ms609/PlotTools@v0.3.1 | |
| rcmdcheck@1.3.3 | |
| waldo@0.4.0 | |
| testthat@3.1.5 | |
| pkgload@1.2.4 | |
| pkgdown@2.0.1 | |
| bslib@0.3.1 | |
| R6@2.5.1 | |
| xfun@0.28 | |
| knitr@1.33 | |
| tinytex@0.33 | |
| rmarkdown@2.10 | |
| sp@1.4-5 | |
| phangorn=?ignore-before-r=4.1.0 | |
| - name: Set up R dependencies (Windows) | |
| if: runner.os == 'Windows' | |
| uses: r-lib/actions/setup-r-dependencies@v2 | |
| with: | |
| needs: | | |
| check | |
| coverage | |
| - name: Set up R dependencies (Non-Windows) | |
| if: ${{runner.os != 'Windows' && matrix.config.r >= '4.0' }} | |
| uses: r-lib/actions/setup-r-dependencies@v2 | |
| with: | |
| needs: | | |
| check | |
| extra-packages: | | |
| TreeDist=?ignore-before-r=4.0.0 | |
| TreeSearch=?ignore-before-r=4.1.0 | |
| vdiffr=?ignore-before-r=4.1.0 | |
| phangorn=?ignore-before-r=4.1.0 | |
| - name: Check package | |
| uses: r-lib/actions/check-r-package@v2 | |
| - name: Code coverage | |
| if: runner.os == 'Windows' | |
| run: | | |
| covr::codecov() | |
| shell: Rscript {0} | |
| - name: Notify on failure | |
| if: failure() && github.event_name == 'schedule' | |
| uses: actions/github-script@v7 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: 170, | |
| body: 'Scheduled workflow has failed: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' | |
| }); | |
| await github.rest.issues.update({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: 170, | |
| state: 'open' | |
| }); | |
| rev-dep-check: | |
| runs-on: ubuntu-latest | |
| needs: check-release | |
| name: revdepcheck | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - {deps: '"Depends"'} | |
| - {deps: '"Suggests"'} | |
| - {deps: '"Imports"'} | |
| - {deps: '"LinkingTo"'} | |
| env: | |
| _R_CHECK_CRAN_INCOMING_: false | |
| _R_CHECK_FORCE_SUGGESTS_: false # CRAN settings | |
| R_COMPILE_AND_INSTALL_PACKAGES: 'never' | |
| _R_CHECK_THINGS_IN_CHECK_DIR_: false | |
| R_REMOTES_STANDALONE: true | |
| R_REMOTES_NO_ERRORS_FROM_WARNINGS: true | |
| RSPM: ${{ matrix.config.rspm }} | |
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - uses: ms609/actions/revdepcheck@main | |
| with: | |
| deps: ${{ matrix.config.deps }} |