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: diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b60e61f..ee37478 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -20,10 +20,13 @@ jobs: steps: - uses: actions/checkout@v2 - name: Install Rust - run: | + 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 - export PATH=/root/.cargo/bin:$PATH - rustup target add x86_64-unknown-linux-musl + echo $HOME/.cargo/bin >> $GITHUB_PATH + source $HOME/.cargo/env + which rustup + which cargo - name: Build run: cargo build --verbose --release - name: Run tests