From 8e680402a929986796c9418605b2d84314fd2684 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Miguel?= <36349314+vrmiguel@users.noreply.github.com> Date: Mon, 5 Apr 2021 21:46:27 -0300 Subject: [PATCH] CI: use MUSL when compiling for Linux --- .github/workflows/build.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d8ee193..0fc3b31 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,14 +17,19 @@ 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 @@ -32,13 +37,13 @@ jobs: 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