From 2ff6744e10ed4a642ce31c366f48c53ab03911d5 Mon Sep 17 00:00:00 2001 From: Quentin Grimonprez Date: Sun, 12 Feb 2023 20:51:59 +0100 Subject: [PATCH 1/6] ci: ubuntu latest --- .github/workflows/RMixtComp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/RMixtComp.yml b/.github/workflows/RMixtComp.yml index e79924564..edcc872f6 100644 --- a/.github/workflows/RMixtComp.yml +++ b/.github/workflows/RMixtComp.yml @@ -36,7 +36,7 @@ jobs: fail-fast: false matrix: config: - - {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} + - {os: ubuntu-latest, r: 'release'} env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} R_KEEP_PKG_SOURCE: yes From c9087f57135ece303b87f89c6e3b804733868b1b Mon Sep 17 00:00:00 2001 From: Quentin Grimonprez Date: Sun, 12 Feb 2023 20:52:54 +0100 Subject: [PATCH 2/6] ci: ubuntu-latest --- .github/workflows/RMixtComp-eigen34.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/RMixtComp-eigen34.yml b/.github/workflows/RMixtComp-eigen34.yml index 34e16262f..15574035c 100644 --- a/.github/workflows/RMixtComp-eigen34.yml +++ b/.github/workflows/RMixtComp-eigen34.yml @@ -36,7 +36,7 @@ jobs: fail-fast: false matrix: config: - - {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} + - {os: ubuntu-latest, r: 'release'} env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} R_KEEP_PKG_SOURCE: yes From aafd582f3086a9c27898bd5d3b11f592913f96b7 Mon Sep 17 00:00:00 2001 From: Quentin Grimonprez Date: Mon, 13 Feb 2023 09:24:44 +0100 Subject: [PATCH 3/6] ci: add clang16 action --- .github/workflows/RMixtComp-clang.yml | 156 ++++++++++++++++++++++++ .github/workflows/RMixtComp-eigen34.yml | 2 +- .github/workflows/RMixtComp.yml | 2 +- 3 files changed, 158 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/RMixtComp-clang.yml diff --git a/.github/workflows/RMixtComp-clang.yml b/.github/workflows/RMixtComp-clang.yml new file mode 100644 index 000000000..4e75bdaff --- /dev/null +++ b/.github/workflows/RMixtComp-clang.yml @@ -0,0 +1,156 @@ +name: RMixtComp with clang16 + +on: + push: + branches: + - master + - staging + paths: + - 'MixtComp/**' + - '!MixtComp/docs/**' + - 'RMixtComp/**' + - 'RMixtCompIO/**' + - 'RMixtCompUtilities/**' + - '.github/workflows/RMixtComp-clang.yml' + - '!**/README.md' + pull_request: + branches: + - master + - staging + paths: + - 'MixtComp/**' + - '!MixtComp/docs/**' + - 'RMixtComp/**' + - 'RMixtCompIO/**' + - 'RMixtCompUtilities/**' + - '.github/workflows/RMixtComp-clang.yml' + - '!**/README.md' + +jobs: + R-CMD-check: + runs-on: ubuntu-latest + container: + image: ghcr.io/r-hub/containers/atlas:latest + + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + + steps: + - uses: actions/checkout@v3 + with: + submodules: 'true' + + - uses: r-lib/actions/setup-r@v2 + + - uses: r-lib/actions/setup-pandoc@v2 + + - name: Query dependencies + run: | + install.packages('remotes') + shell: Rscript {0} + + - name: Install system dependencies + if: runner.os == 'Linux' + run: | + while read -r cmd + do + eval sudo $cmd + done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "22.04"))') + + - name: Install RMixtCompIO dependencies + working-directory: RMixtCompIO + run: | + remotes::install_deps(dependencies = TRUE) + remotes::install_cran("rcmdcheck") + shell: Rscript {0} + + - name: Copy MixtComp files + working-directory: RMixtCompIO + run: | + make clean + make updateLib + + - name: Compile Rcpp Attributes for RMixtCompIO + working-directory: RMixtCompIO + env: + _R_CHECK_CRAN_INCOMING_REMOTE_: false + run: Rcpp::compileAttributes() + shell: Rscript {0} + + - name: Check RMixtCompIO + working-directory: RMixtCompIO + env: + _R_CHECK_CRAN_INCOMING_REMOTE_: false + run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check") + shell: Rscript {0} + + - name: Show testthat output + working-directory: RMixtCompIO + if: always() + run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true + shell: bash + + - name: Upload check results + if: failure() + uses: actions/upload-artifact@main + with: + name: ${{ runner.os }}-r${{ matrix.config.r }}-results + path: RMixtCompIO/check + + - name: Install local RMixtCompIO + working-directory: RMixtCompIO + run: R CMD INSTALL --no-multiarch --with-keep.source . + + - name: Install RMixtCompUtilities dependencies + working-directory: RMixtCompUtilities + run: remotes::update_packages(setdiff(remotes::local_package_deps(pkgdir = ".", dependencies = TRUE), "RMixtCompIO")) + shell: Rscript {0} + + - name: Check RMixtCompUtilities + working-directory: RMixtCompUtilities + env: + _R_CHECK_CRAN_INCOMING_REMOTE_: false + run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check") + shell: Rscript {0} + + - name: Show testthat output + working-directory: RMixtCompUtilities + if: always() + run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true + shell: bash + + - name: Upload check results + if: failure() + uses: actions/upload-artifact@main + with: + name: ${{ runner.os }}-r${{ matrix.config.r }}-results + path: RMixtCompUtilities/check + + - name: Install local RMixtCompUtilities + working-directory: RMixtCompUtilities + run: R CMD INSTALL --no-multiarch --with-keep.source . + + - name: Install RMixtComp dependencies + working-directory: RMixtComp + run: remotes::update_packages(setdiff(remotes::local_package_deps(pkgdir = ".", dependencies = TRUE), c("RMixtCompIO", "RMixtCompUtilities"))) + shell: Rscript {0} + + - name: Check RMixtComp + working-directory: RMixtComp + env: + _R_CHECK_CRAN_INCOMING_REMOTE_: false + run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check") + shell: Rscript {0} + + - name: Show testthat output + working-directory: RMixtComp + if: always() + run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true + shell: bash + + - name: Upload check results + if: failure() + uses: actions/upload-artifact@main + with: + name: ${{ runner.os }}-r${{ matrix.config.r }}-results + path: RMixtComp/check diff --git a/.github/workflows/RMixtComp-eigen34.yml b/.github/workflows/RMixtComp-eigen34.yml index 15574035c..4dcd73502 100644 --- a/.github/workflows/RMixtComp-eigen34.yml +++ b/.github/workflows/RMixtComp-eigen34.yml @@ -67,7 +67,7 @@ jobs: while read -r cmd do eval sudo $cmd - done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))') + done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "22.04"))') - name: Install RMixtCompIO dependencies working-directory: RMixtCompIO diff --git a/.github/workflows/RMixtComp.yml b/.github/workflows/RMixtComp.yml index edcc872f6..d95be749e 100644 --- a/.github/workflows/RMixtComp.yml +++ b/.github/workflows/RMixtComp.yml @@ -67,7 +67,7 @@ jobs: while read -r cmd do eval sudo $cmd - done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))') + done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "22.04"))') - name: Install RMixtCompIO dependencies working-directory: RMixtCompIO From deda514fe7c0252a3c379cef7b52cea7ac0a215f Mon Sep 17 00:00:00 2001 From: Quentin Grimonprez Date: Wed, 22 Mar 2023 17:11:49 +0100 Subject: [PATCH 4/6] ci: change image name --- .github/workflows/RMixtComp-clang.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/RMixtComp-clang.yml b/.github/workflows/RMixtComp-clang.yml index 4e75bdaff..8e0d90d69 100644 --- a/.github/workflows/RMixtComp-clang.yml +++ b/.github/workflows/RMixtComp-clang.yml @@ -30,7 +30,7 @@ jobs: R-CMD-check: runs-on: ubuntu-latest container: - image: ghcr.io/r-hub/containers/atlas:latest + image: ghcr.io/r-hub/containers/clang16:latest env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} From 62f6555e5a69ab6124bd1939a9c4055c7b91918d Mon Sep 17 00:00:00 2001 From: Quentin Grimonprez Date: Wed, 22 Mar 2023 17:16:38 +0100 Subject: [PATCH 5/6] ci: install git --- .github/workflows/RMixtComp-clang.yml | 100 ++------------------------ 1 file changed, 6 insertions(+), 94 deletions(-) diff --git a/.github/workflows/RMixtComp-clang.yml b/.github/workflows/RMixtComp-clang.yml index 8e0d90d69..4977003c6 100644 --- a/.github/workflows/RMixtComp-clang.yml +++ b/.github/workflows/RMixtComp-clang.yml @@ -36,6 +36,9 @@ jobs: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: + - name: Install xmllint + run: sudo apt-get install -y git + - uses: actions/checkout@v3 with: submodules: 'true' @@ -44,25 +47,9 @@ jobs: - uses: r-lib/actions/setup-pandoc@v2 - - name: Query dependencies + - name: Install dependencies run: | - install.packages('remotes') - shell: Rscript {0} - - - name: Install system dependencies - if: runner.os == 'Linux' - run: | - while read -r cmd - do - eval sudo $cmd - done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "22.04"))') - - - name: Install RMixtCompIO dependencies - working-directory: RMixtCompIO - run: | - remotes::install_deps(dependencies = TRUE) - remotes::install_cran("rcmdcheck") - shell: Rscript {0} + R -q -e 'pak::pkg_install(c("deps::.", "any::rcmdcheck"), dependencies = TRUE)' - name: Copy MixtComp files working-directory: RMixtCompIO @@ -77,80 +64,5 @@ jobs: run: Rcpp::compileAttributes() shell: Rscript {0} - - name: Check RMixtCompIO - working-directory: RMixtCompIO - env: - _R_CHECK_CRAN_INCOMING_REMOTE_: false - run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check") - shell: Rscript {0} - - - name: Show testthat output - working-directory: RMixtCompIO - if: always() - run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true - shell: bash - - - name: Upload check results - if: failure() - uses: actions/upload-artifact@main - with: - name: ${{ runner.os }}-r${{ matrix.config.r }}-results - path: RMixtCompIO/check - - - name: Install local RMixtCompIO - working-directory: RMixtCompIO - run: R CMD INSTALL --no-multiarch --with-keep.source . - - - name: Install RMixtCompUtilities dependencies - working-directory: RMixtCompUtilities - run: remotes::update_packages(setdiff(remotes::local_package_deps(pkgdir = ".", dependencies = TRUE), "RMixtCompIO")) - shell: Rscript {0} - - - name: Check RMixtCompUtilities - working-directory: RMixtCompUtilities - env: - _R_CHECK_CRAN_INCOMING_REMOTE_: false - run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check") - shell: Rscript {0} - - - name: Show testthat output - working-directory: RMixtCompUtilities - if: always() - run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true - shell: bash - - - name: Upload check results - if: failure() - uses: actions/upload-artifact@main - with: - name: ${{ runner.os }}-r${{ matrix.config.r }}-results - path: RMixtCompUtilities/check - - - name: Install local RMixtCompUtilities - working-directory: RMixtCompUtilities - run: R CMD INSTALL --no-multiarch --with-keep.source . - - - name: Install RMixtComp dependencies - working-directory: RMixtComp - run: remotes::update_packages(setdiff(remotes::local_package_deps(pkgdir = ".", dependencies = TRUE), c("RMixtCompIO", "RMixtCompUtilities"))) - shell: Rscript {0} - - - name: Check RMixtComp - working-directory: RMixtComp - env: - _R_CHECK_CRAN_INCOMING_REMOTE_: false - run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check") - shell: Rscript {0} - - name: Show testthat output - working-directory: RMixtComp - if: always() - run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true - shell: bash - - - name: Upload check results - if: failure() - uses: actions/upload-artifact@main - with: - name: ${{ runner.os }}-r${{ matrix.config.r }}-results - path: RMixtComp/check + - uses: r-lib/actions/check-r-package@v2 From 88b527dd6354536e4fc0845aa7f0454fc26c64fb Mon Sep 17 00:00:00 2001 From: Quentin Grimonprez Date: Wed, 22 Mar 2023 17:21:01 +0100 Subject: [PATCH 6/6] ci: submodule checkout --- .github/workflows/RMixtComp-clang.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/RMixtComp-clang.yml b/.github/workflows/RMixtComp-clang.yml index 4977003c6..247fef871 100644 --- a/.github/workflows/RMixtComp-clang.yml +++ b/.github/workflows/RMixtComp-clang.yml @@ -36,12 +36,12 @@ jobs: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - - name: Install xmllint - run: sudo apt-get install -y git - uses: actions/checkout@v3 - with: - submodules: 'true' + + - name: Checkout submodules + run: | + git submodule update --init --recursive - uses: r-lib/actions/setup-r@v2