3
3
push :
4
4
branches :
5
5
- master
6
- tags :
7
- - ' v*'
8
6
pull_request :
9
7
branches :
10
8
- master
11
9
jobs :
12
10
build-windows :
13
11
runs-on : windows-latest
14
12
steps :
15
- - uses : actions/checkout@v1
13
+ - uses : actions/checkout@v4
16
14
17
- - uses : actions-rs/ toolchain@v1
15
+ - uses : dtolnay/rust- toolchain@stable
18
16
with :
19
- toolchain : stable
20
- target : i686-pc-windows-msvc
17
+ targets : i686-pc-windows-msvc
21
18
components : rustfmt, clippy
22
19
23
20
- uses : Swatinem/rust-cache@v2
24
21
25
22
- name : Clippy (all features)
26
- uses : actions-rs/cargo@v1
27
- with :
28
- toolchain : stable
29
- command : clippy
30
- args : --target i686-pc-windows-msvc --all-features --locked
23
+ run : cargo clippy --target i686-pc-windows-msvc --features all --locked -- -D warnings
31
24
32
25
- name : Rustfmt
33
- uses : actions-rs/cargo@v1
34
- with :
35
- toolchain : stable
36
- command : fmt
37
- args : -- --check
26
+ run : cargo fmt -- --check
38
27
39
28
- name : Build (release) (default features)
40
- uses : actions-rs/cargo@v1
41
- with :
42
- toolchain : stable
43
- command : build
44
- args : --target i686-pc-windows-msvc --release
29
+ run : cargo build --target i686-pc-windows-msvc --locked --release
45
30
46
31
- uses : actions/upload-artifact@v3
47
32
with :
51
36
target/i686-pc-windows-msvc/release/rust_g.pdb
52
37
target/rust_g.dm
53
38
54
-
55
39
build-linux :
56
40
runs-on : ubuntu-latest
57
41
env :
@@ -60,49 +44,33 @@ jobs:
60
44
PKG_CONFIG_ALLOW_CROSS : 1
61
45
62
46
steps :
63
- - uses : actions/checkout@v2
47
+ - uses : actions/checkout@v4
48
+
64
49
- run : |
65
50
sudo dpkg --add-architecture i386
66
51
sudo apt-get update
67
- sudo apt-get install -y libgcc-s1:i386 g++-multilib zlib1g-dev:i386 libssl -dev:i386
52
+ sudo apt-get install libgcc-s1:i386 g++-multilib zlib1g-dev:i386
68
53
./scripts/install_byond.sh
69
54
70
- - uses : actions-rs/ toolchain@v1
55
+ - uses : dtolnay/rust- toolchain@stable
71
56
with :
72
- toolchain : stable
73
- target : i686-unknown-linux-gnu
57
+ targets : i686-unknown-linux-gnu
74
58
75
59
- uses : Swatinem/rust-cache@v2
76
60
77
61
- name : Check (all features)
78
- uses : actions-rs/cargo@v1
79
- with :
80
- toolchain : stable
81
- command : check
82
- args : --target i686-unknown-linux-gnu --all-features
62
+ run : cargo check --target i686-unknown-linux-gnu --locked --features all
83
63
84
64
- name : Build (Debug) (all features)
85
- uses : actions-rs/cargo@v1
86
- with :
87
- toolchain : stable
88
- command : build
89
- args : --target i686-unknown-linux-gnu --all-features
65
+ run : cargo build --target i686-unknown-linux-gnu --locked --features all
90
66
91
67
- name : Run tests (all features)
92
- uses : actions-rs/cargo@v1
93
- with :
94
- toolchain : stable
95
- command : test
96
- args : --target i686-unknown-linux-gnu --all-features
68
+ run : cargo test --target i686-unknown-linux-gnu --locked --features all
97
69
env :
98
70
BYOND_BIN : /home/runner/BYOND/byond/bin
99
71
100
72
- name : Build (release) (default features)
101
- uses : actions-rs/cargo@v1
102
- with :
103
- toolchain : stable
104
- command : build
105
- args : --target i686-unknown-linux-gnu --release
73
+ run : cargo build --target i686-unknown-linux-gnu --locked --release
106
74
107
75
- uses : actions/upload-artifact@v3
108
76
with :
0 commit comments