Calculate power for int64 exponent precisely #1145
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
| # Workflow derived from https://github.com/r-lib/actions/tree/v2/examples | |
| # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help | |
| on: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| name: R-CMD-check.yaml | |
| permissions: read-all | |
| jobs: | |
| changes: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| src: ${{ steps.filter.outputs.src }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dorny/paths-filter@v2 | |
| id: filter | |
| with: | |
| filters: | | |
| src: | |
| - 'src/**' | |
| R-CMD-check: | |
| runs-on: ${{ matrix.config.os }} | |
| name: ${{ matrix.config.os }} (${{ matrix.config.r }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - {os: macos-latest, r: 'release'} | |
| - {os: windows-latest, r: 'release'} | |
| - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} | |
| - {os: ubuntu-latest, r: 'release'} | |
| - {os: ubuntu-latest, r: 'oldrel-1'} | |
| env: | |
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
| R_KEEP_PKG_SOURCE: yes | |
| _R_CHECK_RD_CONTENTS_VALUE_: 1 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: r-lib/actions/setup-pandoc@v2 | |
| - uses: r-lib/actions/setup-r@v2 | |
| with: | |
| r-version: ${{ matrix.config.r }} | |
| http-user-agent: ${{ matrix.config.http-user-agent }} | |
| use-public-rspm: true | |
| - uses: r-lib/actions/setup-r-dependencies@v2 | |
| with: | |
| extra-packages: any::rcmdcheck | |
| needs: check | |
| - uses: r-lib/actions/check-r-package@v2 | |
| with: | |
| upload-snapshots: true | |
| build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")' | |
| clang-ASAN: | |
| needs: changes | |
| if: ${{ needs.changes.outputs.src == 'true' }} | |
| name: "Minimal clang-ASAN" | |
| runs-on: ubuntu-latest | |
| container: rocker/r-devel-ubsan-clang | |
| env: | |
| _R_CHECK_TESTS_NLINES_: 0 | |
| ASAN_OPTIONS: 'detect_leaks=0:halt_on_error=1' | |
| UBSAN_OPTIONS: 'print_stacktrace=1:halt_on_error=1' | |
| CC: "clang -fsanitize=address,undefined -fno-omit-frame-pointer" | |
| CXX: "clang++ -fsanitize=address,undefined -fno-omit-frame-pointer" | |
| CFLAGS: "-g -O3" | |
| CXXFLAGS: "-g -O3" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up ASAN | |
| run: echo "LD_PRELOAD=$(clang -print-file-name=libclang_rt.asan-x86_64.so)" >> $GITHUB_ENV | |
| - name: Install dependencies | |
| run: | | |
| apt-get update && apt-get install -y libuv1-dev | |
| mkdir -p ~/.R | |
| echo "CC=$CC" >> ~/.R/Makevars | |
| echo "CXX=$CXX" >> ~/.R/Makevars | |
| echo "CFLAGS=$CFLAGS" >> ~/.R/Makevars | |
| echo "CXXFLAGS=$CXXFLAGS" >> ~/.R/Makevars | |
| Rscript -e 'install.packages("remotes", repos="https://cloud.r-project.org"); remotes::install_deps(dependencies = TRUE, type = "source")' | |
| - name: Build and Check | |
| run: | | |
| R CMD build . | |
| R CMD check bit64_*.tar.gz --as-cran --no-manual --no-vignettes | |
| test-ancient: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: r-lib/actions/setup-pandoc@v2 | |
| - uses: r-lib/actions/setup-r@v2 | |
| with: | |
| r-version: '3.6.0' | |
| - name: Install bit64 and dependencies | |
| run: | | |
| Rscript -e 'options(repos = "https://cloud.r-project.org"); install.packages("bit")' | |
| R CMD INSTALL . | |
| cp .devcontainer/r-360/.Rprofile . | |
| - name: Run Tests | |
| shell: bash | |
| run: | | |
| EXIT_CODE=0 | |
| for FILE in tests/testthat/test-*.R; do | |
| echo "----------------------------------------------------------------" | |
| echo "Running $FILE" | |
| sed -E "s/(patrick|withr):://g" "$FILE" > "${FILE}_SHIMMED.R" | |
| Rscript -e "library(methods); suppressWarnings(suppressMessages(library(bit64))); source('tests/testthat/helper.R'); source('${FILE}_SHIMMED.R')" | |
| rm "${FILE}_SHIMMED.R" | |
| # Capture failure | |
| if [ $? -ne 0 ]; then | |
| EXIT_CODE=1 | |
| fi | |
| done | |
| exit $EXIT_CODE |