build: rust edition 2024 (#473) #1067
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: Rust | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
strategy: | |
matrix: | |
platform: | |
- os: ubuntu-latest | |
- os: windows-latest | |
- os: macos-latest | |
runs-on: ${{ matrix.platform.os }} | |
steps: | |
- name: Install bevy linux dependencies | |
run: sudo apt-get update && sudo apt-get install g++ pkg-config libx11-dev libasound2-dev libudev-dev libxkbcommon-x11-0 libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev | |
if: contains(matrix.platform.os, 'ubuntu') | |
- uses: actions/checkout@v4 | |
- name: Install minimal stable with clippy and rustfmt | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
components: rustfmt, clippy | |
- uses: Swatinem/rust-cache@v2.7.7 | |
- name: Build | |
run: cargo build --verbose | |
- name: Run tests | |
run: cargo test --verbose |