Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rust.yml #4

Merged
merged 7 commits into from
Jul 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions .github/workflows/release-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,29 +39,31 @@ 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: |
cd target/release
strip rsgrad
chmod +x rsgrad
tar -c rsgrad | gzip > rsgrad.tar.gz

- name: Upload binary
uses: actions/upload-release-asset@v1
env:
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down