-
Notifications
You must be signed in to change notification settings - Fork 11
57 lines (49 loc) · 2.04 KB
/
robotmk_build.yaml
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
55
56
57
---
name: "Build Robotmk"
on:
workflow_call: {}
jobs:
build_windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
target: x86_64-pc-windows-gnu
# By default, setup-rust-toolchain sets "-D warnings". As a side effect, the settings in
# .cargo/config.toml are ignored:
# https://doc.rust-lang.org/cargo/reference/config.html#buildrustflags
# "There are four mutually exclusive sources of extra flags"
rustflags: ""
- run: cargo build --target=x86_64-pc-windows-gnu --release
- uses: actions/upload-artifact@v4
with:
name: rmk_windows64
path: |
target/x86_64-pc-windows-gnu/release/robotmk_scheduler.exe
target/x86_64-pc-windows-gnu/release/robotmk_agent_plugin.exe
if-no-files-found: error
build_linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: sudo apt-get update
- run: sudo apt-get install -y musl-tools
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
target: x86_64-unknown-linux-musl
# By default, setup-rust-toolchain sets "-D warnings". As a side effect, the settings in
# .cargo/config.toml are ignored:
# https://doc.rust-lang.org/cargo/reference/config.html#buildrustflags
# "There are four mutually exclusive sources of extra flags"
rustflags: ""
- run: cargo build --target=x86_64-unknown-linux-musl --release
- run: ldd target/x86_64-unknown-linux-musl/release/robotmk_scheduler | grep "statically linked"
- run: ldd target/x86_64-unknown-linux-musl/release/robotmk_agent_plugin | grep "statically linked"
- uses: actions/upload-artifact@v4
with:
name: rmk_linux64
path: |
target/x86_64-unknown-linux-musl/release/robotmk_scheduler
target/x86_64-unknown-linux-musl/release/robotmk_agent_plugin
if-no-files-found: error