Skip to content

Commit

Permalink
Merge branch 'master' into current-bee
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmeow committed Dec 28, 2023
2 parents dc99f9d + 4aff57f commit d2a6067
Show file tree
Hide file tree
Showing 31 changed files with 2,412 additions and 760 deletions.
122 changes: 55 additions & 67 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,91 +2,79 @@ name: rust-g
on:
push:
branches:
- current-bee
- current-bee
pull_request:
branches:
- current-bee
- current-bee
jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
target: i686-pc-windows-msvc
- name: Build (all features)
uses: actions-rs/cargo@v1
targets: i686-pc-windows-msvc
components: rustfmt, clippy

- uses: Swatinem/rust-cache@v2

- name: Clippy (all features)
run: cargo clippy --target i686-pc-windows-msvc --features all --locked -- -D warnings

- name: Rustfmt
run: cargo fmt -- --check

- name: Build (release) (default features)
run: cargo build --target i686-pc-windows-msvc --locked --release

- uses: actions/upload-artifact@v3
with:
toolchain: stable
command: build
args: --target i686-pc-windows-msvc --release --all-features
- name: Upload artifact (all features)
uses: actions/upload-artifact@v1
with:
name: full_rust_g.dll
path: target/i686-pc-windows-msvc/release/rust_g.dll
- name: Build (release)
uses: actions-rs/cargo@v1
with:
toolchain: stable
command: build
args: --target i686-pc-windows-msvc --release
- name: Upload artifact (release)
uses: actions/upload-artifact@v1
with:
name: rust_g.dll
path: target/i686-pc-windows-msvc/release/rust_g.dll
name: Windows Build
path: |
target/i686-pc-windows-msvc/release/rust_g.dll
target/i686-pc-windows-msvc/release/rust_g.pdb
target/rust_g.dm
build-linux:
runs-on: ubuntu-20.04
env:
BYOND_MAJOR: 513
BYOND_MINOR: 1521
BYOND_MAJOR: 514
BYOND_MINOR: 1585
PKG_CONFIG_ALLOW_CROSS: 1

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4

- run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install g++-multilib zlib1g-dev:i386 pkg-config libssl-dev:i386 libssl-dev libssl1.1:i386
sudo apt-get install libgcc-s1:i386 g++-multilib zlib1g-dev:i386
./scripts/install_byond.sh
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: i686-unknown-linux-gnu
- name: Build (Debug)
uses: actions-rs/cargo@v1
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
command: build
args: --target i686-unknown-linux-gnu
- name: Run tests
uses: actions-rs/cargo@v1
with:
toolchain: stable
command: test
args: --target i686-unknown-linux-gnu
targets: i686-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 (all features)
uses: actions-rs/cargo@v1
with:
toolchain: stable
command: build
args: --target i686-unknown-linux-gnu --release --all-features
- name: Upload artifact (all features)
uses: actions/upload-artifact@v1
with:
name: full_librust_g.so
path: target/i686-unknown-linux-gnu/release/librust_g.so
- name: Build (release)
uses: actions-rs/cargo@v1
with:
toolchain: stable
command: build
args: --target i686-unknown-linux-gnu --release
- name: Upload artifact (release)
uses: actions/upload-artifact@v1

- name: Build (release) (default features)
run: cargo build --target i686-unknown-linux-gnu --locked --release

- uses: actions/upload-artifact@v3
with:
name: librust_g.so
path: target/i686-unknown-linux-gnu/release/librust_g.so
name: Linux Build
path: |
target/i686-unknown-linux-gnu/release/librust_g.so
target/rust_g.dm
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"rust-analyzer.cargo.target": "i686-pc-windows-msvc"
"rust-analyzer.cargo.target": "i686-pc-windows-msvc",
"rust-analyzer.linkedProjects": [
".\\Cargo.toml"
]
}
Loading

0 comments on commit d2a6067

Please sign in to comment.