Skip to content

Commit

Permalink
CI: use MUSL when compiling for Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
vrmiguel committed Apr 6, 2021
1 parent 8837c71 commit 8e68040
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,33 @@ jobs:
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
toolchain: stable
target: x86_64-unknown-linux-musl
override: true

- name: Install dependencies for musl libc
run: |
sudo apt-get update
sudo apt-get install musl-tools
- name: Run cargo build
uses: actions-rs/cargo@v1
with:
command: build
args: --release
args: --release --target x86_64-unknown-linux-musl

- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test

- name: Strip binary
run: strip target/release/ouch
run: strip target/x86_64-unknown-linux-musl/release/ouch

- name: Upload binary
uses: actions/upload-artifact@v2
with:
name: 'ouch-ubuntu-18.04-glibc'
path: target/release/ouch
name: 'ouch-linux-musl'
path: target/x86_64-unknown-linux-musl/release/ouch

macos:
name: macOS
Expand Down

0 comments on commit 8e68040

Please sign in to comment.