Unverified Commit a1748932 authored by Nikita Titov's avatar Nikita Titov Committed by GitHub
Browse files

[ci] Use Ubuntu 22.04 as `ubuntu-latest` at CI (fixes #5186) (#5288)

parent 9afd8b93
...@@ -42,13 +42,13 @@ else # Linux ...@@ -42,13 +42,13 @@ else # Linux
iputils-ping \ iputils-ping \
jq \ jq \
libcurl4 \ libcurl4 \
libicu66 \ libicu-dev \
libssl1.1 \ libssl-dev \
libunwind8 \ libunwind8 \
locales \ locales \
netcat \ netcat \
unzip \ unzip \
zip zip || exit -1
if [[ $COMPILER == "clang" ]]; then if [[ $COMPILER == "clang" ]]; then
sudo apt-get install --no-install-recommends -y \ sudo apt-get install --no-install-recommends -y \
clang \ clang \
...@@ -60,6 +60,10 @@ else # Linux ...@@ -60,6 +60,10 @@ else # Linux
sudo locale-gen ${LANG} sudo locale-gen ${LANG}
sudo update-locale sudo update-locale
fi fi
if [[ $TASK == "r-package" ]] && [[ $COMPILER == "clang" ]]; then
sudo apt-get install --no-install-recommends -y \
libomp-dev
fi
if [[ $TASK == "mpi" ]]; then if [[ $TASK == "mpi" ]]; then
if [[ $IN_UBUNTU_LATEST_CONTAINER == "true" ]]; then if [[ $IN_UBUNTU_LATEST_CONTAINER == "true" ]]; then
sudo apt-get update sudo apt-get update
...@@ -75,10 +79,10 @@ else # Linux ...@@ -75,10 +79,10 @@ else # Linux
fi fi
if [[ $TASK == "gpu" ]]; then if [[ $TASK == "gpu" ]]; then
if [[ $IN_UBUNTU_LATEST_CONTAINER == "true" ]]; then if [[ $IN_UBUNTU_LATEST_CONTAINER == "true" ]]; then
sudo add-apt-repository ppa:mhier/libboost-latest -y
sudo apt-get update sudo apt-get update
sudo apt-get install --no-install-recommends -y \ sudo apt-get install --no-install-recommends -y \
libboost1.74-dev \ libboost1.74-dev \
libboost-filesystem1.74-dev \
ocl-icd-opencl-dev ocl-icd-opencl-dev
else # in manylinux image else # in manylinux image
sudo yum update -y sudo yum update -y
......
...@@ -17,7 +17,7 @@ env: ...@@ -17,7 +17,7 @@ env:
jobs: jobs:
check-links: check-links:
timeout-minutes: 60 timeout-minutes: 60
runs-on: ubuntu-latest runs-on: ubuntu-22.04
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
......
...@@ -9,7 +9,7 @@ on: ...@@ -9,7 +9,7 @@ on:
jobs: jobs:
noResponse: noResponse:
runs-on: ubuntu-latest runs-on: ubuntu-22.04
steps: steps:
- uses: lee-dohm/no-response@v0.5.0 - uses: lee-dohm/no-response@v0.5.0
with: with:
......
...@@ -9,7 +9,7 @@ on: ...@@ -9,7 +9,7 @@ on:
jobs: jobs:
all-successful: all-successful:
timeout-minutes: 120 timeout-minutes: 120
runs-on: ubuntu-latest runs-on: ubuntu-22.04
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
......
...@@ -9,7 +9,7 @@ jobs: ...@@ -9,7 +9,7 @@ jobs:
name: r-configure name: r-configure
timeout-minutes: 60 timeout-minutes: 60
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: "ubuntu:20.04" container: "ubuntu:22.04"
steps: steps:
- name: Install essential software before checkout - name: Install essential software before checkout
run: | run: |
......
...@@ -33,22 +33,22 @@ jobs: ...@@ -33,22 +33,22 @@ jobs:
################ ################
# CMake builds # # CMake builds #
################ ################
- os: ubuntu-latest - os: ubuntu-22.04
task: r-package task: r-package
compiler: gcc compiler: gcc
r_version: 3.6 r_version: 3.6
build_type: cmake build_type: cmake
- os: ubuntu-latest - os: ubuntu-22.04
task: r-package task: r-package
compiler: gcc compiler: gcc
r_version: 4.2 r_version: 4.2
build_type: cmake build_type: cmake
- os: ubuntu-latest - os: ubuntu-22.04
task: r-package task: r-package
compiler: clang compiler: clang
r_version: 3.6 r_version: 3.6
build_type: cmake build_type: cmake
- os: ubuntu-latest - os: ubuntu-22.04
task: r-package task: r-package
compiler: clang compiler: clang
r_version: 4.2 r_version: 4.2
...@@ -114,7 +114,7 @@ jobs: ...@@ -114,7 +114,7 @@ jobs:
toolchain: MSYS toolchain: MSYS
r_version: 4.2 r_version: 4.2
build_type: cran build_type: cran
- os: ubuntu-latest - os: ubuntu-22.04
task: r-package task: r-package
compiler: gcc compiler: gcc
r_version: 4.2 r_version: 4.2
...@@ -127,7 +127,7 @@ jobs: ...@@ -127,7 +127,7 @@ jobs:
################ ################
# Other checks # # Other checks #
################ ################
- os: ubuntu-latest - os: ubuntu-22.04
task: r-rchk task: r-rchk
compiler: gcc compiler: gcc
r_version: 4.2 r_version: 4.2
...@@ -151,7 +151,7 @@ jobs: ...@@ -151,7 +151,7 @@ jobs:
CTAN_MIRROR: https://ctan.math.illinois.edu/systems/win32/miktex CTAN_MIRROR: https://ctan.math.illinois.edu/systems/win32/miktex
TINYTEX_INSTALLER: TinyTeX TINYTEX_INSTALLER: TinyTeX
- name: Setup and run tests on Linux and macOS - name: Setup and run tests on Linux and macOS
if: matrix.os == 'macOS-latest' || matrix.os == 'ubuntu-latest' if: matrix.os == 'macOS-latest' || matrix.os == 'ubuntu-22.04'
shell: bash shell: bash
run: | run: |
export TASK="${{ matrix.task }}" export TASK="${{ matrix.task }}"
...@@ -159,7 +159,7 @@ jobs: ...@@ -159,7 +159,7 @@ jobs:
export GITHUB_ACTIONS="true" export GITHUB_ACTIONS="true"
if [[ "${{ matrix.os }}" == "macOS-latest" ]]; then if [[ "${{ matrix.os }}" == "macOS-latest" ]]; then
export OS_NAME="macos" export OS_NAME="macos"
elif [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then elif [[ "${{ matrix.os }}" == "ubuntu-22.04" ]]; then
export OS_NAME="linux" export OS_NAME="linux"
fi fi
export BUILD_DIRECTORY="$GITHUB_WORKSPACE" export BUILD_DIRECTORY="$GITHUB_WORKSPACE"
...@@ -181,9 +181,9 @@ jobs: ...@@ -181,9 +181,9 @@ jobs:
$env:TASK = "${{ matrix.task }}" $env:TASK = "${{ matrix.task }}"
& "$env:GITHUB_WORKSPACE/.ci/test_windows.ps1" & "$env:GITHUB_WORKSPACE/.ci/test_windows.ps1"
test-r-sanitizers: test-r-sanitizers:
name: r-sanitizers (ubuntu-latest, R-devel, ${{ matrix.compiler }} ASAN/UBSAN) name: r-sanitizers (ubuntu-22.04, R-devel, ${{ matrix.compiler }} ASAN/UBSAN)
timeout-minutes: 60 timeout-minutes: 60
runs-on: ubuntu-latest runs-on: ubuntu-22.04
container: wch1/r-debug container: wch1/r-debug
strategy: strategy:
fail-fast: false fail-fast: false
...@@ -219,7 +219,7 @@ jobs: ...@@ -219,7 +219,7 @@ jobs:
test-r-debian-clang: test-r-debian-clang:
name: r-package (debian, R-devel, clang) name: r-package (debian, R-devel, clang)
timeout-minutes: 60 timeout-minutes: 60
runs-on: ubuntu-latest runs-on: ubuntu-22.04
container: rhub/debian-clang-devel container: rhub/debian-clang-devel
steps: steps:
- name: Install Git before checkout - name: Install Git before checkout
...@@ -248,7 +248,7 @@ jobs: ...@@ -248,7 +248,7 @@ jobs:
fi fi
all-successful: all-successful:
# https://github.community/t/is-it-possible-to-require-all-github-actions-tasks-to-pass-without-enumerating-them/117957/4?u=graingert # 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 runs-on: ubuntu-22.04
needs: [test, test-r-sanitizers, test-r-debian-clang] needs: [test, test-r-sanitizers, test-r-debian-clang]
steps: steps:
- name: Note that all tests succeeded - name: Note that all tests succeeded
......
...@@ -21,7 +21,7 @@ env: ...@@ -21,7 +21,7 @@ env:
jobs: jobs:
test: test:
name: ${{ matrix.task }} name: ${{ matrix.task }}
runs-on: ubuntu-latest runs-on: ubuntu-22.04
timeout-minutes: 60 timeout-minutes: 60
strategy: strategy:
fail-fast: false fail-fast: false
...@@ -47,7 +47,7 @@ jobs: ...@@ -47,7 +47,7 @@ jobs:
r-check-docs: r-check-docs:
name: r-package-check-docs name: r-package-check-docs
timeout-minutes: 60 timeout-minutes: 60
runs-on: ubuntu-latest runs-on: ubuntu-22.04
container: rocker/verse container: rocker/verse
steps: steps:
- name: Trust git cloning LightGBM - name: Trust git cloning LightGBM
...@@ -82,7 +82,7 @@ jobs: ...@@ -82,7 +82,7 @@ jobs:
fi fi
all-successful: all-successful:
# https://github.community/t/is-it-possible-to-require-all-github-actions-tasks-to-pass-without-enumerating-them/117957/4?u=graingert # 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 runs-on: ubuntu-22.04
needs: [test, r-check-docs] needs: [test, r-check-docs]
steps: steps:
- name: Note that all tests succeeded - name: Note that all tests succeeded
......
...@@ -21,7 +21,7 @@ resources: ...@@ -21,7 +21,7 @@ resources:
- container: linux-artifact-builder - container: linux-artifact-builder
image: lightgbm/vsts-agent:manylinux_2_28_x86_64 image: lightgbm/vsts-agent:manylinux_2_28_x86_64
- container: ubuntu-latest - container: ubuntu-latest
image: 'ubuntu:20.04' image: 'ubuntu:22.04'
options: "--name ci-container -v /usr/bin/docker:/tmp/docker:ro" options: "--name ci-container -v /usr/bin/docker:/tmp/docker:ro"
- container: rbase - container: rbase
image: wch1/r-debug image: wch1/r-debug
...@@ -151,7 +151,7 @@ jobs: ...@@ -151,7 +151,7 @@ jobs:
OS_NAME: 'linux' OS_NAME: 'linux'
PRODUCES_ARTIFACTS: 'true' PRODUCES_ARTIFACTS: 'true'
pool: pool:
vmImage: ubuntu-latest vmImage: ubuntu-22.04
timeoutInMinutes: 180 timeoutInMinutes: 180
strategy: strategy:
matrix: matrix:
...@@ -299,7 +299,7 @@ jobs: ...@@ -299,7 +299,7 @@ jobs:
########################################### ###########################################
condition: not(startsWith(variables['Build.SourceBranch'], 'refs/pull/')) condition: not(startsWith(variables['Build.SourceBranch'], 'refs/pull/'))
pool: pool:
vmImage: 'ubuntu-latest' vmImage: 'ubuntu-22.04'
container: rbase container: rbase
steps: steps:
- script: | - script: |
...@@ -330,7 +330,7 @@ jobs: ...@@ -330,7 +330,7 @@ jobs:
- R_artifact - R_artifact
condition: and(succeeded(), not(startsWith(variables['Build.SourceBranch'], 'refs/pull/'))) condition: and(succeeded(), not(startsWith(variables['Build.SourceBranch'], 'refs/pull/')))
pool: pool:
vmImage: 'ubuntu-latest' vmImage: 'ubuntu-22.04'
steps: steps:
# Create archives with complete source code included (with git submodules) # Create archives with complete source code included (with git submodules)
- task: ArchiveFiles@2 - task: ArchiveFiles@2
......
...@@ -352,22 +352,22 @@ This section briefly explains the key files for building a CRAN package. To upda ...@@ -352,22 +352,22 @@ This section briefly explains the key files for building a CRAN package. To upda
At build time, `configure` will be run and used to create a file `Makevars`, using `Makevars.in` as a template. At build time, `configure` will be run and used to create a file `Makevars`, using `Makevars.in` as a template.
1. Edit `configure.ac`. 1. Edit `configure.ac`.
2. Create `configure` with `autoconf`. Do not edit it by hand. This file must be generated on Ubuntu 20.04. 2. Create `configure` with `autoconf`. Do not edit it by hand. This file must be generated on Ubuntu 22.04.
If you have an Ubuntu 20.04 environment available, run the provided script from the root of the `LightGBM` repository. If you have an Ubuntu 22.04 environment available, run the provided script from the root of the `LightGBM` repository.
```shell ```shell
./R-package/recreate-configure.sh ./R-package/recreate-configure.sh
``` ```
If you do not have easy access to an Ubuntu 20.04 environment, the `configure` script can be generated using Docker by running the code below from the root of this repo. If you do not have easy access to an Ubuntu 22.04 environment, the `configure` script can be generated using Docker by running the code below from the root of this repo.
```shell ```shell
docker run \ docker run \
--rm \ --rm \
-v $(pwd):/opt/LightGBM \ -v $(pwd):/opt/LightGBM \
-w /opt/LightGBM \ -w /opt/LightGBM \
-t ubuntu:20.04 \ -t ubuntu:22.04 \
./R-package/recreate-configure.sh ./R-package/recreate-configure.sh
``` ```
......
This diff is collapsed.
#!/bin/bash #!/bin/bash
# recreates 'configure' from 'configure.ac' # recreates 'configure' from 'configure.ac'
# this script should run on Ubuntu 20.04 # this script should run on Ubuntu 22.04
AUTOCONF_VERSION=$(cat R-package/AUTOCONF_UBUNTU_VERSION) AUTOCONF_VERSION=$(cat R-package/AUTOCONF_UBUNTU_VERSION)
# R packages cannot have versions like 3.0.0rc1, but # R packages cannot have versions like 3.0.0rc1, but
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment