mirror of
https://github.com/ouch-org/ouch.git
synced 2025-06-06 19:45:29 +00:00
CI: use MUSL when compiling for Linux
This commit is contained in:
parent
8837c71457
commit
8e680402a9
15
.github/workflows/build.yml
vendored
15
.github/workflows/build.yml
vendored
@ -17,14 +17,19 @@ jobs:
|
|||||||
- name: Install toolchain
|
- name: Install toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ matrix.rust }}
|
toolchain: stable
|
||||||
|
target: x86_64-unknown-linux-musl
|
||||||
override: true
|
override: true
|
||||||
|
|
||||||
|
- name: Install dependencies for musl libc
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install musl-tools
|
||||||
- name: Run cargo build
|
- name: Run cargo build
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: build
|
command: build
|
||||||
args: --release
|
args: --release --target x86_64-unknown-linux-musl
|
||||||
|
|
||||||
- name: Run cargo test
|
- name: Run cargo test
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
@ -32,13 +37,13 @@ jobs:
|
|||||||
command: test
|
command: test
|
||||||
|
|
||||||
- name: Strip binary
|
- name: Strip binary
|
||||||
run: strip target/release/ouch
|
run: strip target/x86_64-unknown-linux-musl/release/ouch
|
||||||
|
|
||||||
- name: Upload binary
|
- name: Upload binary
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: 'ouch-ubuntu-18.04-glibc'
|
name: 'ouch-linux-musl'
|
||||||
path: target/release/ouch
|
path: target/x86_64-unknown-linux-musl/release/ouch
|
||||||
|
|
||||||
macos:
|
macos:
|
||||||
name: macOS
|
name: macOS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user