Skip to content

Bevy 0.15 release (#5) #14

Bevy 0.15 release (#5)

Bevy 0.15 release (#5) #14

Workflow file for this run

name: Cargo
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
RUST_LOG: info
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Populate target directory from cache
uses: Leafwing-Studios/cargo-cache@v2
with:
sweep-cache: true
- name: Install Bevy dependencies
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev
- name: Cargo Check
run: RUSTFLAGS="$RUSTFLAGS -A dead_code" cargo check
- name: Cargo Build
run: cargo build --release --all-features
doc:
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install Bevy dependencies
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev
- name: Populate target directory from cache
uses: Leafwing-Studios/cargo-cache@v2
with:
sweep-cache: true
- name: Cargo Doc
run: cargo doc --no-deps
- uses: actions/upload-artifact@v4
with:
name: doc
path: target/doc
# deploy:
# if: github.ref == 'refs/heads/main'
# needs: doc
# # Grant GITHUB_TOKEN the permissions required to make a Pages deployment
# permissions:
# pages: write # to deploy to Pages
# id-token: write # to verify the deployment originates from an appropriate source
# # Deploy to the github-pages environment
# environment:
# name: github-pages
# url: ${{ steps.deployment.outputs.page_url }}
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 0
# - uses: actions/download-artifact@v4
# with:
# name: doc
# path: ${{ github.workspace }}
# - name: Upload Pages artifact
# uses: actions/upload-pages-artifact@v3
# with:
# path: target/doc
# - name: Deploy to GitHub Pages
# id: deployment
# uses: actions/deploy-pages@v4
# if: github.event_name != 'pull_request'