Skip to content

Commit c3f4de3

Browse files
bjorn3squell
authored andcommitted
Test on alpine linux for musl
1 parent 5259536 commit c3f4de3

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,39 @@ jobs:
302302
- name: Run tests
303303
run: sudo -ubuilder cargo test --workspace --all-targets --release
304304

305+
build-and-test-alpine:
306+
runs-on: ubuntu-latest
307+
container: alpine:latest
308+
309+
steps:
310+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
311+
312+
- name: Install dependencies
313+
run: |
314+
apk add cargo linux-pam-dev sudo tzdata coreutils-fmt
315+
316+
- name: Rust Cache
317+
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
318+
with:
319+
shared-key: "stable-alpine"
320+
321+
- name: Register rust problem matcher
322+
run: echo "::add-matcher::.github/problem-matchers/rust.json"
323+
324+
- name: Reduce privileges
325+
run: |
326+
adduser --disabled-password builder
327+
chown builder .
328+
329+
- name: Build
330+
run: sudo -ubuilder cargo build --workspace --all-targets --release
331+
332+
- name: Run tests
333+
run: |
334+
# Alpine hasn't done usr-merge yet
335+
sudo -ubuilder cargo test --workspace --all-targets --release \
336+
-- --skip canonicalization --skip test_build_run_context
337+
305338
build-and-test-32bit:
306339
runs-on: ubuntu-latest
307340

0 commit comments

Comments
 (0)