From 75c9e3e5df92936defb8a5c7832a44b6fda0551c Mon Sep 17 00:00:00 2001 From: Justin Ma Date: Thu, 4 Jan 2024 07:55:10 +0800 Subject: [PATCH] Try to fix riscv64 building by using unbuntu-latest (#11476) Try to fix `riscv64gc-unknown-linux-gnu` building by using `unbuntu-latest` This PR should close https://github.com/nushell/nushell/issues/11452 The action should run without errors: https://github.com/nushell/nightly/actions/runs/7394915358 --- .github/workflows/nightly-build.yml | 2 +- .github/workflows/release-pkg.nu | 8 ++++---- .github/workflows/release.yml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index 737d58685..9832c22be 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -119,7 +119,7 @@ jobs: os: ubuntu-20.04 target_rustflags: '' - target: riscv64gc-unknown-linux-gnu - os: ubuntu-20.04 + os: ubuntu-latest target_rustflags: '' runs-on: ${{matrix.os}} diff --git a/.github/workflows/release-pkg.nu b/.github/workflows/release-pkg.nu index 7c9a9b594..eab8a77d8 100755 --- a/.github/workflows/release-pkg.nu +++ b/.github/workflows/release-pkg.nu @@ -82,8 +82,8 @@ print $'Start building ($bin)...'; hr-line # ---------------------------------------------------------------------------- # Build for Ubuntu and macOS # ---------------------------------------------------------------------------- -if $os in [$USE_UBUNTU, 'macos-latest'] { - if $os == $USE_UBUNTU { +if $os in [$USE_UBUNTU, 'macos-latest', 'ubuntu-latest'] { + if $os starts-with ubuntu { sudo apt update sudo apt-get install libxcb-composite0-dev -y } @@ -106,7 +106,7 @@ if $os in [$USE_UBUNTU, 'macos-latest'] { _ => { # musl-tools to fix 'Failed to find tool. Is `musl-gcc` installed?' # Actually just for x86_64-unknown-linux-musl target - if $os == $USE_UBUNTU { sudo apt install musl-tools -y } + if $os starts-with 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'] { +if $os in [$USE_UBUNTU, 'macos-latest', 'ubuntu-latest'] { 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 d64e9b4f6..7ceb2b4d6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -66,7 +66,7 @@ jobs: os: ubuntu-20.04 target_rustflags: '' - target: riscv64gc-unknown-linux-gnu - os: ubuntu-20.04 + os: ubuntu-latest target_rustflags: '' runs-on: ${{matrix.os}}