Skip to content

Commit

Permalink
remove support for Solaris (fixes #5216)
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb committed May 21, 2022
1 parent 5b664b6 commit a68acc2
Show file tree
Hide file tree
Showing 14 changed files with 3 additions and 547 deletions.
92 changes: 0 additions & 92 deletions .ci/run_rhub_solaris_checks.R

This file was deleted.

15 changes: 0 additions & 15 deletions .ci/test_r_package_solaris.sh

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/optional_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
run: |
workflows=(
"R valgrind tests;r-valgrind"
"Solaris CRAN check;r-solaris"
)
for i in "${workflows[@]}"; do
workflow_name=${i%;*}
Expand Down
65 changes: 0 additions & 65 deletions .github/workflows/r_solaris.yml

This file was deleted.

8 changes: 0 additions & 8 deletions .github/workflows/triggering_comments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,6 @@ jobs:
"${{ github.event.comment.id }}" \
"gha_run_r_valgrind"
- name: Trigger R Solaris CRAN checks
if: github.event.comment.body == '/gha run r-solaris'
run: |
$GITHUB_WORKSPACE/.ci/trigger_dispatch_run.sh \
"${{ github.event.issue.pull_request.url }}" \
"${{ github.event.comment.id }}" \
"gha_run_r_solaris"
- name: Trigger update R configure
if: github.event.comment.body == '/gha run r-configure'
run: |
Expand Down
30 changes: 0 additions & 30 deletions R-package/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -368,36 +368,6 @@ sh build-cran-package.sh
R CMD check --as-cran lightgbm_*.tar.gz
```

#### Solaris

All packages uploaded to CRAN must pass `R CMD check` on Solaris 10. To test LightGBM on this operating system, you can use the free service [R Hub](https://builder.r-hub.io/), a free service generously provided by the R Consortium.

```shell
sh build-cran-package.sh
```

```r
package_tarball <- paste0("lightgbm_", readLines("VERSION.txt")[1], ".tar.gz")
rhub::check(
path = package_tarball
, email = "your_email_here"
, check_args = "--as-cran"
, platform = c(
"solaris-x86-patched"
, "solaris-x86-patched-ods"
)
, env_vars = c(
"R_COMPILE_AND_INSTALL_PACKAGES" = "always"
)
)
```

Alternatively, GitHub Actions can run code above for you. On a pull request, create a comment with this phrase:

> /gha run r-solaris

**NOTE:** Please do this only once you see that other R tests on a pull request are passing. R Hub is a free resource with limited capacity, and we want to be respectful community members.

#### <a id="UBSAN"></a>ASAN and UBSAN

All packages uploaded to CRAN must pass builds using `gcc` and `clang`, instrumented with two sanitizers: the Address Sanitizer (ASAN) and the Undefined Behavior Sanitizer (UBSAN).
Expand Down
1 change: 0 additions & 1 deletion R-package/src/Makevars.in
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ OBJECTS = \
metric/dcg_calculator.o \
metric/metric.o \
objective/objective_function.o \
network/ifaddrs_patch.o \
network/linker_topo.o \
network/linkers_mpi.o \
network/linkers_socket.o \
Expand Down
1 change: 0 additions & 1 deletion R-package/src/Makevars.win.in
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ OBJECTS = \
metric/dcg_calculator.o \
metric/metric.o \
objective/objective_function.o \
network/ifaddrs_patch.o \
network/linker_topo.o \
network/linkers_mpi.o \
network/linkers_socket.o \
Expand Down
5 changes: 2 additions & 3 deletions R-package/tests/testthat/test_learning_to_rank.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ VERBOSITY <- as.integer(
# numerical tolerance to use when checking metric values
TOLERANCE <- 1e-06

ON_SOLARIS <- Sys.info()["sysname"] == "SunOS"
ON_32_BIT_WINDOWS <- .Platform$OS.type == "windows" && .Machine$sizeof.pointer != 8L

test_that("learning-to-rank with lgb.train() works as expected", {
Expand Down Expand Up @@ -52,15 +51,15 @@ test_that("learning-to-rank with lgb.train() works as expected", {
}
expect_identical(sapply(eval_results, function(x) {x$name}), eval_names)
expect_equal(eval_results[[1L]][["value"]], 0.775)
if (!(ON_SOLARIS || ON_32_BIT_WINDOWS)) {
if (!ON_32_BIT_WINDOWS) {
expect_true(abs(eval_results[[2L]][["value"]] - 0.745986) < TOLERANCE)
expect_true(abs(eval_results[[3L]][["value"]] - 0.7351959) < TOLERANCE)
}
})

test_that("learning-to-rank with lgb.cv() works as expected", {
testthat::skip_if(
ON_SOLARIS || ON_32_BIT_WINDOWS
ON_32_BIT_WINDOWS
, message = "Skipping on Solaris and 32-bit Windows"
)
set.seed(708L)
Expand Down
3 changes: 0 additions & 3 deletions include/LightGBM/utils/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
#ifndef LIGHTGBM_UTILS_COMMON_H_
#define LIGHTGBM_UTILS_COMMON_H_

#if ((defined(sun) || defined(__sun)) && (defined(__SVR4) || defined(__svr4__)))
#include <LightGBM/utils/common_legacy_solaris.h>
#endif
#include <LightGBM/utils/json11.h>
#include <LightGBM/utils/log.h>
#include <LightGBM/utils/openmp_wrapper.h>
Expand Down
Loading

0 comments on commit a68acc2

Please sign in to comment.