-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (39 loc) · 1.19 KB
/
build-musl.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: MuslBuild
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
CARGO_HOME: "/usr/local/cargo/"
RUSTUP_HOME: "/usr/local/rustup"
SCCACHE_DIR: "/usr/local/sccache"
RUSTC_WRAPPER: "/usr/local/bin/sccache"
jobs:
build-musl:
runs-on: self-hosted
container:
image: rust:latest
volumes:
- /var/lib/docker:/var/lib/docker
- /usr/local/cargo/git:/usr/local/cargo/git
- /usr/local/cargo/registry:/usr/local/cargo/registry
- /usr/local/sccache:/usr/local/sccache
- /usr/local/rustup:/usr/local/rustup
steps:
- uses: actions/checkout@v3
- uses: themeliolabs/actions-sccache@v1
- uses: themeliolabs/actions-mold@v1
- name: Update Apt
run: apt update
- name: Install Musl
run: apt install -y musl musl-tools
- name: Update Rust
run: rustup update
- name: Add Musl Target
run: rustup target add x86_64-unknown-linux-musl
- name: Run Musl Build
run: mold --run cargo build --target x86_64-unknown-linux-musl --all-features --verbose
- name: Clippy
run: mold --run cargo clippy