Skip to content

Commit

Permalink
Merge pull request #4 from Ionizing/CI-tests
Browse files Browse the repository at this point in the history
Update rust.yml
  • Loading branch information
Ionizing committed Jul 2, 2022
2 parents f820c49 + 41a8ccc commit 925659b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 16 deletions.
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

0 comments on commit 925659b

Please sign in to comment.