From 089a5d87a1fcd211876a8ca671c4d1e837306bec Mon Sep 17 00:00:00 2001 From: "dyfan.jones" Date: Wed, 19 Jul 2023 10:37:48 +0100 Subject: [PATCH 01/24] Initial pre-built binaries --- .github/workflows/packaging.yaml | 89 ++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 .github/workflows/packaging.yaml diff --git a/.github/workflows/packaging.yaml b/.github/workflows/packaging.yaml new file mode 100644 index 000000000..da24c43e9 --- /dev/null +++ b/.github/workflows/packaging.yaml @@ -0,0 +1,89 @@ +name: Packaging + +on: + schedule: + # At 12:00, on day 10 of the month, every 4 months + # Giving 10 days for paws regen to be approved + - cron: "0 12 10 */4 *" + workflow_dispatch: + inputs: + text_to_print: + description: "Manual re-build" + +jobs: + binaries: + runs-on: ${{ matrix.config.runner }} + container: ${{ matrix.container }} + strategy: + fail-fast: false + matrix: + + config: + - {r_version: 'release', os: macOS, version: cpu-intel, runner: macOS-latest} + # - {r_version: '', os: macOS, version: cpu-m1, runner: [self-hosted, m1]} + - {r_version: 'release', os: ubuntu, runner: ubuntu-latest} + - {r_version: 'release', os: windows, runner: windows-latest} + + include: + - config: {os: ubuntu} + type: 'source' + r_install_tar: "tar" + + - config: {os: windows} + type: 'win.binary' + r_install_tar: "" + + - config: {os: macOS} + type: 'mac.binary' + r_install_tar: "" + + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_REGION: ${{ secrets.AWS_REGION }} + R_INSTALL_TAR: ${{ matrix.r_install_tar }} + + steps: + + - uses: actions/checkout@v3 + + - uses: ./.github/actions/setup-r + with: + r_version: ${{ matrix.config.r_version}} + makevars: true + + - name: Install System Dependencies + run: | + sudo apt-get update + sudo apt-get install -y libcurl4-openssl-dev libssl-dev libxml2-dev libgit2-dev + sudo apt-get install -y libharfbuzz-dev libfribidi-dev + + - name: Install Paws Dependencies + run: | + install.packages(c('remotes', 'pkgbuild', 'desc')) + remotes::install_deps('paws.common', dependencies = TRUE) + remotes::install_deps('make.paws', dependencies = TRUE) + shell: Rscript {0} + + - name: Install Paws Packages + run: | + remotes::install_local('paws.common', force = TRUE) + remotes::install_local('make.paws', force = TRUE) + shell: Rscript {0} + + - name: Build binary package + id: build + run: | + dest_path <- contrib.url("binaries", type="binary") + dir.create(dest_path, recursive = TRUE) + pkgs <- make.paws:::list_paws_pkgs("cran") + for (pkg in pkgs) { + binary_path <- pkgbuild::build(path = pkg, binary = TRUE, dest_path=dest_path) + tools::write_PACKAGES(dest_path, type = "${{ matrix.type }}", addFiles = TRUE) + } + cat("pkg_version=", desc::desc_get("Version", "cran/paws"), "\n", sep="", file = Sys.getenv("GITHUB_OUTPUT")) + shell: Rscript {0} + + - name: 'upload-file' + run: + aws s3 sync "../binaries" "s3://paws-r-builds/packages/${{ matrix.config.version }}/${{ steps.build.outputs.pkg_version }}/" --quiet From 05a423f09d153f98792044cf2eab975415fdac0f Mon Sep 17 00:00:00 2001 From: "dyfan.jones" Date: Wed, 19 Jul 2023 10:47:30 +0100 Subject: [PATCH 02/24] use r-lib action to set up R --- .github/workflows/packaging.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/packaging.yaml b/.github/workflows/packaging.yaml index da24c43e9..e5de8bd83 100644 --- a/.github/workflows/packaging.yaml +++ b/.github/workflows/packaging.yaml @@ -47,10 +47,12 @@ jobs: - uses: actions/checkout@v3 - - uses: ./.github/actions/setup-r + - name: Install R + uses: r-lib/actions/setup-r@v2 + + - uses: r-lib/actions/setup-pandoc@v2 with: - r_version: ${{ matrix.config.r_version}} - makevars: true + pandoc-version: "2.17.1" - name: Install System Dependencies run: | From f04ae555e492a7844a5b6dad8606d14d064b174f Mon Sep 17 00:00:00 2001 From: "dyfan.jones" Date: Wed, 19 Jul 2023 10:59:02 +0100 Subject: [PATCH 03/24] os installs --- .github/workflows/packaging.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/packaging.yaml b/.github/workflows/packaging.yaml index e5de8bd83..eaf5287fc 100644 --- a/.github/workflows/packaging.yaml +++ b/.github/workflows/packaging.yaml @@ -55,6 +55,8 @@ jobs: pandoc-version: "2.17.1" - name: Install System Dependencies + if: runner.os == 'ubuntu' + shell: bash run: | sudo apt-get update sudo apt-get install -y libcurl4-openssl-dev libssl-dev libxml2-dev libgit2-dev From ddfb03cd0d3d82e7a8c373c9d1e3aed633a91895 Mon Sep 17 00:00:00 2001 From: "dyfan.jones" Date: Wed, 19 Jul 2023 11:09:36 +0100 Subject: [PATCH 04/24] remove dependency --- .github/workflows/packaging.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/packaging.yaml b/.github/workflows/packaging.yaml index eaf5287fc..722928787 100644 --- a/.github/workflows/packaging.yaml +++ b/.github/workflows/packaging.yaml @@ -64,7 +64,7 @@ jobs: - name: Install Paws Dependencies run: | - install.packages(c('remotes', 'pkgbuild', 'desc')) + install.packages(c('remotes', 'pkgbuild')) remotes::install_deps('paws.common', dependencies = TRUE) remotes::install_deps('make.paws', dependencies = TRUE) shell: Rscript {0} @@ -85,7 +85,8 @@ jobs: binary_path <- pkgbuild::build(path = pkg, binary = TRUE, dest_path=dest_path) tools::write_PACKAGES(dest_path, type = "${{ matrix.type }}", addFiles = TRUE) } - cat("pkg_version=", desc::desc_get("Version", "cran/paws"), "\n", sep="", file = Sys.getenv("GITHUB_OUTPUT")) + paws_version <- gsub("Version:[ ]+", "", readLines("cran/paws/DESCRIPTION", n = 3)[3]) + cat("pkg_version=", paws_version, "\n", sep="", file = Sys.getenv("GITHUB_OUTPUT")) shell: Rscript {0} - name: 'upload-file' From b4e5e07fe17bf35b3e1e54ff15cdc7dd5d4acf66 Mon Sep 17 00:00:00 2001 From: "dyfan.jones" Date: Wed, 19 Jul 2023 11:13:10 +0100 Subject: [PATCH 05/24] add github pat --- .github/workflows/packaging.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/packaging.yaml b/.github/workflows/packaging.yaml index 722928787..578fac78e 100644 --- a/.github/workflows/packaging.yaml +++ b/.github/workflows/packaging.yaml @@ -38,6 +38,7 @@ jobs: r_install_tar: "" env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} AWS_REGION: ${{ secrets.AWS_REGION }} From a045f945ed6a5100ee7170daf621e8ddd2506d53 Mon Sep 17 00:00:00 2001 From: "dyfan.jones" Date: Wed, 19 Jul 2023 11:48:48 +0100 Subject: [PATCH 06/24] fix runner os --- .github/workflows/packaging.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/packaging.yaml b/.github/workflows/packaging.yaml index 578fac78e..24d6984ad 100644 --- a/.github/workflows/packaging.yaml +++ b/.github/workflows/packaging.yaml @@ -56,7 +56,7 @@ jobs: pandoc-version: "2.17.1" - name: Install System Dependencies - if: runner.os == 'ubuntu' + if: runner.os == 'Linux' shell: bash run: | sudo apt-get update @@ -81,7 +81,7 @@ jobs: run: | dest_path <- contrib.url("binaries", type="binary") dir.create(dest_path, recursive = TRUE) - pkgs <- make.paws:::list_paws_pkgs("cran") + pkgs <- sort(make.paws:::list_paws_pkgs("cran"), decreasing = T) for (pkg in pkgs) { binary_path <- pkgbuild::build(path = pkg, binary = TRUE, dest_path=dest_path) tools::write_PACKAGES(dest_path, type = "${{ matrix.type }}", addFiles = TRUE) From 087daebb0092279f340d38f30cbdb80f2229fabc Mon Sep 17 00:00:00 2001 From: "dyfan.jones" Date: Wed, 19 Jul 2023 12:10:21 +0100 Subject: [PATCH 07/24] fix directory path --- .github/workflows/packaging.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/packaging.yaml b/.github/workflows/packaging.yaml index 24d6984ad..0d94410a3 100644 --- a/.github/workflows/packaging.yaml +++ b/.github/workflows/packaging.yaml @@ -79,7 +79,7 @@ jobs: - name: Build binary package id: build run: | - dest_path <- contrib.url("binaries", type="binary") + dest_path <- contrib.url("../binaries", type="binary") dir.create(dest_path, recursive = TRUE) pkgs <- sort(make.paws:::list_paws_pkgs("cran"), decreasing = T) for (pkg in pkgs) { From 315ad42e63ac0ead2afcad6106dd7e008c7496f3 Mon Sep 17 00:00:00 2001 From: "dyfan.jones" Date: Wed, 19 Jul 2023 12:42:17 +0100 Subject: [PATCH 08/24] install paws --- .github/workflows/packaging.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/packaging.yaml b/.github/workflows/packaging.yaml index 0d94410a3..5506cface 100644 --- a/.github/workflows/packaging.yaml +++ b/.github/workflows/packaging.yaml @@ -74,6 +74,7 @@ jobs: run: | remotes::install_local('paws.common', force = TRUE) remotes::install_local('make.paws', force = TRUE) + make.paws::paws_install("cran") shell: Rscript {0} - name: Build binary package From a8e0f5f152f69e5a29f6fabb9693df19c0f820e2 Mon Sep 17 00:00:00 2001 From: "dyfan.jones" Date: Wed, 19 Jul 2023 14:49:22 +0100 Subject: [PATCH 09/24] ensure object are public accessible --- .github/workflows/packaging.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/packaging.yaml b/.github/workflows/packaging.yaml index 5506cface..8aa24e761 100644 --- a/.github/workflows/packaging.yaml +++ b/.github/workflows/packaging.yaml @@ -80,17 +80,19 @@ jobs: - name: Build binary package id: build run: | - dest_path <- contrib.url("../binaries", type="binary") + pkgs <- make.paws:::list_paws_pkgs("cran") + dest_path <- contrib.url("binaries", type="binary") dir.create(dest_path, recursive = TRUE) - pkgs <- sort(make.paws:::list_paws_pkgs("cran"), decreasing = T) + for (pkg in pkgs) { binary_path <- pkgbuild::build(path = pkg, binary = TRUE, dest_path=dest_path) tools::write_PACKAGES(dest_path, type = "${{ matrix.type }}", addFiles = TRUE) } paws_version <- gsub("Version:[ ]+", "", readLines("cran/paws/DESCRIPTION", n = 3)[3]) cat("pkg_version=", paws_version, "\n", sep="", file = Sys.getenv("GITHUB_OUTPUT")) + shell: Rscript {0} - name: 'upload-file' run: - aws s3 sync "../binaries" "s3://paws-r-builds/packages/${{ matrix.config.version }}/${{ steps.build.outputs.pkg_version }}/" --quiet + aws s3 sync "../binaries" "s3://paws-r-builds/packages/${{ steps.build.outputs.pkg_version }}/" --acl public-read --quiet From a8151b15e4bacdb1f7c344251ff04ad015ed2a93 Mon Sep 17 00:00:00 2001 From: "dyfan.jones" Date: Wed, 19 Jul 2023 15:45:30 +0100 Subject: [PATCH 10/24] fix path --- .github/workflows/packaging.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/packaging.yaml b/.github/workflows/packaging.yaml index 8aa24e761..69d84190d 100644 --- a/.github/workflows/packaging.yaml +++ b/.github/workflows/packaging.yaml @@ -81,7 +81,7 @@ jobs: id: build run: | pkgs <- make.paws:::list_paws_pkgs("cran") - dest_path <- contrib.url("binaries", type="binary") + dest_path <- contrib.url("../binaries", type="binary") dir.create(dest_path, recursive = TRUE) for (pkg in pkgs) { From 9a245eb64b5fb163c0eb0330f0584f273bb6dada Mon Sep 17 00:00:00 2001 From: "dyfan.jones" Date: Wed, 19 Jul 2023 16:00:39 +0100 Subject: [PATCH 11/24] breakdown install --- .github/workflows/packaging.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/packaging.yaml b/.github/workflows/packaging.yaml index 69d84190d..a04f8b93a 100644 --- a/.github/workflows/packaging.yaml +++ b/.github/workflows/packaging.yaml @@ -70,10 +70,14 @@ jobs: remotes::install_deps('make.paws', dependencies = TRUE) shell: Rscript {0} - - name: Install Paws Packages + - name: Install Paws Build Components run: | remotes::install_local('paws.common', force = TRUE) remotes::install_local('make.paws', force = TRUE) + shell: Rscript {0} + + - name: Install Paws + run: | make.paws::paws_install("cran") shell: Rscript {0} From 1850053e79abbc40aa1d7cdb772db39ffbedf003 Mon Sep 17 00:00:00 2001 From: "dyfan.jones" Date: Wed, 19 Jul 2023 16:25:01 +0100 Subject: [PATCH 12/24] slim down dependencies --- .github/workflows/packaging.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/packaging.yaml b/.github/workflows/packaging.yaml index a04f8b93a..0f7d6c3a9 100644 --- a/.github/workflows/packaging.yaml +++ b/.github/workflows/packaging.yaml @@ -66,12 +66,6 @@ jobs: - name: Install Paws Dependencies run: | install.packages(c('remotes', 'pkgbuild')) - remotes::install_deps('paws.common', dependencies = TRUE) - remotes::install_deps('make.paws', dependencies = TRUE) - shell: Rscript {0} - - - name: Install Paws Build Components - run: | remotes::install_local('paws.common', force = TRUE) remotes::install_local('make.paws', force = TRUE) shell: Rscript {0} From 51026454b9e4ca9b408017ae92c667196deb3227 Mon Sep 17 00:00:00 2001 From: "dyfan.jones" Date: Wed, 19 Jul 2023 16:33:41 +0100 Subject: [PATCH 13/24] fix --- .github/workflows/packaging.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/packaging.yaml b/.github/workflows/packaging.yaml index 0f7d6c3a9..b425df837 100644 --- a/.github/workflows/packaging.yaml +++ b/.github/workflows/packaging.yaml @@ -57,7 +57,6 @@ jobs: - name: Install System Dependencies if: runner.os == 'Linux' - shell: bash run: | sudo apt-get update sudo apt-get install -y libcurl4-openssl-dev libssl-dev libxml2-dev libgit2-dev @@ -66,8 +65,8 @@ jobs: - name: Install Paws Dependencies run: | install.packages(c('remotes', 'pkgbuild')) - remotes::install_local('paws.common', force = TRUE) - remotes::install_local('make.paws', force = TRUE) + remotes::install_local('paws.common') + remotes::install_local('make.paws') shell: Rscript {0} - name: Install Paws From 82f6359187a61928d39134cc21677c92c91da266 Mon Sep 17 00:00:00 2001 From: "dyfan.jones" Date: Wed, 19 Jul 2023 16:45:23 +0100 Subject: [PATCH 14/24] update apt-get --- .github/workflows/packaging.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/packaging.yaml b/.github/workflows/packaging.yaml index b425df837..1cdb1271f 100644 --- a/.github/workflows/packaging.yaml +++ b/.github/workflows/packaging.yaml @@ -61,6 +61,7 @@ jobs: sudo apt-get update sudo apt-get install -y libcurl4-openssl-dev libssl-dev libxml2-dev libgit2-dev sudo apt-get install -y libharfbuzz-dev libfribidi-dev + sudo apt-get install ca-certificates - name: Install Paws Dependencies run: | From c0f28f46d6d900f6a91a06bb6e438e41aff641bc Mon Sep 17 00:00:00 2001 From: "dyfan.jones" Date: Wed, 19 Jul 2023 17:30:03 +0100 Subject: [PATCH 15/24] slim line dependencies --- .github/workflows/packaging.yaml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/packaging.yaml b/.github/workflows/packaging.yaml index 1cdb1271f..4312b7506 100644 --- a/.github/workflows/packaging.yaml +++ b/.github/workflows/packaging.yaml @@ -61,24 +61,30 @@ jobs: sudo apt-get update sudo apt-get install -y libcurl4-openssl-dev libssl-dev libxml2-dev libgit2-dev sudo apt-get install -y libharfbuzz-dev libfribidi-dev - sudo apt-get install ca-certificates - name: Install Paws Dependencies run: | install.packages(c('remotes', 'pkgbuild')) - remotes::install_local('paws.common') - remotes::install_local('make.paws') shell: Rscript {0} - name: Install Paws run: | - make.paws::paws_install("cran") + # Enable repository from paws-r + options(repos = c( + pawsr = 'https://paws-r.r-universe.dev', + CRAN = 'https://cloud.r-project.org') + ) + + # Download and install paws in R + install.packages('paws') shell: Rscript {0} - name: Build binary package id: build run: | - pkgs <- make.paws:::list_paws_pkgs("cran") + lines <- readLines(file.path("cran", "paws", "DESCRIPTION")) + pkgs <- lines[grepl("paws\\.[a-z\\.]", lines, perl = T)] + pkgs <- file.path("cran", c("paws", trimws(gsub("\\([^)]*\\).*", "", pkgs)))) dest_path <- contrib.url("../binaries", type="binary") dir.create(dest_path, recursive = TRUE) From 0822fa605cb9b461a73f47358caeb1e8a5fd87cd Mon Sep 17 00:00:00 2001 From: "dyfan.jones" Date: Wed, 19 Jul 2023 17:32:55 +0100 Subject: [PATCH 16/24] remove remotes --- .github/workflows/packaging.yaml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/packaging.yaml b/.github/workflows/packaging.yaml index 4312b7506..a27726610 100644 --- a/.github/workflows/packaging.yaml +++ b/.github/workflows/packaging.yaml @@ -64,19 +64,12 @@ jobs: - name: Install Paws Dependencies run: | - install.packages(c('remotes', 'pkgbuild')) + install.packages('pkgbuild') shell: Rscript {0} - name: Install Paws run: | - # Enable repository from paws-r - options(repos = c( - pawsr = 'https://paws-r.r-universe.dev', - CRAN = 'https://cloud.r-project.org') - ) - - # Download and install paws in R - install.packages('paws') + install.packages('paws', repos = c(pawsr = 'https://paws-r.r-universe.dev', CRAN = 'https://cloud.r-project.org')) shell: Rscript {0} - name: Build binary package From c46cb228c35079489ebc06e1c46dbab429b62863 Mon Sep 17 00:00:00 2001 From: "dyfan.jones" Date: Wed, 19 Jul 2023 20:55:24 +0100 Subject: [PATCH 17/24] increase rversion support of sagemaker --- .github/workflows/packaging.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/packaging.yaml b/.github/workflows/packaging.yaml index a27726610..5ed77c50e 100644 --- a/.github/workflows/packaging.yaml +++ b/.github/workflows/packaging.yaml @@ -20,9 +20,11 @@ jobs: config: - {r_version: 'release', os: macOS, version: cpu-intel, runner: macOS-latest} - # - {r_version: '', os: macOS, version: cpu-m1, runner: [self-hosted, m1]} - {r_version: 'release', os: ubuntu, runner: ubuntu-latest} - {r_version: 'release', os: windows, runner: windows-latest} + - {r_version: 'oldrel-1'', os: macOS, version: cpu-intel, runner: macOS-latest} + - {r_version: 'oldrel-1', os: ubuntu, runner: ubuntu-latest} + - {r_version: 'oldrel-1', os: windows, runner: windows-latest} include: - config: {os: ubuntu} From 67abf0154ff1ccffa06cdbb8b0f3f4f57b261856 Mon Sep 17 00:00:00 2001 From: "dyfan.jones" Date: Wed, 19 Jul 2023 20:56:12 +0100 Subject: [PATCH 18/24] typo --- .github/workflows/packaging.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/packaging.yaml b/.github/workflows/packaging.yaml index 5ed77c50e..1d6a324fa 100644 --- a/.github/workflows/packaging.yaml +++ b/.github/workflows/packaging.yaml @@ -22,7 +22,7 @@ jobs: - {r_version: 'release', os: macOS, version: cpu-intel, runner: macOS-latest} - {r_version: 'release', os: ubuntu, runner: ubuntu-latest} - {r_version: 'release', os: windows, runner: windows-latest} - - {r_version: 'oldrel-1'', os: macOS, version: cpu-intel, runner: macOS-latest} + - {r_version: 'oldrel-1', os: macOS, version: cpu-intel, runner: macOS-latest} - {r_version: 'oldrel-1', os: ubuntu, runner: ubuntu-latest} - {r_version: 'oldrel-1', os: windows, runner: windows-latest} From c2c48639a47853871a513130491e5ab51215103c Mon Sep 17 00:00:00 2001 From: "dyfan.jones" Date: Thu, 20 Jul 2023 00:08:50 +0100 Subject: [PATCH 19/24] add r version --- .github/workflows/packaging.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/packaging.yaml b/.github/workflows/packaging.yaml index 1d6a324fa..6cc914e2f 100644 --- a/.github/workflows/packaging.yaml +++ b/.github/workflows/packaging.yaml @@ -52,6 +52,8 @@ jobs: - name: Install R uses: r-lib/actions/setup-r@v2 + with: + r-version: ${{ matrix.config.r_version }} - uses: r-lib/actions/setup-pandoc@v2 with: From 38416685aca51ececd44dda8aa511d3616b852e1 Mon Sep 17 00:00:00 2001 From: "dyfan.jones" Date: Thu, 20 Jul 2023 12:07:44 +0100 Subject: [PATCH 20/24] create latest location --- .github/workflows/packaging.yaml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/packaging.yaml b/.github/workflows/packaging.yaml index 6cc914e2f..0a234b2ed 100644 --- a/.github/workflows/packaging.yaml +++ b/.github/workflows/packaging.yaml @@ -13,7 +13,6 @@ on: jobs: binaries: runs-on: ${{ matrix.config.runner }} - container: ${{ matrix.container }} strategy: fail-fast: false matrix: @@ -23,7 +22,6 @@ jobs: - {r_version: 'release', os: ubuntu, runner: ubuntu-latest} - {r_version: 'release', os: windows, runner: windows-latest} - {r_version: 'oldrel-1', os: macOS, version: cpu-intel, runner: macOS-latest} - - {r_version: 'oldrel-1', os: ubuntu, runner: ubuntu-latest} - {r_version: 'oldrel-1', os: windows, runner: windows-latest} include: @@ -46,6 +44,9 @@ jobs: AWS_REGION: ${{ secrets.AWS_REGION }} R_INSTALL_TAR: ${{ matrix.r_install_tar }} + outputs: + pkg_version: ${{ steps.build.outputs.pkg_version }} + steps: - uses: actions/checkout@v3 @@ -97,3 +98,18 @@ jobs: - name: 'upload-file' run: aws s3 sync "../binaries" "s3://paws-r-builds/packages/${{ steps.build.outputs.pkg_version }}/" --acl public-read --quiet + + latest-binaries: + runs-on: ubuntu-latest + needs: binaries + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_REGION: ${{ secrets.AWS_REGION }} + + steps: + - name: + run: + aws s3 rm s3://paws-r-builds/packages/latest/ --recursive --quiet + aws s3 cp s3://paws-r-builds/packages/${{ needs.binaries.outputs.pkg_version }}/ s3://paws-r-builds/packages/latest/ --acl public-read --recursive --quiet From cd08b3560c5b933cfebc0f945d1101a123e9707a Mon Sep 17 00:00:00 2001 From: "dyfan.jones" Date: Thu, 20 Jul 2023 12:09:36 +0100 Subject: [PATCH 21/24] add name --- .github/workflows/packaging.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/packaging.yaml b/.github/workflows/packaging.yaml index 0a234b2ed..195f63442 100644 --- a/.github/workflows/packaging.yaml +++ b/.github/workflows/packaging.yaml @@ -109,7 +109,7 @@ jobs: AWS_REGION: ${{ secrets.AWS_REGION }} steps: - - name: + - name: Update Latest Binaries run: aws s3 rm s3://paws-r-builds/packages/latest/ --recursive --quiet aws s3 cp s3://paws-r-builds/packages/${{ needs.binaries.outputs.pkg_version }}/ s3://paws-r-builds/packages/latest/ --acl public-read --recursive --quiet From 5b78b7b8fbb7cd83a3a5d7804eee8cf8f9be6f4e Mon Sep 17 00:00:00 2001 From: "dyfan.jones" Date: Thu, 20 Jul 2023 13:04:54 +0100 Subject: [PATCH 22/24] add pipe --- .github/workflows/packaging.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/packaging.yaml b/.github/workflows/packaging.yaml index 195f63442..b12626d71 100644 --- a/.github/workflows/packaging.yaml +++ b/.github/workflows/packaging.yaml @@ -110,6 +110,6 @@ jobs: steps: - name: Update Latest Binaries - run: + run: | aws s3 rm s3://paws-r-builds/packages/latest/ --recursive --quiet aws s3 cp s3://paws-r-builds/packages/${{ needs.binaries.outputs.pkg_version }}/ s3://paws-r-builds/packages/latest/ --acl public-read --recursive --quiet From 8fc86bb7c03612edf96414d2f298cfa0d7c0f525 Mon Sep 17 00:00:00 2001 From: "dyfan.jones" Date: Thu, 20 Jul 2023 15:14:30 +0100 Subject: [PATCH 23/24] add pre-built binary installation example --- README.md | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index c6c614f81..557c6f4ea 100644 --- a/README.md +++ b/README.md @@ -33,14 +33,20 @@ If you are using Linux, you will need to install the following OS packages: Or install the development version from [r-universe](https://paws-r.r-universe.dev/ui#builds): ``` r -# Enable repository from paws-r -options(repos = c( - pawsr = 'https://paws-r.r-universe.dev', - CRAN = 'https://cloud.r-project.org') -) +install.packages('paws', repos = c(pawsr = 'https://paws-r.r-universe.dev', CRAN = 'https://cloud.r-project.org')) +``` + +As of `paws v0.3.0` it's possible to install paws from pre-build binaries from a CRAN like repository host on AWS S3. We currently provide +pre-built binaries for Linux as Mac and Windows binaries are supported on the CRAN. The main focus of this is to provide linux with some pre-built binaries so that the install time is spead up. + +To get the latest pre-built binaries you can use the following: +```r +install.packages('paws', repos = c(pawsr = 'https://paws-r-builds.s3.amazonaws.com/packages/latest/', CRAN = 'https://cloud.r-project.org')) +``` -# Download and install paws in R -install.packages('paws') +You can also get a specific version of paws by setting the version: +```r +install.packages('paws', repos = c(pawsr = 'https://paws-r-builds.s3.amazonaws.com/packages/0.3.0/', CRAN = 'https://cloud.r-project.org')) ``` ## Credentials From 4c3f3fa99463debabd946edab755ba63e9a25954 Mon Sep 17 00:00:00 2001 From: "dyfan.jones" Date: Thu, 20 Jul 2023 15:14:58 +0100 Subject: [PATCH 24/24] add dockerfile examples --- docker/rocker-r-base/dockerfile | 11 +++++++++++ docker/rocker-r2u/dockerfile | 11 +++++++++++ 2 files changed, 22 insertions(+) create mode 100644 docker/rocker-r-base/dockerfile create mode 100644 docker/rocker-r2u/dockerfile diff --git a/docker/rocker-r-base/dockerfile b/docker/rocker-r-base/dockerfile new file mode 100644 index 000000000..d0ffc53d6 --- /dev/null +++ b/docker/rocker-r-base/dockerfile @@ -0,0 +1,11 @@ +FROM rocker/r-base + +RUN apt-get update +RUN apt-get install -y --no-install-recommends \ + libcurl4-openssl-dev \ + libssl-dev \ + libxml2-dev + +RUN Rscript -e "install.packages('paws', repos = c(pawsr = 'https://paws-r-builds.s3.amazonaws.com/packages/latest/', CRAN = 'https://cloud.r-project.org'))" + +CMD ["R"] \ No newline at end of file diff --git a/docker/rocker-r2u/dockerfile b/docker/rocker-r2u/dockerfile new file mode 100644 index 000000000..ec5a1e57c --- /dev/null +++ b/docker/rocker-r2u/dockerfile @@ -0,0 +1,11 @@ +FROM rocker/r2u:jammy + +RUN apt-get update +RUN apt-get install -y --no-install-recommends \ + libcurl4-openssl-dev \ + libssl-dev \ + libxml2-dev + +RUN Rscript -e "install.packages('paws')" + +CMD ["R"] \ No newline at end of file