From 1e2f34ed7bd383289920042b4f43f89fdf417900 Mon Sep 17 00:00:00 2001 From: hustcer Date: Wed, 28 Feb 2024 15:08:04 +0800 Subject: [PATCH] Try to upgrade ubuntu to 22.04 to fix Linux releases --- .github/workflows/nightly-build.yml | 14 +++++++------- .github/workflows/release-pkg.nu | 10 +++++----- .github/workflows/release.yml | 14 +++++++------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index 08f2880ac0..a75933bad4 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -105,16 +105,16 @@ jobs: os: windows-latest target_rustflags: '' - target: x86_64-unknown-linux-gnu - os: ubuntu-20.04 + os: ubuntu-latest target_rustflags: '' - target: x86_64-unknown-linux-musl - os: ubuntu-20.04 + os: ubuntu-latest target_rustflags: '' - target: aarch64-unknown-linux-gnu - os: ubuntu-20.04 + os: ubuntu-latest target_rustflags: '' - target: armv7-unknown-linux-gnueabihf - os: ubuntu-20.04 + os: ubuntu-latest target_rustflags: '' - target: riscv64gc-unknown-linux-gnu os: ubuntu-latest @@ -223,13 +223,13 @@ jobs: os: windows-latest target_rustflags: '--features=dataframe,extra' - target: x86_64-unknown-linux-gnu - os: ubuntu-20.04 + os: ubuntu-latest target_rustflags: '--features=dataframe,extra' - target: x86_64-unknown-linux-musl - os: ubuntu-20.04 + os: ubuntu-latest target_rustflags: '--features=dataframe,extra' - target: aarch64-unknown-linux-gnu - os: ubuntu-20.04 + os: ubuntu-latest target_rustflags: '--features=dataframe,extra' runs-on: ${{matrix.os}} diff --git a/.github/workflows/release-pkg.nu b/.github/workflows/release-pkg.nu index eab8a77d86..07366f2d8e 100755 --- a/.github/workflows/release-pkg.nu +++ b/.github/workflows/release-pkg.nu @@ -71,7 +71,7 @@ const FULL_RLS_NAMING = { # $env -let USE_UBUNTU = 'ubuntu-20.04' +let USE_UBUNTU = $os starts-with ubuntu let FULL_NAME = $FULL_RLS_NAMING | get -i $target | default 'unknown-target-full' print $'(char nl)Packaging ($bin) v($version) for ($target) in ($src)...'; hr-line -b @@ -82,8 +82,8 @@ print $'Start building ($bin)...'; hr-line # ---------------------------------------------------------------------------- # Build for Ubuntu and macOS # ---------------------------------------------------------------------------- -if $os in [$USE_UBUNTU, 'macos-latest', 'ubuntu-latest'] { - if $os starts-with ubuntu { +if $os in ['macos-latest'] or $USE_UBUNTU { + if $USE_UBUNTU { sudo apt update sudo apt-get install libxcb-composite0-dev -y } @@ -106,7 +106,7 @@ if $os in [$USE_UBUNTU, 'macos-latest', 'ubuntu-latest'] { _ => { # musl-tools to fix 'Failed to find tool. Is `musl-gcc` installed?' # Actually just for x86_64-unknown-linux-musl target - if $os starts-with ubuntu { sudo apt install musl-tools -y } + if $USE_UBUNTU { sudo apt install musl-tools -y } cargo-build-nu $flags } } @@ -153,7 +153,7 @@ if ($ver | str trim | is-empty) { # Create a release archive and send it to output for the following steps # ---------------------------------------------------------------------------- cd $dist; print $'(char nl)Creating release archive...'; hr-line -if $os in [$USE_UBUNTU, 'macos-latest', 'ubuntu-latest'] { +if $os in ['macos-latest'] or $USE_UBUNTU { let files = (ls | get name) let dest = if $env.RELEASE_TYPE == 'full' { $'($bin)-($version)-($FULL_NAME)' } else { $'($bin)-($version)-($target)' } diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a8bee58fbe..98473a4996 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -54,16 +54,16 @@ jobs: os: windows-latest target_rustflags: '' - target: x86_64-unknown-linux-gnu - os: ubuntu-20.04 + os: ubuntu-latest target_rustflags: '' - target: x86_64-unknown-linux-musl - os: ubuntu-20.04 + os: ubuntu-latest target_rustflags: '' - target: aarch64-unknown-linux-gnu - os: ubuntu-20.04 + os: ubuntu-latest target_rustflags: '' - target: armv7-unknown-linux-gnueabihf - os: ubuntu-20.04 + os: ubuntu-latest target_rustflags: '' - target: riscv64gc-unknown-linux-gnu os: ubuntu-latest @@ -149,13 +149,13 @@ jobs: os: windows-latest target_rustflags: '--features=dataframe,extra' - target: x86_64-unknown-linux-gnu - os: ubuntu-20.04 + os: ubuntu-latest target_rustflags: '--features=dataframe,extra' - target: x86_64-unknown-linux-musl - os: ubuntu-20.04 + os: ubuntu-latest target_rustflags: '--features=dataframe,extra' - target: aarch64-unknown-linux-gnu - os: ubuntu-20.04 + os: ubuntu-latest target_rustflags: '--features=dataframe,extra' runs-on: ${{matrix.os}}