Skip to content

Commit

Permalink
Merge pull request #4 from PlagueAutomata/gh-workflow
Browse files Browse the repository at this point in the history
add ci
  • Loading branch information
lain-dono authored Dec 26, 2023
2 parents 446f648 + 36eea23 commit f10c9c6
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 3 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always

jobs:
clippy:
name: clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- uses: r7kamura/[email protected]
- name: install alsa and udev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
- name: clippy
run: cargo clippy --all --all-targets
env:
RUSTFLAGS: "-C debuginfo=0 -D warnings"

fmt:
name: fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- uses: r7kamura/[email protected]
- name: install alsa and udev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
- name: fmt
run: cargo fmt --all -- --check

build:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- uses: r7kamura/[email protected]
- name: install alsa and udev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
- name: build
run: cargo build --verbose
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ fn setup(
fn update_player_camera(
mut query: Query<(&mut Transform, &PlayerCamera)>,
keyboard: Res<Input<KeyCode>>,
mouse_button: Res<Input<MouseButton>>,
_mouse_button: Res<Input<MouseButton>>,
time: Res<Time>,
mouse_movement: EventReader<MouseMotion>,
mouse_wheel: EventReader<MouseWheel>,
_mouse_movement: EventReader<MouseMotion>,
_mouse_wheel: EventReader<MouseWheel>,
) {
let (mut transform, cam) = query.single_mut();
let mut diff = Vec3::new(0.0, 0.0, 0.0);
Expand Down

0 comments on commit f10c9c6

Please sign in to comment.