-
Notifications
You must be signed in to change notification settings - Fork 102
147 lines (115 loc) · 4.3 KB
/
rust.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
name: rust-g
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
targets: x86_64-pc-windows-msvc
components: clippy, rustfmt, rust-src
- uses: Swatinem/rust-cache@v2
- name: Clippy (all features)
run: cargo clippy -Z build-std --target i686-win7-windows-msvc --features all --locked -- -D warnings
- name: Rustfmt
run: cargo fmt -- --check
- name: Build (release) (default features)
run: cargo build -Z build-std --target i686-win7-windows-msvc --locked --release
- uses: actions/upload-artifact@v4
with:
name: Windows Build
path: |
target/i686-win7-windows-msvc/release/rust_g.dll
target/i686-win7-windows-msvc/release/rust_g.pdb
target/rust_g.dm
build-windows-x64:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
targets: x86_64-pc-windows-msvc
components: clippy, rustfmt, rust-src
- uses: Swatinem/rust-cache@v2
- name: x64 Clippy (all features)
run: cargo clippy -Z build-std --target x86_64-pc-windows-msvc --features all,allow_non_32bit --locked -- -D warnings
- name: Rustfmt
run: cargo fmt -- --check
- name: x64 Build (release) (default features)
run: cargo build -Z build-std --target x86_64-pc-windows-msvc --features allow_non_32bit --locked --release
- uses: actions/upload-artifact@v4
with:
name: Windows Build x64
path: |
target/x86_64-pc-windows-msvc/release/rust_g.dll
target/x86_64-pc-windows-msvc/release/rust_g.pdb
target/rust_g.dm
build-linux:
runs-on: ubuntu-latest
env:
BYOND_MAJOR: 515
BYOND_MINOR: 1642
PKG_CONFIG_ALLOW_CROSS: 1
steps:
- uses: actions/checkout@v4
- run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libgcc-s1:i386 g++-multilib zlib1g-dev:i386
./scripts/install_byond.sh
- uses: dtolnay/rust-toolchain@nightly
with:
targets: i686-unknown-linux-gnu, x86_64-unknown-linux-gnu
- uses: Swatinem/rust-cache@v2
- name: Check (all features)
run: cargo check --target i686-unknown-linux-gnu --locked --features all
- name: Build (Debug) (all features)
run: cargo build --target i686-unknown-linux-gnu --locked --features all
- name: Run tests (all features)
run: cargo test --target i686-unknown-linux-gnu --locked --features all
env:
BYOND_BIN: /home/runner/BYOND/byond/bin
- name: Build (release) (default features)
run: cargo build --target i686-unknown-linux-gnu --locked --release
- uses: actions/upload-artifact@v4
with:
name: Linux Build
path: |
target/i686-unknown-linux-gnu/release/librust_g.so
target/rust_g.dm
build-linux-x64:
runs-on: ubuntu-latest
env:
BYOND_MAJOR: 515
BYOND_MINOR: 1642
PKG_CONFIG_ALLOW_CROSS: 1
steps:
- uses: actions/checkout@v4
- run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libgcc-s1:i386 g++-multilib zlib1g-dev:i386
./scripts/install_byond.sh
- uses: dtolnay/rust-toolchain@nightly
with:
targets: x86_64-unknown-linux-gnu
- uses: Swatinem/rust-cache@v2
- name: x64 Check (all features)
run: cargo check --target x86_64-unknown-linux-gnu --locked --features all,allow_non_32bit
- name: x64 Build (Debug) (all features)
run: cargo build --target x86_64-unknown-linux-gnu --locked --features all,allow_non_32bit
- name: x64 Build (release) (default features)
run: cargo build --target x86_64-unknown-linux-gnu --locked --features allow_non_32bit --release
- uses: actions/upload-artifact@v4
with:
name: Linux Build x64
path: |
target/x86_64-unknown-linux-gnu/release/librust_g.so
target/rust_g.dm