Formatting #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
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 --all-features -- -D warnings | |
- name: Rustfmt | |
run: cargo fmt -- --check | |
- name: Build (release) (all features) | |
run: cargo build --target i686-pc-windows-msvc --all-features --release | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Windows Build | |
path: | | |
target/i686-pc-windows-msvc/release/rust_utils.dll | |
target/i686-pc-windows-msvc/release/rust_utils.pdb | |
target/rust_utils.dm | |
build-linux: | |
runs-on: ubuntu-latest | |
env: | |
BYOND_MAJOR: 515 | |
BYOND_MINOR: 1637 | |
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 | |
./scripts/install_byond.sh | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: i686-unknown-linux-gnu | |
- uses: Swatinem/rust-cache@v2 | |
- name: Check (all features) | |
run: cargo check --target i686-unknown-linux-gnu --all-features | |
- name: Build (Debug) (all features) | |
run: cargo build --target i686-unknown-linux-gnu --all-features | |
- name: Run tests (all features) | |
run: cargo test --target i686-unknown-linux-gnu --all-features | |
env: | |
BYOND_BIN: /home/runner/BYOND/byond/bin | |
- name: Build (release) (all features) | |
run: cargo build --target i686-unknown-linux-gnu --all-features --release | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Linux Build | |
path: | | |
target/i686-unknown-linux-gnu/release/librust_utils.so | |
target/rust_utils.dm |