From 4cfc7a9471285a29cdb5ef2416660ffcb1bbc850 Mon Sep 17 00:00:00 2001 From: jcamiel Date: Thu, 22 Dec 2022 12:01:57 +0100 Subject: [PATCH] Fix cargo test --doc on Alpine --- .cargo/config.toml | 5 +++++ .github/workflows/test.yml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .cargo/config.toml diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 00000000000..039e3cbe056 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,5 @@ +# On platforms with musl, we desactivate static linking +# with CRT: on Alpine for instance, we must compile Hurl with this flag +# in order to produce a valid binary (mainly because of curl crate) +[target.'cfg(target_env = "musl")'] +rustflags = ["-Ctarget-feature=-crt-static"] diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e7e1b00a441..560ce91ed20 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -205,7 +205,7 @@ jobs: uses: addnab/docker-run-action@v3 with: image: alpine - options: --volume ${{ github.workspace }}:/work --workdir /work --privileged --env CARGO_TERM_COLOR=always --env RUSTFLAGS=-Ctarget-feature=-crt-static + options: --volume ${{ github.workspace }}:/work --workdir /work --privileged --env CARGO_TERM_COLOR=always run: | set -e apk update --quiet