@@ -12,48 +12,103 @@ jobs:
1212 steps :
1313 - uses : actions/checkout@v4
1414
15- - uses : dtolnay/rust-toolchain@stable
15+ - uses : dtolnay/rust-toolchain@nightly
1616 with :
17- targets : i686 -pc-windows-msvc
18- components : rustfmt, clippy
17+ targets : x86_64 -pc-windows-msvc
18+ components : clippy, rustfmt, rust-src
1919
2020 - uses : Swatinem/rust-cache@v2
2121
2222 - name : Clippy (all features)
23- continue-on-error : true
24- run : cargo clippy --target i686-pc-windows-msvc --features all --locked -- -D warnings
23+ run : cargo clippy -Z build-std --target i686-win7-windows-msvc --features all --locked -- -D warnings
2524
2625 - name : Rustfmt
27- continue-on-error : true
2826 run : cargo fmt -- --check
2927
3028 - name : Build (release) (all features)
31- run : cargo build --target i686-pc-windows-msvc --locked --release --features all
32-
33- - uses : actions/upload-artifact@v3
29+ run : cargo build -Z build-std --target i686-win7-windows-msvc --locked --release --features all
30+
31+ - name : Rename artifacts (all features)
32+ run : |
33+ Move-Item -Path "target\i686-win7-windows-msvc\release\rust_g.dll" -Destination "target\i686-win7-windows-msvc\release\full_rust_g64.dll"
34+ Move-Item -Path "target\i686-win7-windows-msvc\release\rust_g.pdb" -Destination "target\i686-win7-windows-msvc\release\full_rust_g64.pdb"
35+ Move-Item -Path "target\rust_g.dm" -Destination "target\full_rust_g.dm"
36+
37+ - uses : actions/upload-artifact@v4
3438 with :
3539 name : Windows Build (All Features)
3640 path : |
37- target/i686-pc -windows-msvc/release/rust_g .dll
38- target/i686-pc -windows-msvc/release/rust_g .pdb
39- target/rust_g .dm
41+ target/i686-win7 -windows-msvc/release/full_rust_g .dll
42+ target/i686-win7 -windows-msvc/release/full_rust_g .pdb
43+ target/full_rust_g .dm
4044
4145 - name : Build (release) (default features)
42- run : cargo build -- target i686-pc -windows-msvc --locked --release
46+ run : cargo build -Z build-std -- target i686-win7 -windows-msvc --locked --release
4347
44- - uses : actions/upload-artifact@v3
48+ - uses : actions/upload-artifact@v4
4549 with :
4650 name : Windows Build (Default Features)
4751 path : |
48- target/i686-pc-windows-msvc/release/rust_g.dll
49- target/i686-pc-windows-msvc/release/rust_g.pdb
52+ target/i686-win7-windows-msvc/release/rust_g.dll
53+ target/i686-win7-windows-msvc/release/rust_g.pdb
54+ target/rust_g.dm
55+
56+ build-windows-x64 :
57+ runs-on : windows-latest
58+ steps :
59+ - uses : actions/checkout@v4
60+
61+ - uses : dtolnay/rust-toolchain@nightly
62+ with :
63+ targets : x86_64-pc-windows-msvc
64+ components : clippy, rustfmt, rust-src
65+
66+ - uses : Swatinem/rust-cache@v2
67+
68+ - name : x64 Clippy (all features)
69+ run : cargo clippy -Z build-std --target x86_64-pc-windows-msvc --features all,allow_non_32bit --locked -- -D warnings
70+
71+ - name : Rustfmt
72+ run : cargo fmt -- --check
73+
74+ - name : x84 Build (release) (all features)
75+ run : cargo build -Z build-std --target x86_64-pc-windows-msvc --features allow_non_32bit --locked --release --features all
76+
77+ - name : Rename x64 artifacts (all features)
78+ run : |
79+ Move-Item -Path "target\x86_64-pc-windows-msvc\release\rust_g.dll" -Destination "target\x86_64-pc-windows-msvc\release\full_rust_g64.dll"
80+ Move-Item -Path "target\x86_64-pc-windows-msvc\release\rust_g.pdb" -Destination "target\x86_64-pc-windows-msvc\release\full_rust_g64.pdb"
81+ Move-Item -Path "target\rust_g.dm" -Destination "target\full_rust_g.dm"
82+
83+ - uses : actions/upload-artifact@v4
84+ with :
85+ name : Windows Build x64 (All Features)
86+ path : |
87+ target/x86_64-pc-windows-msvc/release/full_rust_g64.dll
88+ target/x86_64-pc-windows-msvc/release/full_rust_g64.pdb
89+ target/full_rust_g.dm
90+
91+ - name : x64 Build (release) (default features)
92+ run : cargo build -Z build-std --target x86_64-pc-windows-msvc --features allow_non_32bit --locked --release
93+
94+ - name : Rename x64 artifacts (default features)
95+ run : |
96+ Move-Item -Path "target\x86_64-pc-windows-msvc\release\rust_g.dll" -Destination "target\x86_64-pc-windows-msvc\release\rust_g64.dll"
97+ Move-Item -Path "target\x86_64-pc-windows-msvc\release\rust_g.pdb" -Destination "target\x86_64-pc-windows-msvc\release\rust_g64.pdb"
98+
99+ - uses : actions/upload-artifact@v4
100+ with :
101+ name : Windows Build x64 (Default Features)
102+ path : |
103+ target/x86_64-pc-windows-msvc/release/rust_g64.dll
104+ target/x86_64-pc-windows-msvc/release/rust_g64.pdb
50105 target/rust_g.dm
51106
52107 build-linux :
53- runs-on : ubuntu-20.04
108+ runs-on : ubuntu-latest
54109 env :
55- BYOND_MAJOR : 513
56- BYOND_MINOR : 1521
110+ BYOND_MAJOR : 515
111+ BYOND_MINOR : 1642
57112 PKG_CONFIG_ALLOW_CROSS : 1
58113 steps :
59114 - uses : actions/checkout@v4
@@ -64,42 +119,100 @@ jobs:
64119 sudo apt-get install libgcc-s1:i386 g++-multilib zlib1g-dev:i386
65120 ./scripts/install_byond.sh
66121
67- - uses : dtolnay/rust-toolchain@stable
122+ - uses : dtolnay/rust-toolchain@nightly
68123 with :
69- targets : i686-unknown-linux-gnu
124+ targets : i686-unknown-linux-gnu, x86_64-unknown-linux-gnu
70125
71126 - uses : Swatinem/rust-cache@v2
72127
73128 - name : Check (all features)
74- continue-on-error : true
75129 run : cargo check --target i686-unknown-linux-gnu --locked --features all
76130
77131 - name : Build (debug) (all features)
78- continue-on-error : true
79132 run : cargo build --target i686-unknown-linux-gnu --locked --features all
80133
81134 - name : Run tests (all features)
82- continue-on-error : true
83135 run : cargo test --target i686-unknown-linux-gnu --locked --features all
84136 env :
85137 BYOND_BIN : /home/runner/BYOND/byond/bin
86138
87139 - name : Build (release) (all features)
88140 run : cargo build --target i686-unknown-linux-gnu --locked --release --features all
89-
90- - uses : actions/upload-artifact@v3
141+
142+ - name : Rename artifacts (all features)
143+ run : |
144+ mv target/i686-unknown-linux-gnu/release/librust_g.so target/i686-unknown-linux-gnu/release/full_librust_g.so
145+ mv target/rust_g.dm target/full_rust_g.dm
146+
147+ - uses : actions/upload-artifact@v4
91148 with :
92149 name : Linux Build (All Features)
93150 path : |
94- target/i686-unknown-linux-gnu/release/librust_g .so
95- target/rust_g .dm
151+ target/i686-unknown-linux-gnu/release/full_librust_g .so
152+ target/full_rust_g .dm
96153
97154 - name : Build (release) (default features)
98155 run : cargo build --target i686-unknown-linux-gnu --locked --release
99156
100- - uses : actions/upload-artifact@v3
157+ - uses : actions/upload-artifact@v4
101158 with :
102159 name : Linux Build (Default Features)
103160 path : |
104161 target/i686-unknown-linux-gnu/release/librust_g.so
105162 target/rust_g.dm
163+
164+ build-linux-x64 :
165+ runs-on : ubuntu-latest
166+ env :
167+ BYOND_MAJOR : 515
168+ BYOND_MINOR : 1642
169+ PKG_CONFIG_ALLOW_CROSS : 1
170+
171+ steps :
172+ - uses : actions/checkout@v4
173+
174+ - run : |
175+ sudo dpkg --add-architecture i386
176+ sudo apt-get update
177+ sudo apt-get install libgcc-s1:i386 g++-multilib zlib1g-dev:i386
178+ ./scripts/install_byond.sh
179+
180+ - uses : dtolnay/rust-toolchain@nightly
181+ with :
182+ targets : x86_64-unknown-linux-gnu
183+
184+ - uses : Swatinem/rust-cache@v2
185+
186+ - name : x64 Check (all features)
187+ run : cargo check --target x86_64-unknown-linux-gnu --locked --features all,allow_non_32bit
188+
189+ - name : x64 Build (Debug) (all features)
190+ run : cargo build --target x86_64-unknown-linux-gnu --locked --features all,allow_non_32bit
191+
192+ - name : x64 Build (release) (all features)
193+ run : cargo build --target x86_64-unknown-linux-gnu --locked --features allow_non_32bit --release
194+
195+ - name : Rename x64 artifacts (all features)
196+ run : |
197+ mv target/x86_64-unknown-linux-gnu/release/librust_g.so target/x86_64-unknown-linux-gnu/release/full_librust_g64.so
198+ mv target/rust_g.dm target/full_rust_g.dm
199+
200+ - uses : actions/upload-artifact@v4
201+ with :
202+ name : Linux Build x64 (All Features)
203+ path : |
204+ target/x86_64-unknown-linux-gnu/release/full_librust_g64.so
205+ target/full_rust_g.dm
206+
207+ - name : x64 Build (release) (default features)
208+ run : cargo build --target x86_64-unknown-linux-gnu --locked --features allow_non_32bit --release
209+
210+ - name : Rename x64 artifacts (default features)
211+ run : mv target/x86_64-unknown-linux-gnu/release/librust_g.so target/x86_64-unknown-linux-gnu/release/librust_g64.so
212+
213+ - uses : actions/upload-artifact@v4
214+ with :
215+ name : Linux Build x64 (Default Features)
216+ path : |
217+ target/x86_64-unknown-linux-gnu/release/librust_g64.so
218+ target/rust_g.dm
0 commit comments