Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[R-package] prevent symbol lookup conflicts (fixes #4045) #4155

Merged
merged 13 commits into from
Apr 30, 2021
Prev Previous commit
Next Next commit
move to .Call() calls
  • Loading branch information
jameslamb committed Apr 25, 2021
commit 6668390e954193a7ab9eca76dad52aef0c2dbb64
72 changes: 36 additions & 36 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
version: 3.2.1.99.{build}
# version: 3.2.1.99.{build}

image: Visual Studio 2015
platform: x64
configuration: # a trick to construct a build matrix with multiple Python versions
- 3.7
# image: Visual Studio 2015
# platform: x64
# configuration: # a trick to construct a build matrix with multiple Python versions
# - 3.7

# only build pull requests and
# commits to 'master'
branches:
only:
- master
# # only build pull requests and
# # commits to 'master'
# branches:
# only:
# - master

environment:
matrix:
- COMPILER: MSVC
TASK: python
- COMPILER: MINGW
TASK: python
# environment:
# matrix:
# - COMPILER: MSVC
# TASK: python
# - COMPILER: MINGW
# TASK: python

clone_depth: 5
# clone_depth: 5

install:
- git submodule update --init --recursive # get `external_libs` folder
- set PATH=%PATH:C:\Program Files\Git\usr\bin;=% # delete sh.exe from PATH (mingw32-make fix)
- set PATH=C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;%PATH%
- set PYTHON_VERSION=%CONFIGURATION%
- set CONDA_ENV="test-env"
- ps: |
switch ($env:PYTHON_VERSION) {
"3.6" {$env:MINICONDA = "C:\Miniconda36-x64"}
"3.7" {$env:MINICONDA = "C:\Miniconda37-x64"}
default {$env:MINICONDA = "C:\Miniconda37-x64"}
}
$env:PATH = "$env:MINICONDA;$env:MINICONDA\Scripts;$env:PATH"
$env:BUILD_SOURCESDIRECTORY = "$env:APPVEYOR_BUILD_FOLDER"
$env:LGB_VER = (Get-Content $env:APPVEYOR_BUILD_FOLDER\VERSION.txt).trim()
# install:
# - git submodule update --init --recursive # get `external_libs` folder
# - set PATH=%PATH:C:\Program Files\Git\usr\bin;=% # delete sh.exe from PATH (mingw32-make fix)
# - set PATH=C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;%PATH%
# - set PYTHON_VERSION=%CONFIGURATION%
# - set CONDA_ENV="test-env"
# - ps: |
# switch ($env:PYTHON_VERSION) {
# "3.6" {$env:MINICONDA = "C:\Miniconda36-x64"}
# "3.7" {$env:MINICONDA = "C:\Miniconda37-x64"}
# default {$env:MINICONDA = "C:\Miniconda37-x64"}
# }
# $env:PATH = "$env:MINICONDA;$env:MINICONDA\Scripts;$env:PATH"
# $env:BUILD_SOURCESDIRECTORY = "$env:APPVEYOR_BUILD_FOLDER"
# $env:LGB_VER = (Get-Content $env:APPVEYOR_BUILD_FOLDER\VERSION.txt).trim()

build: false
# build: false

test_script:
- conda init powershell
- powershell.exe -ExecutionPolicy Bypass -File %APPVEYOR_BUILD_FOLDER%\.ci\test_windows.ps1
# test_script:
# - conda init powershell
# - powershell.exe -ExecutionPolicy Bypass -File %APPVEYOR_BUILD_FOLDER%\.ci\test_windows.ps1
186 changes: 93 additions & 93 deletions .github/workflows/cuda.yml
Original file line number Diff line number Diff line change
@@ -1,96 +1,96 @@
name: CUDA Version
# name: CUDA Version

on:
push:
branches:
- master
pull_request:
branches:
- master
# on:
# push:
# branches:
# - master
# pull_request:
# branches:
# - master

env:
github_actions: 'true'
os_name: linux
task: cuda
conda_env: test-env
# env:
# github_actions: 'true'
# os_name: linux
# task: cuda
# conda_env: test-env

jobs:
test:
name: cuda ${{ matrix.cuda_version }} ${{ matrix.method }} (linux, ${{ matrix.compiler }}, Python ${{ matrix.python_version }})
runs-on: [self-hosted, linux]
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- method: source
compiler: gcc
python_version: 3.7
cuda_version: "11.2.2"
- method: pip
compiler: clang
python_version: 3.8
cuda_version: "10.0"
- method: wheel
compiler: gcc
python_version: 3.9
cuda_version: "9.0"
steps:
- name: Setup or update software on host machine
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y \
apt-transport-https \
ca-certificates \
curl \
git \
gnupg-agent \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" -y
curl -sL https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -
curl -sL https://nvidia.github.io/nvidia-docker/$(. /etc/os-release;echo $ID$VERSION_ID)/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
sudo apt-get update
sudo apt-get install --no-install-recommends -y \
containerd.io \
docker-ce \
docker-ce-cli \
nvidia-docker2
sudo chmod a+rw /var/run/docker.sock
sudo systemctl restart docker
- name: Remove old folder with repository
run: sudo rm -rf $GITHUB_WORKSPACE
- name: Checkout repository
uses: actions/checkout@v1
with:
fetch-depth: 5
submodules: true
- name: Setup and run tests
run: |
export ROOT_DOCKER_FOLDER=/LightGBM
cat > docker.env <<EOF
GITHUB_ACTIONS=${{ env.github_actions }}
OS_NAME=${{ env.os_name }}
COMPILER=${{ matrix.compiler }}
TASK=${{ env.task }}
METHOD=${{ matrix.method }}
CONDA_ENV=${{ env.conda_env }}
PYTHON_VERSION=${{ matrix.python_version }}
BUILD_DIRECTORY=$ROOT_DOCKER_FOLDER
LGB_VER=$(head -n 1 VERSION.txt)
EOF
cat > docker-script.sh <<EOF
export CONDA=\$HOME/miniconda
export PATH=\$CONDA/bin:\$PATH
nvidia-smi
$ROOT_DOCKER_FOLDER/.ci/setup.sh || exit -1
$ROOT_DOCKER_FOLDER/.ci/test.sh || exit -1
EOF
docker run --env-file docker.env -v "$GITHUB_WORKSPACE":"$ROOT_DOCKER_FOLDER" --rm --gpus all "nvcr.io/nvidia/cuda:${{ matrix.cuda_version }}-devel" /bin/bash $ROOT_DOCKER_FOLDER/docker-script.sh
all-successful:
# https://github.community/t/is-it-possible-to-require-all-github-actions-tasks-to-pass-without-enumerating-them/117957/4?u=graingert
runs-on: ubuntu-latest
needs: [test]
steps:
- name: Note that all tests succeeded
run: echo "🎉"
# jobs:
# test:
# name: cuda ${{ matrix.cuda_version }} ${{ matrix.method }} (linux, ${{ matrix.compiler }}, Python ${{ matrix.python_version }})
# runs-on: [self-hosted, linux]
# timeout-minutes: 60
# strategy:
# fail-fast: false
# matrix:
# include:
# - method: source
# compiler: gcc
# python_version: 3.7
# cuda_version: "11.2.2"
# - method: pip
# compiler: clang
# python_version: 3.8
# cuda_version: "10.0"
# - method: wheel
# compiler: gcc
# python_version: 3.9
# cuda_version: "9.0"
# steps:
# - name: Setup or update software on host machine
# run: |
# sudo apt-get update
# sudo apt-get install --no-install-recommends -y \
# apt-transport-https \
# ca-certificates \
# curl \
# git \
# gnupg-agent \
# software-properties-common
# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" -y
# curl -sL https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -
# curl -sL https://nvidia.github.io/nvidia-docker/$(. /etc/os-release;echo $ID$VERSION_ID)/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
# sudo apt-get update
# sudo apt-get install --no-install-recommends -y \
# containerd.io \
# docker-ce \
# docker-ce-cli \
# nvidia-docker2
# sudo chmod a+rw /var/run/docker.sock
# sudo systemctl restart docker
# - name: Remove old folder with repository
# run: sudo rm -rf $GITHUB_WORKSPACE
# - name: Checkout repository
# uses: actions/checkout@v1
# with:
# fetch-depth: 5
# submodules: true
# - name: Setup and run tests
# run: |
# export ROOT_DOCKER_FOLDER=/LightGBM
# cat > docker.env <<EOF
# GITHUB_ACTIONS=${{ env.github_actions }}
# OS_NAME=${{ env.os_name }}
# COMPILER=${{ matrix.compiler }}
# TASK=${{ env.task }}
# METHOD=${{ matrix.method }}
# CONDA_ENV=${{ env.conda_env }}
# PYTHON_VERSION=${{ matrix.python_version }}
# BUILD_DIRECTORY=$ROOT_DOCKER_FOLDER
# LGB_VER=$(head -n 1 VERSION.txt)
# EOF
# cat > docker-script.sh <<EOF
# export CONDA=\$HOME/miniconda
# export PATH=\$CONDA/bin:\$PATH
# nvidia-smi
# $ROOT_DOCKER_FOLDER/.ci/setup.sh || exit -1
# $ROOT_DOCKER_FOLDER/.ci/test.sh || exit -1
# EOF
# docker run --env-file docker.env -v "$GITHUB_WORKSPACE":"$ROOT_DOCKER_FOLDER" --rm --gpus all "nvcr.io/nvidia/cuda:${{ matrix.cuda_version }}-devel" /bin/bash $ROOT_DOCKER_FOLDER/docker-script.sh
# all-successful:
# # https://github.community/t/is-it-possible-to-require-all-github-actions-tasks-to-pass-without-enumerating-them/117957/4?u=graingert
# runs-on: ubuntu-latest
# needs: [test]
# steps:
# - name: Note that all tests succeeded
# run: echo "🎉"
60 changes: 30 additions & 30 deletions .github/workflows/linkchecker.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
name: Link checks
# name: Link checks

on:
# Run manually by clicking a button in the UI
workflow_dispatch:
# Run once a day at 8:00am UTC
schedule:
- cron: '0 8 * * *'
# on:
# # Run manually by clicking a button in the UI
# workflow_dispatch:
# # Run once a day at 8:00am UTC
# schedule:
# - cron: '0 8 * * *'

env:
CONDA_ENV: test-env
GITHUB_ACTIONS: 'true'
OS_NAME: 'linux'
PYTHON_VERSION: 3.9
TASK: 'check-links'
# env:
# CONDA_ENV: test-env
# GITHUB_ACTIONS: 'true'
# OS_NAME: 'linux'
# PYTHON_VERSION: 3.9
# TASK: 'check-links'

jobs:
check-links:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2.3.4
with:
fetch-depth: 5
submodules: false
- name: Setup and run tests
run: |
export BUILD_DIRECTORY="$GITHUB_WORKSPACE"
export CONDA=${HOME}/miniconda
export PATH=${CONDA}/bin:${HOME}/.local/bin:${PATH}
$GITHUB_WORKSPACE/.ci/setup.sh || exit -1
$GITHUB_WORKSPACE/.ci/test.sh || exit -1
# jobs:
# check-links:
# timeout-minutes: 60
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repository
# uses: actions/checkout@v2.3.4
# with:
# fetch-depth: 5
# submodules: false
# - name: Setup and run tests
# run: |
# export BUILD_DIRECTORY="$GITHUB_WORKSPACE"
# export CONDA=${HOME}/miniconda
# export PATH=${CONDA}/bin:${HOME}/.local/bin:${PATH}
# $GITHUB_WORKSPACE/.ci/setup.sh || exit -1
# $GITHUB_WORKSPACE/.ci/test.sh || exit -1
56 changes: 28 additions & 28 deletions .github/workflows/optional_checks.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
name: Optional checks
# name: Optional checks

on:
pull_request:
branches:
- master
# on:
# pull_request:
# branches:
# - master

jobs:
all-successful:
timeout-minutes: 120
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2.3.4
with:
fetch-depth: 5
submodules: false
- name: Check that all tests succeeded
run: |
workflows=(
"R valgrind tests;r-valgrind"
"Solaris CRAN check;r-solaris"
)
for i in "${workflows[@]}"; do
workflow_name=${i%;*}
trigger_phrase=${i#*;}
python "$GITHUB_WORKSPACE/.ci/get_workflow_status.py" "$trigger_phrase" \
|| { echo "The last reported status from workflow \"$workflow_name\" is failure. Commit fixes and rerun the workflow."; \
exit -1; }
done
# jobs:
# all-successful:
# timeout-minutes: 120
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repository
# uses: actions/checkout@v2.3.4
# with:
# fetch-depth: 5
# submodules: false
# - name: Check that all tests succeeded
# run: |
# workflows=(
# "R valgrind tests;r-valgrind"
# "Solaris CRAN check;r-solaris"
# )
# for i in "${workflows[@]}"; do
# workflow_name=${i%;*}
# trigger_phrase=${i#*;}
# python "$GITHUB_WORKSPACE/.ci/get_workflow_status.py" "$trigger_phrase" \
# || { echo "The last reported status from workflow \"$workflow_name\" is failure. Commit fixes and rerun the workflow."; \
# exit -1; }
# done
Loading