This commit is contained in:
Patrick Schratz 2024-06-03 23:51:22 +02:00
commit d2f4cdca2c
Signed by: pat-s
GPG key ID: 3C6318841EF78925

View file

@ -2,27 +2,43 @@
## Workflow ## Workflow
1. `01-prepare.sh` 1. "Prepare"
1. Install R interpreter 1. Install R interpreter
2. Add required repos to resolve syslibs 2. Add required repos to resolve syslibs
3. Install pak 3. Install pak
4. Install awscli for remote s3 sync 4. Install awscli for remote s3 sync
2. `02-build-binaries.sh` 2. "Build"
1. For every package, do 1. For every package, do
1. Clone from GitHub CRAN mirror 1. Clone from GitHub CRAN mirror
2. Install all system dependencies via `pak::local_install_dev_deps()` 2. Install all system dependencies via `pak::local_install_dev_deps()`
3. Checkout each available tag 3. Checkout each available tag
4. Build source package <!-- 4. Build source package -->
5. Build binary package 4. Build binary package
6. Create Archive/ directory 5. Create Archive/ directory
7. Move all versions besides the most recent one to Archive/ (for source and binary) 6. Move all versions besides the most recent one to Archive/ (for source and binary)
8. Create `PACKAGES` metadata file using `cranlike` package 7. Create `PACKAGES` metadata file using `cranlike` package
3. `03-upload.sh` 8. Store build metadata in sqlite DB
3. "Upload"
1. Sync all binaries and sources to S3 bucket 1. Sync all binaries and sources to S3 bucket
4. `-4-create-archive-rds.sh` 4. `-4-create-archive-rds.sh`
1. Create `Meta/archive.rds` file for each package so that `remotes::install_version()` can install archived versions 1. Create `Meta/archive.rds` file for each package so that `remotes::install_version()` can install archived versions
2. Upload `Meta/archive.rds` to S3 bucket 2. Upload `Meta/archive.rds` to S3 bucket
## Build metadata
The build metadata is stored in a sqlite database.
The following tables are used:
- `metadata` contains the build metadata for each package:
| package_name | tag | platform | error_occurred | build_timestamp |
| ------------ | --- | -------- | -------------- | --------------- |
- `metadata_summary` contains aggregated build metadata for each package and platform:
| package_name | platform | successful_builds | unsuccessful_builds | total_builds | percentage_successful_builds | average_build_time_per_tag |
| ------------ | -------- | ----------------- | ------------------- | ------------ | ---------------------------- | -------------------------- |
## Support for archived versions ## Support for archived versions
### `remotes::install_version()` ### `remotes::install_version()`
@ -45,6 +61,11 @@ foo[[1]]
`pak` searches for `Archive/<package>` and is able to install all versions existing there. `pak` searches for `Archive/<package>` and is able to install all versions existing there.
Ensure to use a clean cache if other repos have been used before, i.e. call `pak::meta_clean(force = TRUE)` if in doubt or when testing. Ensure to use a clean cache if other repos have been used before, i.e. call `pak::meta_clean(force = TRUE)` if in doubt or when testing.
## Platforms
The following platforms are supported:
- RHEL9
## Lessons learned ## Lessons learned
- Newer R versions have issues compiling C code from older package Versions. Using an older R version to build the binaries is recommended. - Newer R versions have issues compiling C code from older package Versions. Using an older R version to build the binaries is recommended.