Skip to content

Commit

Permalink
CI: Use Ubuntu 20.04 in GitHub Actions.
Browse files Browse the repository at this point in the history
"The Ubuntu 18.04 Actions runner image is being deprecated and will be
removed by 12/1/22" according to the GitHub Changelog blog.
  • Loading branch information
briansmith committed Oct 21, 2022
1 parent 9b00fff commit 993da11
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 25 deletions.
42 changes: 21 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
# Don't run duplicate `push` jobs for the repo owner's PRs.
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository

runs-on: ubuntu-18.04
runs-on: ubuntu-22.04

steps:
- uses: briansmith/actions-rs-toolchain@v1
Expand All @@ -26,7 +26,7 @@ jobs:
# Don't run duplicate `push` jobs for the repo owner's PRs.
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository

runs-on: ubuntu-18.04
runs-on: ubuntu-22.04

steps:
- uses: briansmith/actions-rs-toolchain@v1
Expand All @@ -45,7 +45,7 @@ jobs:
# Don't run duplicate `push` jobs for the repo owner's PRs.
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository

runs-on: ubuntu-18.04
runs-on: ubuntu-22.04

steps:
- uses: briansmith/actions-rs-toolchain@v1
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
# Don't run duplicate `push` jobs for the repo owner's PRs.
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository

runs-on: ubuntu-18.04
runs-on: ubuntu-22.04

steps:
- uses: briansmith/actions-rs-toolchain@v1
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
# Don't run duplicate `push` jobs for the repo owner's PRs.
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository

runs-on: ubuntu-18.04
runs-on: ubuntu-22.04

strategy:
matrix:
Expand Down Expand Up @@ -208,7 +208,7 @@ jobs:
cargo_options: --no-run

- target: aarch64-linux-android
host_os: ubuntu-18.04
host_os: ubuntu-22.04
# TODO: https://github.com/briansmith/ring/issues/486
cargo_options: --no-run

Expand All @@ -218,32 +218,32 @@ jobs:
cargo_options: --no-run

- target: aarch64-unknown-linux-gnu
host_os: ubuntu-18.04
host_os: ubuntu-22.04

- target: aarch64-unknown-linux-musl
host_os: ubuntu-18.04
host_os: ubuntu-22.04

- target: arm-unknown-linux-gnueabihf
host_os: ubuntu-18.04
host_os: ubuntu-22.04

- target: armv7-linux-androideabi
host_os: ubuntu-18.04
host_os: ubuntu-22.04
# TODO: https://github.com/briansmith/ring/issues/838
cargo_options: --no-run

- target: armv7-unknown-linux-musleabihf
host_os: ubuntu-18.04
host_os: ubuntu-22.04
# TODO: https://github.com/briansmith/ring/issues/1115
cargo_options: --no-run

- target: i686-pc-windows-msvc
host_os: windows-latest

- target: i686-unknown-linux-gnu
host_os: ubuntu-18.04
host_os: ubuntu-22.04

- target: i686-unknown-linux-musl
host_os: ubuntu-18.04
host_os: ubuntu-22.04

- target: x86_64-pc-windows-gnu
host_os: windows-latest
Expand All @@ -255,10 +255,10 @@ jobs:
host_os: macos-latest

- target: x86_64-unknown-linux-musl
host_os: ubuntu-18.04
host_os: ubuntu-22.04

- target: x86_64-unknown-linux-gnu
host_os: ubuntu-18.04
host_os: ubuntu-22.04

steps:
- if: ${{ contains(matrix.host_os, 'ubuntu') }}
Expand Down Expand Up @@ -351,13 +351,13 @@ jobs:

include:
- target: aarch64-unknown-linux-musl
host_os: ubuntu-18.04
host_os: ubuntu-22.04

- target: i686-pc-windows-msvc
host_os: windows-latest

- target: x86_64-unknown-linux-gnu
host_os: ubuntu-18.04
host_os: ubuntu-22.04

steps:
- if: ${{ contains(matrix.host_os, 'ubuntu') }}
Expand Down Expand Up @@ -433,7 +433,7 @@ jobs:
- --no-default-features --features=wasm32_unknown_unknown_js

host_os:
- ubuntu-18.04
- ubuntu-22.04
mode:
- # debug
- --release
Expand Down Expand Up @@ -507,16 +507,16 @@ jobs:
# https://github.com/rust-lang/rust/issues/79556 and
# https://github.com/rust-lang/rust/issues/79555 are fixed.
- target: aarch64-unknown-linux-gnu
host_os: ubuntu-18.04
host_os: ubuntu-22.04

# TODO: Use the -musl target after
# https://github.com/rust-lang/rust/issues/79556 and
# https://github.com/rust-lang/rust/issues/79555 are fixed.
- target: i686-unknown-linux-gnu
host_os: ubuntu-18.04
host_os: ubuntu-22.04

- target: x86_64-unknown-linux-musl
host_os: ubuntu-18.04
host_os: ubuntu-22.04

# TODO: Add an ARM target after
# https://github.com/rust-lang/rust/issues/79555 is fixed. This may
Expand Down
9 changes: 6 additions & 3 deletions mk/check-symbol-prefixes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,18 @@ for arg in $*; do
esac
done

ar_exe=ar
nm_exe=nm
case $target in
--target=aarch64-unknown-linux-gnu|*-musl*|wasm32-*)
aarch64-unknown-linux-gnu|*-musl*|wasm32-*)
ar_exe=llvm-ar-$llvm_version
nm_exe=llvm-nm-$llvm_version
;;
--target=*-android*)
*-android*)
ndk_version=25.1.8937393
ANDROID_NDK_ROOT=${ANDROID_NDK_ROOT:-${ANDROID_HOME}/ndk/$ndk_version}
android_tools=${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64/bin
ar_exe=$android_tools/llvm-ar
nm_exe=$android_tools/llvm-nm
;;
esac
Expand All @@ -55,7 +58,7 @@ find target/$target -type f -name libring-*.rlib | while read -r infile; do
tmpfile=$infile-without-lib-rmeta
cp "$infile" "$tmpfile"
# `nm` doesn't understand `lib.rmeta`.
ar d "$tmpfile" lib.rmeta
$ar_exe d "$tmpfile" lib.rmeta
bad=$($nm_exe --defined-only --extern-only --print-file-name "$tmpfile" \
| ( grep -v -E " . _?(ring_core_|__rustc|_ZN|DW.ref.rust_eh_personality)" || [[ $? == 1 ]] ))
rm "$tmpfile"
Expand Down
3 changes: 2 additions & 1 deletion mk/install-build-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,10 @@ esac
if [ -n "$use_clang" ]; then
# https://github.com/rustls/rustls/pull/1009 upgraded Rust's LLVM version to
# 14
ubuntu_codename=$(lsb_release --codename --short)
llvm_version=15
sudo apt-key add mk/llvm-snapshot.gpg.key
sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-$llvm_version main"
sudo add-apt-repository "deb http://apt.llvm.org/$ubuntu_codename/ llvm-toolchain-$ubuntu_codename-$llvm_version main"
sudo apt-get update
install_packages clang-$llvm_version llvm-$llvm_version
fi

0 comments on commit 993da11

Please sign in to comment.