Skip to content

Commit 5d4355b

Browse files
itsmeowZeWakaKapu1178GoldenAlpharexFluffyGhoster
authored
Update to latest upstream (v3.8.0) (#15)
* Routine Update PR (tgstation#167) * Standardize redis_reliablequeue connect/disconnect output (tgstation#150) * More routine updates (tgstation#169) * IconForge - Building spritesheets at the speed of light (tgstation#160) * iconforge beta * Start blending * Huge cleanup * Finish optimizing the thing * Finish the thing!! * Clean up a bit * Re-add 32-bit thing * Fix TOML sorting * Add dmsrc * Fix clippy suggestions * Clippy.. stop being mean * Cargo fmt + doc comments * Code cleanup * More cleanup, remove most unsafe unwrap()s, use Match syntax. * Remove unneccesarily verbose casting * Fix overlay blending * Cleanup with new DMI version * Cargo fmt * Leaf test, DynamicImage->RgbaImage, better Error handling, DashMap, and cleanup command * Fix * Further tree optimizations, hashing optimization, cache icostrings more effectively. * Optimize unique_icons insertion a little * Fix macro * Little more cleanup * Add to README * Update dmi, add caching logic. * Address reviews * Cleanup panic unwind * Fix lint failure * Fix bounds expansion crops, and properly index crops from 1,1 * Don't multiply by alpha if the base alpha is 0 * Fix subtract blending * Don't hash the same DMI 500 times * Address reviews * Clippy fix * v3.2.0 (tgstation#170) * Adds `sanitize_html`, a whitelist based HTML sanitizer. (tgstation#171) * Adds batchnoise to the default features set (tgstation#174) * Typical Routine Updates (tgstation#175) * Add task for building on windows (tgstation#176) * v3.3.0 (tgstation#177) * Fast poisson sampling (tgstation#178) Co-authored-by: ZeWaka <zewakagamer@gmail.com> * Add format argument to git revdate ffi (tgstation#179) * Add method of parsing revdate for HEAD directly from logs (tgstation#180) * use lines not split (tgstation#181) * Windows 7 (tgstation#183) * Allow compiling non-32bit under feature flag (tgstation#184) Co-authored-by: ZeWaka <zewakagamer@gmail.com> * 32bit readme (tgstation#186) * v3.4.0 (tgstation#187) * Fix a panic in `byond::parse_args` with debug assertions (tgstation#189) * chore: routine updates (tgstation#190) * more assorted package updates because bored (tgstation#191) * last-minute updates (tgstation#193) * v3.5.0 (tgstation#194) * iconforge: Use height() for y axis to support non-square icons (tgstation#197) * Add building of x64 libs to CI (tgstation#200) * Add hash and iconforge as default features (tgstation#196) * IconForge: GAGS (tgstation#188) * 64 bit lib detection (tgstation#202) * update mysql crate, trims a lot of deps (tgstation#203) * Reset to correct versions * IconForge: Sort GAGS output states (tgstation#206) * IconForge: Improve GAGS frame/dir difference handling (tgstation#207) * gamer release workflow * v3.7.0 (tgstation#208) * Fix release upload paths * fully correct and rename files in CI/CD * Massively optimizes `dmi_icon_states` (tgstation#209) * Add support for timing out HTTP calls (tgstation#210) * v3.8.0 (tgstation#211) * fix default release name while i remember * Feature: rustg_sound_length() (tgstation#192) * update `rand` to `0.9`, `cargo update` (tgstation#204) * Adjust CI to match our workflow * Fix outdated upload-artifact version --------- Co-authored-by: ZeWaka <zewakagamer@gmail.com> Co-authored-by: Kapu1178 <75460809+Kapu1178@users.noreply.github.com> Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com> Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com> Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com> Co-authored-by: Lucy <lucy@absolucy.moe> Co-authored-by: tigercat2000 <nick.pilant2@gmail.com> Co-authored-by: Amy <3855802+amylizzle@users.noreply.github.com> Co-authored-by: Jordan Dominion <Cyberboss@users.noreply.github.com>
1 parent 0ad0079 commit 5d4355b

32 files changed

+2546
-1923
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
[target.i686-pc-windows-msvc]
22
rustflags = ["-C", "target-feature=+crt-static"]
33

4+
[target.i686-win7-windows-msvc]
5+
rustflags = ["-C", "target-feature=+crt-static"]
6+
47
[target.x86_64-pc-windows-msvc]
58
rustflags = ["-C", "target-feature=+crt-static"]

.devcontainer/devcontainer.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/rust
3+
{
4+
"name": "Rust",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/rust:1-1-bullseye",
7+
8+
// Use 'mounts' to make the cargo cache persistent in a Docker Volume.
9+
// "mounts": [
10+
// {
11+
// "source": "devcontainer-cargo-cache-${devcontainerId}",
12+
// "target": "/usr/local/cargo",
13+
// "type": "volume"
14+
// }
15+
// ]
16+
17+
// Features to add to the dev container. More info: https://containers.dev/features.
18+
// "features": {},
19+
20+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
21+
// "forwardPorts": [],
22+
23+
// Use 'postCreateCommand' to run commands after the container is created.
24+
"postCreateCommand": "rustup target add i686-unknown-linux-gnu && rustc --version"
25+
26+
// Configure tool-specific properties.
27+
// "customizations": {},
28+
29+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
30+
// "remoteUser": "root"
31+
}

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ insert_final_newline = true
99

1010
[*.dm]
1111
indent_style = tab
12+
13+
[*.yml]
14+
indent_size = 2

.github/workflows/release.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
# Download 32-bit artifacts
20+
- name: Download Windows Build Artifact
21+
uses: dawidd6/action-download-artifact@v9
22+
with:
23+
name: Windows Build
24+
workflow: rust.yml
25+
branch: current-bee
26+
path: ./artifacts/windows
27+
28+
- name: Download Linux Build Artifact
29+
uses: dawidd6/action-download-artifact@v9
30+
with:
31+
name: Linux Build
32+
workflow: rust.yml
33+
branch: current-bee
34+
path: ./artifacts/linux
35+
36+
# Download 64-bit artifacts
37+
- name: Download Windows x64 Build Artifact
38+
uses: dawidd6/action-download-artifact@v9
39+
with:
40+
name: Windows Build x64
41+
workflow: rust.yml
42+
branch: current-bee
43+
path: ./artifacts/windows-x64
44+
45+
- name: Download Linux x64 Build Artifact
46+
uses: dawidd6/action-download-artifact@v9
47+
with:
48+
name: Linux Build x64
49+
workflow: rust.yml
50+
branch: current-bee
51+
path: ./artifacts/linux-x64
52+
53+
- name: Create Release
54+
uses: softprops/action-gh-release@v2
55+
with:
56+
name: ${{ github.ref_name }}
57+
draft: true
58+
generate_release_notes: true
59+
files: |
60+
./artifacts/windows/i686-win7-windows-msvc/release/full_rust_g.dll
61+
./artifacts/windows/i686-win7-windows-msvc/release/full_rust_g.pdb
62+
./artifacts/linux/i686-unknown-linux-gnu/release/full_librust_g.so
63+
./artifacts/windows-x64/x86_64-pc-windows-msvc/release/full_rust_g64.dll
64+
./artifacts/windows-x64/x86_64-pc-windows-msvc/release/full_rust_g64.pdb
65+
./artifacts/linux-x64/x86_64-unknown-linux-gnu/release/full_librust_g64.so
66+
./artifacts/windows/full_rust_g.dm
67+
./artifacts/windows/i686-win7-windows-msvc/release/rust_g.dll
68+
./artifacts/windows/i686-win7-windows-msvc/release/rust_g.pdb
69+
./artifacts/linux/i686-unknown-linux-gnu/release/librust_g.so
70+
./artifacts/windows-x64/x86_64-pc-windows-msvc/release/rust_g64.dll
71+
./artifacts/windows-x64/x86_64-pc-windows-msvc/release/rust_g64.pdb
72+
./artifacts/linux-x64/x86_64-unknown-linux-gnu/release/librust_g64.so
73+
./artifacts/windows/rust_g.dm

.github/workflows/rust.yml

Lines changed: 142 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -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

.vscode/tasks.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "rust: cargo build (win32)",
6+
"args": [
7+
"build",
8+
"--target",
9+
"i686-pc-windows-msvc",
10+
],
11+
"command": "cargo",
12+
"problemMatcher": [
13+
"$rustc"
14+
],
15+
"group": "build"
16+
},
17+
{
18+
"label": "rust: cargo build (win32, all features)",
19+
"args": [
20+
"build",
21+
"--target",
22+
"i686-pc-windows-msvc",
23+
"--features",
24+
"all",
25+
],
26+
"command": "cargo",
27+
"problemMatcher": [
28+
"$rustc"
29+
],
30+
"group": "build"
31+
},
32+
]
33+
}

0 commit comments

Comments
 (0)