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

feat: update ubuntu version from 20.04 to 22.04 #1766

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ on:
jobs:
# Run 'dist plan' (or host) to determine what tasks we need to do
plan:
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-22.04"
outputs:
val: ${{ steps.plan.outputs.manifest }}
tag: ${{ !github.event.pull_request && github.ref_name || '' }}
Expand Down Expand Up @@ -176,7 +176,7 @@ jobs:
needs:
- plan
- build-local-artifacts
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-22.04"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BUILD_MANIFEST_NAME: target/distrib/global-dist-manifest.json
Expand Down Expand Up @@ -236,7 +236,7 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AXO_RELEASES_TOKEN: ${{ secrets.AXO_RELEASES_TOKEN }}
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-22.04"
outputs:
val: ${{ steps.host.outputs.manifest }}
steps:
Expand Down Expand Up @@ -276,7 +276,7 @@ jobs:
needs:
- plan
- host
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-22.04"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PLAN: ${{ needs.plan.outputs.val }}
Expand Down Expand Up @@ -321,7 +321,7 @@ jobs:
needs:
- plan
- host
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-22.04"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PLAN: ${{ needs.plan.outputs.val }}
Expand Down Expand Up @@ -372,7 +372,7 @@ jobs:
# still allowing individual publish jobs to skip themselves (for prereleases).
# "host" however must run to completion, no skipping allowed!
if: ${{ always() && needs.host.result == 'success' && (needs.publish-homebrew-formula.result == 'skipped' || needs.publish-homebrew-formula.result == 'success') && (needs.publish-npm.result == 'skipped' || needs.publish-npm.result == 'success') && (needs.custom-publish-crates.result == 'skipped' || needs.custom-publish-crates.result == 'success') }}
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-22.04"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AXO_RELEASES_TOKEN: ${{ secrets.AXO_RELEASES_TOKEN }}
Expand Down
12 changes: 6 additions & 6 deletions book/src/ci/customizing.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Running `dist init` for your tool will update your GitHub Actions configuration

By default, dist uses the following runners:

* Linux (x86_64): `ubuntu-20.04`
* Linux (x86_64): `ubuntu-22.04`
* macOS (x86_64): `macos-13`
* macOS (Apple Silicon): `macos-13`
* Windows (x86_64): `windows-2019`
Expand Down Expand Up @@ -130,14 +130,14 @@ there are no free `aarch64` GitHub runners, dist will assume you meant this:

```toml
[dist.github-custom-runners]
aarch64-unknown-linux-gnu = "ubuntu-20.04"
aarch64-unknown-linux-gnu = "ubuntu-22.04"
```

Which really means this:

```toml
[dist.github-custom-runners.aarch64-unknown-linux-gnu]
runner = "ubuntu-20.04"
runner = "ubuntu-22.04"
host = "x86_64-unknown-linux-gnu"
```

Expand Down Expand Up @@ -168,10 +168,10 @@ This will work, eventually:
targets = ["x86_64-pc-windows-msvc", "aarch64-pc-windows-msvc"]

[dist.github-custom-runners.x86_64-pc-windows-msvc]
runner = "ubuntu-20.04"
runner = "ubuntu-22.04"

[dist.github-custom-runners.aarch64-pc-windows-msvc]
runner = "ubuntu-20.04"
runner = "ubuntu-22.04"
```

...because dist can install `cargo-xwin` via `pip`. However, it will take
Expand Down Expand Up @@ -221,7 +221,7 @@ aarch64-pc-windows-msvc.container = "messense/cargo-xwin"
```

Note that you can use containers for non-cross reasons: maybe you want your binaries to be
compatible with really old versions of glibc, older than Ubuntu 20.04: in this case, you
compatible with really old versions of glibc, older than Ubuntu 22.04: in this case, you
can do something like:

```toml
Expand Down
6 changes: 3 additions & 3 deletions cargo-dist-schema/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ impl TripleNameRef {
}
}
declare_strongly_typed_string! {
/// The name of a Github Actions Runner, like `ubuntu-20.04` or `macos-13`
/// The name of a Github Actions Runner, like `ubuntu-22.04` or `macos-13`
pub struct GithubRunner => &GithubRunnerRef;

/// A container image, like `quay.io/pypa/manylinux_2_28_x86_64`
Expand Down Expand Up @@ -412,7 +412,7 @@ impl GithubRunnerConfig {
/// GitHub config that's common between different kinds of jobs (global, local)
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
pub struct ContainerConfigInput {
/// The container image to run, something like `ubuntu:20.04` or
/// The container image to run, something like `ubuntu:22.04` or
/// `quay.io/pypa/manylinux_2_28_x86_64`
pub image: ContainerImage,

Expand All @@ -428,7 +428,7 @@ pub struct ContainerConfigInput {
/// GitHub config that's common between different kinds of jobs (global, local)
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq, PartialOrd, Ord)]
pub struct ContainerConfig {
/// The container image to run, something like `ubuntu:20.04` or
/// The container image to run, something like `ubuntu:22.04` or
/// `quay.io/pypa/manylinux_2_28_x86_64`
pub image: ContainerImage,

Expand Down
2 changes: 1 addition & 1 deletion cargo-dist-schema/src/snapshots/dist_schema__emit.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions cargo-dist/src/backend/ci/github.rs
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ pub fn runner_to_config(runner: &GithubRunnerRef) -> GithubRunnerConfig {
}
}

const DEFAULT_LINUX_RUNNER: &GithubRunnerRef = GithubRunnerRef::from_str("ubuntu-20.04");
const DEFAULT_LINUX_RUNNER: &GithubRunnerRef = GithubRunnerRef::from_str("ubuntu-22.04");

fn default_global_runner_config() -> GithubRunnerConfig {
runner_to_config(DEFAULT_LINUX_RUNNER)
Expand All @@ -659,7 +659,7 @@ fn github_runner_for_target(
// where random system dependencies can creep in and be very
// recent. This helps with portability!
let result = Some(match target_triple.operating_system {
OperatingSystem::Linux => runner_to_config(GithubRunnerRef::from_str("ubuntu-20.04")),
OperatingSystem::Linux => runner_to_config(GithubRunnerRef::from_str("ubuntu-22.04")),
OperatingSystem::Darwin => runner_to_config(GithubRunnerRef::from_str("macos-13")),
OperatingSystem::Windows => {
// Default to cargo-xwin for Windows cross-compiles
Expand All @@ -677,7 +677,7 @@ fn github_runner_for_target(

fn cargo_xwin() -> GithubRunnerConfig {
GithubRunnerConfig {
runner: GithubRunnerRef::from_str("ubuntu-20.04").to_owned(),
runner: GithubRunnerRef::from_str("ubuntu-22.04").to_owned(),
host: targets::TARGET_X64_LINUX_GNU.to_owned(),
container: Some(dist_schema::ContainerConfig {
image: ContainerImageRef::from_str("messense/cargo-xwin").to_owned(),
Expand Down
2 changes: 1 addition & 1 deletion cargo-dist/src/config/v1/ci/github.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ impl ApplyLayer for GithubCiConfig {
) {
self.common.apply_layer(common);

let mk_default_github_runner = || GithubRunner::new("ubuntu-20.04".to_owned());
let mk_default_github_runner = || GithubRunner::new("ubuntu-22.04".to_owned());
self.runners.apply_val(runners.map(|runners| {
runners
.into_iter()
Expand Down
4 changes: 2 additions & 2 deletions cargo-dist/src/platform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ impl LibcVersion {
/// Get the default glibc version for cases where we just need to guess
/// and make one up.
///
/// This is the glibc of Ubuntu 20.04, which is the oldest supported
/// This is the glibc of Ubuntu 22.04, which is the oldest supported
/// github linux runner, as of this writing.
pub fn default_glibc() -> Self {
Self {
Expand Down Expand Up @@ -940,7 +940,7 @@ fn native_glibc_version(system: &SystemInfo, linkage: &Linkage) -> Option<LibcVe
// If there's a system libc, assume that's what it was built against
return Some(LibcVersion::glibc_from_schema(system_glibc));
} else {
// If the system has no known libc version use Ubuntu 20.04's glibc as a guess
// If the system has no known libc version use Ubuntu 22.04's glibc as a guess
return Some(LibcVersion::default_glibc());
}
}
Expand Down
4 changes: 2 additions & 2 deletions cargo-dist/src/platform/github_runners.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ lazy_static::lazy_static! {
// last updated 2024-10-25

//-------- linux
m.insert(GithubRunnerRef::from_str("ubuntu-20.04"), t::TARGET_X64_LINUX_GNU);
m.insert(GithubRunnerRef::from_str("ubuntu-22.04"), t::TARGET_X64_LINUX_GNU);
m.insert(GithubRunnerRef::from_str("ubuntu-22.04"), t::TARGET_X64_LINUX_GNU);
m.insert(GithubRunnerRef::from_str("ubuntu-24.04"), t::TARGET_X64_LINUX_GNU);
m.insert(GithubRunnerRef::from_str("ubuntu-latest"), t::TARGET_X64_LINUX_GNU);
Expand Down Expand Up @@ -91,7 +91,7 @@ mod tests {
#[test]
fn test_target_for_github_runner() {
assert_eq!(
target_for_github_runner(GithubRunnerRef::from_str("ubuntu-20.04")),
target_for_github_runner(GithubRunnerRef::from_str("ubuntu-22.04")),
Some(t::TARGET_X64_LINUX_GNU)
);
assert_eq!(
Expand Down
12 changes: 6 additions & 6 deletions cargo-dist/tests/snapshots/akaikatana_basic.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions cargo-dist/tests/snapshots/akaikatana_musl.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading