Skip to content

Commit

Permalink
Merge pull request bevyengine#166 from BD103/linear-rgba-everywhere
Browse files Browse the repository at this point in the history
Resolve merge conflicts in `lienar-rgba-everywhere`
  • Loading branch information
alice-i-cecile authored Apr 25, 2024
2 parents fb0384f + 5e39670 commit 978e23c
Show file tree
Hide file tree
Showing 449 changed files with 15,190 additions and 5,524 deletions.
49 changes: 49 additions & 0 deletions .github/actions/install-linux-deps/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# This action installs a few dependencies necessary to build Bevy on Linux. By default it installs
# alsa and udev, but can be configured depending on which libraries are needed:
#
# ```
# - uses: ./.github/actions/install-linux-deps
# with:
# alsa: false
# wayland: true
# ```
#
# See the `inputs` section for all options and their defaults. Note that you must checkout the
# repository before you can use this action.
#
# This action will only install dependencies when the current operating system is Linux. It will do
# nothing on any other OS (MacOS, Windows).

name: Install Linux dependencies
description: Installs the dependencies necessary to build Bevy on Linux.
inputs:
alsa:
description: Install alsa (libasound2-dev)
required: false
default: true
udev:
description: Install udev (libudev-dev)
required: false
default: true
wayland:
description: Install Wayland (libwayland-dev)
required: false
default: false
xkb:
description: Install xkb (libxkbcommon-dev)
required: false
default: false
runs:
using: composite
steps:
- name: Install Linux dependencies
shell: bash
if: ${{ runner.os == 'linux' }}
run: >
sudo apt-get update
sudo apt-get install --no-install-recommends
${{ fromJSON(inputs.alsa) && 'libasound2-dev' || '' }}
${{ fromJSON(inputs.udev) && 'libudev-dev' || '' }}
${{ fromJSON(inputs.wayland) && 'libwayland-dev' || '' }}
${{ fromJSON(inputs.xkb) && 'libxkbcommon-dev' || '' }}
44 changes: 28 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:

env:
CARGO_TERM_COLOR: always
# If nightly is breaking CI, modify this variable to target a specific nightly version.
NIGHTLY_TOOLCHAIN: nightly

concurrency:
Expand All @@ -34,9 +35,8 @@ jobs:
target/
key: ${{ runner.os }}-cargo-build-stable-${{ hashFiles('**/Cargo.toml') }}
- 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
if: runner.os == 'linux'
- name: Install Linux dependencies
uses: ./.github/actions/install-linux-deps
- name: Build & run tests
# See tools/ci/src/main.rs for the commands this runs
run: cargo run -p ci -- test
Expand All @@ -61,13 +61,17 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Install alsa and udev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev
- name: Install Linux dependencies
uses: ./.github/actions/install-linux-deps
with:
wayland: true
xkb: true
- name: CI job
# See tools/ci/src/main.rs for the commands this runs
run: cargo run -p ci -- lints

miri:
# Explicity use MacOS 14 to take advantage of M1 chip.
runs-on: macos-14
timeout-minutes: 60
steps:
Expand Down Expand Up @@ -118,8 +122,8 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Install alsa and udev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
- name: Install Linux dependencies
uses: ./.github/actions/install-linux-deps
- name: Check Compile
# See tools/ci/src/main.rs for the commands this runs
run: cargo run -p ci -- compile
Expand Down Expand Up @@ -214,7 +218,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Check for typos
uses: crate-ci/typos@v1.19.0
uses: crate-ci/typos@v1.20.9
- name: Typos info
if: failure()
run: |
Expand All @@ -226,6 +230,7 @@ jobs:
run-examples-macos-metal:
# Explicity use MacOS 14 to take advantage of M1 chip.
runs-on: macos-14
timeout-minutes: 30
steps:
Expand Down Expand Up @@ -284,8 +289,11 @@ jobs:
target/
key: ${{ runner.os }}-check-doc-${{ hashFiles('**/Cargo.toml') }}
- 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 libwayland-dev libxkbcommon-dev
- name: Install Linux dependencies
uses: ./.github/actions/install-linux-deps
with:
wayland: true
xkb: true
- name: Build and check doc
# See tools/ci/src/main.rs for the commands this runs
run: cargo run -p ci -- doc
Expand Down Expand Up @@ -383,14 +391,15 @@ jobs:
target/
key: ${{ runner.os }}-cargo-msrv-${{ hashFiles('**/Cargo.toml') }}
- name: get MSRV
id: msrv
run: |
msrv=`cargo metadata --no-deps --format-version 1 | jq --raw-output '.packages[] | select(.name=="bevy") | .rust_version'`
echo "MSRV=$msrv" >> $GITHUB_ENV
echo "msrv=$msrv" >> $GITHUB_OUTPUT
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.MSRV }}
- name: Install alsa and udev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
toolchain: ${{ steps.msrv.outputs.msrv }}
- name: Install Linux dependencies
uses: ./.github/actions/install-linux-deps
- name: Run cargo check
id: check
run: cargo check
Expand Down Expand Up @@ -443,8 +452,11 @@ jobs:
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
- name: Install alsa and udev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev
- name: Install Linux dependencies
uses: ./.github/actions/install-linux-deps
with:
wayland: true
xkb: true
- name: Build and check cfg typos
# See tools/ci/src/main.rs for the commands this runs
run: cargo run -p ci -- cfg-check
1 change: 0 additions & 1 deletion .github/workflows/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:

env:
CARGO_TERM_COLOR: always
NIGHTLY_TOOLCHAIN: nightly

jobs:
build-for-iOS:
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
env:
CARGO_TERM_COLOR: always
RUSTDOCFLAGS: --html-in-header header.html
# If nightly is breaking CI, modify this variable to target a specific nightly version.
NIGHTLY_TOOLCHAIN: nightly

# Sets the permissions to allow deploying to Github pages.
Expand Down Expand Up @@ -37,8 +38,11 @@ jobs:
with:
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}

- name: Install alsa and udev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev
- name: Install Linux dependencies
uses: ./.github/actions/install-linux-deps
with:
wayland: true
xkb: true

# This does the following:
# - Replaces the docs icon with one that clearly denotes it's not the released package on crates.io
Expand Down
40 changes: 19 additions & 21 deletions .github/workflows/validation-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ on:
branches:
- main


concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: ${{github.event_name == 'pull_request'}}

env:
CARGO_TERM_COLOR: always
# If nightly is breaking CI, modify this variable to target a specific nightly version.
NIGHTLY_TOOLCHAIN: nightly

jobs:
Expand All @@ -32,8 +32,9 @@ jobs:
target
key: ${{ runner.os }}-ios-install-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.lock') }}

# TODO: remove x86 target once it always run on arm GitHub runners
- name: Add iOS targets
run: rustup target add aarch64-apple-ios x86_64-apple-ios
run: rustup target add aarch64-apple-ios x86_64-apple-ios aarch64-apple-ios-sim

- name: Build and install iOS app in iOS Simulator.
run: cd examples/mobile && make install
Expand Down Expand Up @@ -71,18 +72,14 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Install Bevy dependencies
run: |
sudo apt-get update;
DEBIAN_FRONTEND=noninteractive sudo apt-get install --no-install-recommends -yq \
libasound2-dev libudev-dev libxkbcommon-x11-0;
- name: install xvfb, llvmpipe and lavapipe
- uses: actions/checkout@v4
- name: Install Linux dependencies
uses: ./.github/actions/install-linux-deps
# At some point this may be merged into `install-linux-deps`, but for now it is its own step.
- name: Install additional Linux dependencies for Vulkan
run: |
sudo apt-get update -y -qq
sudo add-apt-repository ppa:kisak/turtle -y
sudo apt-get update
sudo apt install -y xvfb libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers
- uses: actions/checkout@v4
sudo apt-get install --no-install-recommends libxkbcommon-x11-0 xvfb libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers
- uses: actions/cache@v4
with:
path: |
Expand Down Expand Up @@ -240,8 +237,8 @@ jobs:
steps:
- uses: actions/checkout@v4
- 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: Install Linux dependencies
uses: ./.github/actions/install-linux-deps
- name: Build
run: cargo build -p ${{ matrix.crate }} --no-default-features
env:
Expand Down Expand Up @@ -282,8 +279,8 @@ jobs:
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
- name: Installs cargo-udeps
run: cargo install --force cargo-udeps
- name: Install alsa and udev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
- name: Install Linux dependencies
uses: ./.github/actions/install-linux-deps
- name: Run cargo udeps
run: cargo udeps

Expand All @@ -303,14 +300,15 @@ jobs:
target/
key: ${{ runner.os }}-cargo-check-showcase-patches-${{ hashFiles('**/Cargo.toml') }}
- uses: dtolnay/rust-toolchain@stable
- name: Installs cargo-udeps
run: cargo install --force cargo-udeps
- name: Install alsa and udev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
- name: Install Linux dependencies
uses: ./.github/actions/install-linux-deps
- name: Apply patches
run: |
CODE=0
for patch in tools/example-showcase/*.patch; do
git apply --ignore-whitespace $patch
# Try applying the patch, logging an error if it fails.
git apply --ignore-whitespace $patch || { echo "::error::$patch failed to apply."; CODE=1; }
done
exit $CODE
- name: Build with patches
run: cargo build
Loading

0 comments on commit 978e23c

Please sign in to comment.