From 41a8ccca3d98f792ad1a6480c96db3277aa244ca Mon Sep 17 00:00:00 2001 From: Ionizing <17506747+Ionizing@users.noreply.github.com> Date: Sat, 2 Jul 2022 14:29:45 +0800 Subject: [PATCH] Update release-binaries.yml --- .github/workflows/release-binaries.yml | 28 ++++++++++++++------------ 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml index b097643..784730b 100644 --- a/.github/workflows/release-binaries.yml +++ b/.github/workflows/release-binaries.yml @@ -39,22 +39,23 @@ jobs: asset_content_type: application/zip linux-x86_64: - runs-on: ubuntu-latest + runs-on: ubuntu-18.04 + container: centos:7 steps: - uses: actions/checkout@v1 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - default: true - - - name: Build binary - uses: actions-rs/cargo@v1 - with: - command: build - args: --release - use-cross: true + - name: Install Rust + run: | + yum install -y gcc g++ which + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y --target x86_64-unknown-linux-musl x86_64-unknown-linux-gnu + echo $HOME/.cargo/bin >> $GITHUB_PATH + source $HOME/.cargo/env + which rustup + which cargo + + - name: Build + run: | + cargo build --verbose --release - name: Optimize and package binary run: | @@ -62,6 +63,7 @@ jobs: strip rsgrad chmod +x rsgrad tar -c rsgrad | gzip > rsgrad.tar.gz + - name: Upload binary uses: actions/upload-release-asset@v1 env: