Skip to content

Commit

Permalink
Merge branch 'master' into macos-version
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb authored Nov 27, 2024
2 parents 70fb7e7 + 83c0ff3 commit c113f90
Show file tree
Hide file tree
Showing 39 changed files with 865 additions and 564 deletions.
79 changes: 79 additions & 0 deletions .ci/install-old-r-packages.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# [description]
#
# Installs a pinned set of packages that worked together
# as of the last R 3.6 release.
#

.install_packages <- function(packages) {
install.packages( # nolint: undesirable_function
pkgs = paste( # nolint: paste
"https://cran.r-project.org/src/contrib/Archive"
, packages
, sep = "/"
)
, dependencies = FALSE
, lib = Sys.getenv("R_LIBS")
, repos = NULL
)
}

# when confronted with a bunch of URLs like this, install.packages() sometimes
# struggles to determine install order... so install packages in batches here,
# starting from the root of the dependency graph and working up

# there was only a single release of {praise}, so there is no contrib/Archive URL for it
install.packages( # nolint: undesirable_function
pkgs = "https://cran.r-project.org/src/contrib/praise_1.0.0.tar.gz"
, dependencies = FALSE
, lib = Sys.getenv("R_LIBS")
, repos = NULL
)

.install_packages(c(
"brio/brio_1.1.4.tar.gz" # nolint: non_portable_path
, "cli/cli_3.6.2.tar.gz" # nolint: non_portable_path
, "crayon/crayon_1.5.2.tar.gz" # nolint: non_portable_path
, "digest/digest_0.6.36.tar.gz" # nolint: non_portable_path
, "evaluate/evaluate_0.23.tar.gz" # nolint: non_portable_path
, "fansi/fansi_1.0.5.tar.gz" # nolint: non_portable_path
, "fs/fs_1.6.4.tar.gz" # nolint: non_portable_path
, "glue/glue_1.7.0.tar.gz" # nolint: non_portable_path
, "jsonlite/jsonlite_1.8.8.tar.gz" # nolint: non_portable_path
, "lattice/lattice_0.20-41.tar.gz" # nolint: non_portable_path
, "magrittr/magrittr_2.0.2.tar.gz" # nolint: non_portable_path
, "pkgconfig/pkgconfig_2.0.2.tar.gz" # nolint: non_portable_path
, "ps/ps_1.8.0.tar.gz" # nolint: non_portable_path
, "R6/R6_2.5.0.tar.gz" # nolint: non_portable_path
, "rlang/rlang_1.1.3.tar.gz" # nolint: non_portable_path
, "rprojroot/rprojroot_2.0.3.tar.gz" # nolint: non_portable_path
, "utf8/utf8_1.2.3.tar.gz" # nolint: non_portable_path
, "withr/withr_3.0.1.tar.gz" # nolint: non_portable_path
))

.install_packages(c(
"desc/desc_1.4.2.tar.gz" # nolint: non_portable_path
, "diffobj/diffobj_0.3.4.tar.gz" # nolint: non_portable_path
, "lifecycle/lifecycle_1.0.3.tar.gz" # nolint: non_portable_path
, "processx/processx_3.8.3.tar.gz" # nolint: non_portable_path
))

.install_packages(c(
"callr/callr_3.7.5.tar.gz" # nolint: non_portable_path
, "vctrs/vctrs_0.6.4.tar.gz" # nolint: non_portable_path
))

.install_packages(c(
"pillar/pillar_1.8.1.tar.gz" # nolint: non_portable_path
, "tibble/tibble_3.2.0.tar.gz" # nolint: non_portable_path
))

.install_packages(c(
"pkgbuild/pkgbuild_1.4.4.tar.gz" # nolint: non_portable_path
, "rematch2/rematch2_2.1.1.tar.gz" # nolint: non_portable_path
, "waldo/waldo_0.5.3.tar.gz" # nolint: non_portable_path
))

.install_packages(c(
"pkgload/pkgload_1.3.4.tar.gz" # nolint: non_portable_path
, "testthat/testthat_3.2.1.tar.gz" # nolint: non_portable_path
))
40 changes: 23 additions & 17 deletions .ci/install-opencl.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,37 @@ $installer = "AMD-APP-SDKInstaller-v3.0.130.135-GA-windows-F-x64.exe"

Write-Output "Downloading OpenCL platform installer"
$ProgressPreference = "SilentlyContinue" # progress bar bug extremely slows down download speed
Invoke-WebRequest -OutFile "$installer" -Uri "https://github.com/microsoft/LightGBM/releases/download/v2.0.12/$installer"
$params = @{
OutFile = "$installer"
Uri = "https://github.com/microsoft/LightGBM/releases/download/v2.0.12/$installer"
}
Invoke-WebRequest @params

if (Test-Path "$installer") {
Write-Output "Successfully downloaded OpenCL platform installer"
Write-Output "Successfully downloaded OpenCL platform installer"
} else {
Write-Output "Unable to download OpenCL platform installer"
Write-Output "Setting EXIT"
$host.SetShouldExit(-1)
exit 1
Write-Output "Unable to download OpenCL platform installer"
Write-Output "Setting EXIT"
$host.SetShouldExit(-1)
exit 1
}

# Install OpenCL platform from installer executable
Write-Output "Running OpenCL installer"
Invoke-Command -ScriptBlock { Start-Process "$installer" -ArgumentList '/S /V"/quiet /norestart /passive /log opencl.log"' -Wait }
Invoke-Command -ScriptBlock {
Start-Process "$installer" -ArgumentList '/S /V"/quiet /norestart /passive /log opencl.log"' -Wait
}

$property = Get-ItemProperty -Path Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenCL\Vendors
if ($property -eq $null) {
Write-Output "Unable to install OpenCL CPU platform"
Write-Output "OpenCL installation log:"
Get-Content "opencl.log"
Write-Output "Setting EXIT"
$host.SetShouldExit(-1)
exit 1
if ($null -eq $property) {
Write-Output "Unable to install OpenCL CPU platform"
Write-Output "OpenCL installation log:"
Get-Content "opencl.log"
Write-Output "Setting EXIT"
$host.SetShouldExit(-1)
exit 1
} else {
Write-Output "Successfully installed OpenCL CPU platform"
Write-Output "Current OpenCL drivers:"
Write-Output $property
Write-Output "Successfully installed OpenCL CPU platform"
Write-Output "Current OpenCL drivers:"
Write-Output $property
}
5 changes: 5 additions & 0 deletions .ci/lint-js.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

set -e -E -u -o pipefail

biome ci --config-path=./biome.json --diagnostic-level=info --error-on-warnings ./
56 changes: 56 additions & 0 deletions .ci/lint-powershell.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
$settings = @{
Severity = @(
'Information',
'Warning',
'Error'
)
IncludeDefaultRules = $true
# Additional rules that are disabled by default
Rules = @{
PSAvoidExclaimOperator = @{
Enable = $true
}
PSAvoidLongLines = @{
Enable = $true
MaximumLineLength = 120
}
PSAvoidSemicolonsAsLineTerminators = @{
Enable = $true
}
PSPlaceCloseBrace = @{
Enable = $true
NoEmptyLineBefore = $true
IgnoreOneLineBlock = $true
NewLineAfter = $false
}
PSPlaceOpenBrace = @{
Enable = $true
OnSameLine = $true
NewLineAfter = $true
IgnoreOneLineBlock = $true
}
PSUseConsistentIndentation = @{
Enable = $true
IndentationSize = 4
PipelineIndentation = 'IncreaseIndentationAfterEveryPipeline'
Kind = 'space'
}
PSUseConsistentWhitespace = @{
Enable = $true
CheckInnerBrace = $true
CheckOpenBrace = $true
CheckOpenParen = $true
CheckOperator = $true
CheckSeparator = $true
CheckPipe = $true
CheckPipeForRedundantWhitespace = $true
CheckParameter = $true
IgnoreAssignmentOperatorInsideHashTable = $false
}
PSUseCorrectCasing = @{
Enable = $true
}
}
}

Invoke-ScriptAnalyzer -Path ./ -Recurse -EnableExit -Settings $settings
File renamed without changes.
1 change: 0 additions & 1 deletion .ci/lint-r-code.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

loadNamespace("lintr")

args <- commandArgs(
Expand Down
2 changes: 1 addition & 1 deletion .ci/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ else # Linux
fi
fi

if [[ "${TASK}" != "r-package" ]] && [[ "${TASK}" != "r-rchk" ]]; then
if [[ "${TASK}" != "r-package" ]]; then
if [[ $SETUP_CONDA != "false" ]]; then
curl \
-sL \
Expand Down
Loading

0 comments on commit c113f90

Please sign in to comment.