From 10f87875245f99688c9f5ffc39eb4e8f97d540e1 Mon Sep 17 00:00:00 2001 From: Wei Lee Date: Wed, 19 Feb 2025 15:22:33 +0800 Subject: [PATCH] feat: update ubuntu version from 20.04 to 22.04 --- .github/workflows/release.yml | 12 ++++++------ book/src/ci/customizing.md | 12 ++++++------ cargo-dist-schema/src/lib.rs | 6 +++--- .../src/snapshots/dist_schema__emit.snap | 2 +- cargo-dist/src/backend/ci/github.rs | 6 +++--- cargo-dist/src/config/v1/ci/github.rs | 2 +- cargo-dist/src/platform.rs | 4 ++-- cargo-dist/src/platform/github_runners.rs | 4 ++-- cargo-dist/tests/snapshots/akaikatana_basic.snap | 12 ++++++------ cargo-dist/tests/snapshots/akaikatana_musl.snap | 12 ++++++------ ...akaikatana_one_alias_among_many_binaries.snap | 12 ++++++------ .../snapshots/akaikatana_two_bin_aliases.snap | 12 ++++++------ .../tests/snapshots/akaikatana_updaters.snap | 12 ++++++------ cargo-dist/tests/snapshots/axolotlsay_abyss.snap | 10 +++++----- .../tests/snapshots/axolotlsay_abyss_only.snap | 10 +++++----- cargo-dist/tests/snapshots/axolotlsay_alias.snap | 12 ++++++------ .../axolotlsay_alias_ignores_missing_bins.snap | 12 ++++++------ cargo-dist/tests/snapshots/axolotlsay_basic.snap | 16 ++++++++-------- .../tests/snapshots/axolotlsay_basic_lies.snap | 12 ++++++------ .../snapshots/axolotlsay_build_setup_steps.snap | 14 +++++++------- .../snapshots/axolotlsay_checksum_blake2b.snap | 10 +++++----- .../snapshots/axolotlsay_checksum_blake2s.snap | 10 +++++----- .../snapshots/axolotlsay_checksum_sha3_256.snap | 10 +++++----- .../snapshots/axolotlsay_checksum_sha3_512.snap | 10 +++++----- .../tests/snapshots/axolotlsay_cross1.snap | 16 ++++++++-------- .../tests/snapshots/axolotlsay_cross2.snap | 12 ++++++------ .../snapshots/axolotlsay_custom_formula.snap | 12 ++++++------ .../axolotlsay_disable_source_tarball.snap | 12 ++++++------ .../tests/snapshots/axolotlsay_dispatch.snap | 10 +++++----- .../snapshots/axolotlsay_dispatch_abyss.snap | 10 +++++----- .../axolotlsay_dispatch_abyss_only.snap | 10 +++++----- .../snapshots/axolotlsay_dist_url_override.snap | 10 +++++----- .../snapshots/axolotlsay_edit_existing.snap | 12 ++++++------ .../axolotlsay_generic_workspace_basic.snap | 12 ++++++------ .../axolotlsay_homebrew_linux_only.snap | 12 ++++++------ .../axolotlsay_homebrew_macos_x86_64_only.snap | 10 +++++----- .../snapshots/axolotlsay_homebrew_packages.snap | 12 ++++++------ cargo-dist/tests/snapshots/axolotlsay_musl.snap | 12 ++++++------ .../tests/snapshots/axolotlsay_musl_no_gnu.snap | 10 +++++----- .../axolotlsay_no_homebrew_publish.snap | 10 +++++----- .../tests/snapshots/axolotlsay_no_locals.snap | 10 +++++----- .../axolotlsay_no_locals_but_custom.snap | 10 +++++----- .../snapshots/axolotlsay_several_aliases.snap | 12 ++++++------ .../axolotlsay_ssldotcom_windows_sign.snap | 10 +++++----- .../axolotlsay_ssldotcom_windows_sign_prod.snap | 10 +++++----- .../snapshots/axolotlsay_tag_namespace.snap | 10 +++++----- .../tests/snapshots/axolotlsay_updaters.snap | 12 ++++++------ .../axolotlsay_user_global_build_job.snap | 12 ++++++------ .../snapshots/axolotlsay_user_host_job.snap | 12 ++++++------ .../axolotlsay_user_local_build_job.snap | 12 ++++++------ .../snapshots/axolotlsay_user_plan_job.snap | 12 ++++++------ .../snapshots/axolotlsay_user_publish_job.snap | 12 ++++++------ .../tests/snapshots/install_path_cargo_home.snap | 2 +- .../snapshots/install_path_env_no_subdir.snap | 2 +- .../tests/snapshots/install_path_env_subdir.snap | 2 +- .../snapshots/install_path_env_subdir_space.snap | 2 +- .../install_path_env_subdir_space_deeper.snap | 2 +- .../install_path_fallback_no_env_var_set.snap | 2 +- .../install_path_fallback_to_cargo_home.snap | 4 ++-- .../install_path_home_subdir_deeper.snap | 2 +- .../snapshots/install_path_home_subdir_min.snap | 2 +- .../install_path_home_subdir_space.snap | 2 +- .../install_path_home_subdir_space_deeper.snap | 2 +- .../install_path_no_fallback_taken.snap | 2 +- cargo-dist/tests/snapshots/manifest.snap | 8 ++++---- 65 files changed, 292 insertions(+), 292 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 67fc9b052..7578378cd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 || '' }} @@ -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 @@ -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: @@ -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 }} @@ -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 }} @@ -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 }} diff --git a/book/src/ci/customizing.md b/book/src/ci/customizing.md index b8b4db2fd..ec4cc3cbe 100644 --- a/book/src/ci/customizing.md +++ b/book/src/ci/customizing.md @@ -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` @@ -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" ``` @@ -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 @@ -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 diff --git a/cargo-dist-schema/src/lib.rs b/cargo-dist-schema/src/lib.rs index 954e3e04d..61e8ae9cd 100644 --- a/cargo-dist-schema/src/lib.rs +++ b/cargo-dist-schema/src/lib.rs @@ -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` @@ -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, @@ -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, diff --git a/cargo-dist-schema/src/snapshots/dist_schema__emit.snap b/cargo-dist-schema/src/snapshots/dist_schema__emit.snap index 047cd3364..9eb6fe36e 100644 --- a/cargo-dist-schema/src/snapshots/dist_schema__emit.snap +++ b/cargo-dist-schema/src/snapshots/dist_schema__emit.snap @@ -698,7 +698,7 @@ expression: json_schema "type": "string" }, "image": { - "description": "The container image to run, something like `ubuntu:20.04` or `quay.io/pypa/manylinux_2_28_x86_64`", + "description": "The container image to run, something like `ubuntu:22.04` or `quay.io/pypa/manylinux_2_28_x86_64`", "type": "string" }, "package_manager": { diff --git a/cargo-dist/src/backend/ci/github.rs b/cargo-dist/src/backend/ci/github.rs index 3d19c1dea..b0bb8ea90 100644 --- a/cargo-dist/src/backend/ci/github.rs +++ b/cargo-dist/src/backend/ci/github.rs @@ -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) @@ -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 @@ -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(), diff --git a/cargo-dist/src/config/v1/ci/github.rs b/cargo-dist/src/config/v1/ci/github.rs index 2fe6a6fbf..68a8a9088 100644 --- a/cargo-dist/src/config/v1/ci/github.rs +++ b/cargo-dist/src/config/v1/ci/github.rs @@ -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() diff --git a/cargo-dist/src/platform.rs b/cargo-dist/src/platform.rs index d6ff39614..157d119ea 100644 --- a/cargo-dist/src/platform.rs +++ b/cargo-dist/src/platform.rs @@ -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 { @@ -940,7 +940,7 @@ fn native_glibc_version(system: &SystemInfo, linkage: &Linkage) -> Option