Skip to content

Fix divide by zero when giving a tileset width of zero #434

Fix divide by zero when giving a tileset width of zero

Fix divide by zero when giving a tileset width of zero #434

Workflow file for this run

name: Rust
on:
push:
branches: [ current, next ]
pull_request:
branches: [ current, next ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup rust-cache
uses: Swatinem/rust-cache@v1
- name: Update package manager
run: sudo apt-get update
- name: Install dependencies
run: sudo apt-get install -y libsfml-dev libcsfml-dev libasound2-dev libudev-dev
- name: Build library
run: cargo build --lib --verbose
- name: Run tests
run: cargo test --verbose
rustfmt:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get nightly Rust toolchain with rustfmt
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt
- name: Run cargo fmt --all -- --check
run: cargo fmt --all -- --check
clippy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Update package manager
run: sudo apt-get update
- name: Install dependencies
run: sudo apt-get install -y libsfml-dev libcsfml-dev libasound2-dev libudev-dev
- name: Get stable Rust toolchain with clippy
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: clippy
- name: Run cargo clippy --all-targets --package tiled
run: cargo clippy --all-targets --package tiled