Rendering summary #3131
Workflow file for this run
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: CI | |
on: | |
pull_request: | |
merge_group: | |
push: | |
branches: | |
- 'staging' | |
- 'trying' | |
jobs: | |
mega-linter: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# Full git history is needed to get a proper list of changed files within `mega-linter` | |
fetch-depth: 0 | |
- name: Run Mega Linter | |
uses: oxsecurity/megalinter@v7 | |
env: | |
VALIDATE_ALL_CODEBASE: false | |
DEFAULT_BRANCH: main | |
test-code-examples: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Install alsa and udev | |
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev | |
- name: Build & run doc tests | |
run: cd code-validation && cargo test | |
check-hide-lines: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Check hide-lines | |
run: cd write-rustdoc-hide-lines && cargo run --release -- check ../content | |
lint-tools: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Install alsa and udev | |
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev | |
- name: Check formatting | |
run: cargo fmt --check --all | |
- name: Check clippy | |
run: cargo clippy --workspace -- -Dwarnings | |
typos: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check for typos | |
uses: crate-ci/[email protected] | |
- name: Typos info | |
if: failure() | |
run: | | |
echo 'To fix typos, please run `typos -w`' | |
echo 'To check for a diff, run `typos`' | |
echo 'You can find typos here: https://crates.io/crates/typos' | |
echo 'if you use VSCode, you can also install `Typos Spell Checker' | |
echo 'You can find the extension here: https://marketplace.visualstudio.com/items?itemName=tekumara.typos-vscode' | |
generate-assets: | |
needs: [mega-linter, test-code-examples, lint-tools, check-hide-lines, typos] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
generate-assets/target/ | |
key: ${{ runner.os }}-generate-assets-${{ hashFiles('generate-assets/Cargo.toml') }} | |
- name: Get cache key | |
id: cache-key | |
run: echo "key=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT | |
- name: Get crates.io datadump from cache | |
uses: actions/cache@v4 | |
with: | |
path: generate-assets/data | |
key: ${{ runner.os }}-${{ steps.cache-key.outputs.key }} | |
- name: "Build Bevy Assets" | |
run: > | |
cd generate-assets && | |
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} && | |
./generate_assets.sh | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: generated-assets | |
path: content/assets | |
retention-days: 1 | |
generate-errors: | |
needs: [mega-linter, test-code-examples, lint-tools, check-hide-lines, typos] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
generate-errors/target/ | |
key: ${{ runner.os }}-generate-errors-${{ hashFiles('generate-errors/Cargo.toml') }} | |
- name: "Build Bevy Error Codes" | |
run: > | |
cd generate-errors && | |
./generate_errors.sh | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: generated-errors | |
path: content/learn/errors | |
retention-days: 1 | |
generate-wasm-examples: | |
needs: [mega-linter, test-code-examples, lint-tools, check-hide-lines, typos] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
target: wasm32-unknown-unknown | |
- name: "Build Bevy Examples" | |
run: | | |
cd generate-wasm-examples && | |
./generate_wasm_examples.sh | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: generated-wasm-examples | |
path: content/examples | |
retention-days: 1 | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: generated-wasm-examples-webgpu | |
path: content/examples-webgpu | |
retention-days: 1 | |
generate-community: | |
needs: [mega-linter, test-code-examples, lint-tools, check-hide-lines, typos] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
generate-community/target/ | |
key: ${{ runner.os }}-generate-community-${{ hashFiles('generate-community/Cargo.toml') }} | |
- name: "Build Bevy Community" | |
run: > | |
cd generate-community && | |
./generate_community.sh | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: generated-community | |
path: content/community/people | |
retention-days: 1 | |
build-website: | |
runs-on: ubuntu-latest | |
needs: [mega-linter, test-code-examples, lint-tools, check-hide-lines, typos, generate-assets, generate-errors, generate-wasm-examples, generate-community] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: generated-assets | |
path: content/assets | |
- uses: actions/download-artifact@v4 | |
with: | |
name: generated-errors | |
path: content/learn/errors | |
- uses: actions/download-artifact@v4 | |
with: | |
name: generated-wasm-examples | |
path: content/examples | |
- uses: actions/download-artifact@v4 | |
with: | |
name: generated-wasm-examples-webgpu | |
path: content/examples-webgpu | |
- uses: actions/download-artifact@v4 | |
with: | |
name: generated-community | |
path: content/community/people | |
- name: "Build website" | |
uses: shalzz/[email protected] | |
env: | |
PAGES_BRANCH: gh-pages | |
BUILD_DIR: . | |
BUILD_ONLY: true | |
TOKEN: fake-secret |