Skip to content

Commit 978e23c

Browse files
Merge pull request bevyengine#166 from BD103/linear-rgba-everywhere
Resolve merge conflicts in `lienar-rgba-everywhere`
2 parents fb0384f + 5e39670 commit 978e23c

File tree

449 files changed

+15190
-5524
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

449 files changed

+15190
-5524
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# This action installs a few dependencies necessary to build Bevy on Linux. By default it installs
2+
# alsa and udev, but can be configured depending on which libraries are needed:
3+
#
4+
# ```
5+
# - uses: ./.github/actions/install-linux-deps
6+
# with:
7+
# alsa: false
8+
# wayland: true
9+
# ```
10+
#
11+
# See the `inputs` section for all options and their defaults. Note that you must checkout the
12+
# repository before you can use this action.
13+
#
14+
# This action will only install dependencies when the current operating system is Linux. It will do
15+
# nothing on any other OS (MacOS, Windows).
16+
17+
name: Install Linux dependencies
18+
description: Installs the dependencies necessary to build Bevy on Linux.
19+
inputs:
20+
alsa:
21+
description: Install alsa (libasound2-dev)
22+
required: false
23+
default: true
24+
udev:
25+
description: Install udev (libudev-dev)
26+
required: false
27+
default: true
28+
wayland:
29+
description: Install Wayland (libwayland-dev)
30+
required: false
31+
default: false
32+
xkb:
33+
description: Install xkb (libxkbcommon-dev)
34+
required: false
35+
default: false
36+
runs:
37+
using: composite
38+
steps:
39+
- name: Install Linux dependencies
40+
shell: bash
41+
if: ${{ runner.os == 'linux' }}
42+
run: >
43+
sudo apt-get update
44+
45+
sudo apt-get install --no-install-recommends
46+
${{ fromJSON(inputs.alsa) && 'libasound2-dev' || '' }}
47+
${{ fromJSON(inputs.udev) && 'libudev-dev' || '' }}
48+
${{ fromJSON(inputs.wayland) && 'libwayland-dev' || '' }}
49+
${{ fromJSON(inputs.xkb) && 'libxkbcommon-dev' || '' }}

.github/workflows/ci.yml

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99

1010
env:
1111
CARGO_TERM_COLOR: always
12+
# If nightly is breaking CI, modify this variable to target a specific nightly version.
1213
NIGHTLY_TOOLCHAIN: nightly
1314

1415
concurrency:
@@ -34,9 +35,8 @@ jobs:
3435
target/
3536
key: ${{ runner.os }}-cargo-build-stable-${{ hashFiles('**/Cargo.toml') }}
3637
- uses: dtolnay/rust-toolchain@stable
37-
- name: Install alsa and udev
38-
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
39-
if: runner.os == 'linux'
38+
- name: Install Linux dependencies
39+
uses: ./.github/actions/install-linux-deps
4040
- name: Build & run tests
4141
# See tools/ci/src/main.rs for the commands this runs
4242
run: cargo run -p ci -- test
@@ -61,13 +61,17 @@ jobs:
6161
- uses: dtolnay/rust-toolchain@stable
6262
with:
6363
components: rustfmt, clippy
64-
- name: Install alsa and udev
65-
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev
64+
- name: Install Linux dependencies
65+
uses: ./.github/actions/install-linux-deps
66+
with:
67+
wayland: true
68+
xkb: true
6669
- name: CI job
6770
# See tools/ci/src/main.rs for the commands this runs
6871
run: cargo run -p ci -- lints
6972

7073
miri:
74+
# Explicity use MacOS 14 to take advantage of M1 chip.
7175
runs-on: macos-14
7276
timeout-minutes: 60
7377
steps:
@@ -118,8 +122,8 @@ jobs:
118122
- uses: dtolnay/rust-toolchain@stable
119123
with:
120124
toolchain: stable
121-
- name: Install alsa and udev
122-
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
125+
- name: Install Linux dependencies
126+
uses: ./.github/actions/install-linux-deps
123127
- name: Check Compile
124128
# See tools/ci/src/main.rs for the commands this runs
125129
run: cargo run -p ci -- compile
@@ -214,7 +218,7 @@ jobs:
214218
steps:
215219
- uses: actions/checkout@v4
216220
- name: Check for typos
217-
uses: crate-ci/typos@v1.19.0
221+
uses: crate-ci/typos@v1.20.9
218222
- name: Typos info
219223
if: failure()
220224
run: |
@@ -226,6 +230,7 @@ jobs:
226230
227231
228232
run-examples-macos-metal:
233+
# Explicity use MacOS 14 to take advantage of M1 chip.
229234
runs-on: macos-14
230235
timeout-minutes: 30
231236
steps:
@@ -284,8 +289,11 @@ jobs:
284289
target/
285290
key: ${{ runner.os }}-check-doc-${{ hashFiles('**/Cargo.toml') }}
286291
- uses: dtolnay/rust-toolchain@stable
287-
- name: Install alsa and udev
288-
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev
292+
- name: Install Linux dependencies
293+
uses: ./.github/actions/install-linux-deps
294+
with:
295+
wayland: true
296+
xkb: true
289297
- name: Build and check doc
290298
# See tools/ci/src/main.rs for the commands this runs
291299
run: cargo run -p ci -- doc
@@ -383,14 +391,15 @@ jobs:
383391
target/
384392
key: ${{ runner.os }}-cargo-msrv-${{ hashFiles('**/Cargo.toml') }}
385393
- name: get MSRV
394+
id: msrv
386395
run: |
387396
msrv=`cargo metadata --no-deps --format-version 1 | jq --raw-output '.packages[] | select(.name=="bevy") | .rust_version'`
388-
echo "MSRV=$msrv" >> $GITHUB_ENV
397+
echo "msrv=$msrv" >> $GITHUB_OUTPUT
389398
- uses: dtolnay/rust-toolchain@master
390399
with:
391-
toolchain: ${{ env.MSRV }}
392-
- name: Install alsa and udev
393-
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
400+
toolchain: ${{ steps.msrv.outputs.msrv }}
401+
- name: Install Linux dependencies
402+
uses: ./.github/actions/install-linux-deps
394403
- name: Run cargo check
395404
id: check
396405
run: cargo check
@@ -443,8 +452,11 @@ jobs:
443452
- uses: dtolnay/rust-toolchain@master
444453
with:
445454
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
446-
- name: Install alsa and udev
447-
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev
455+
- name: Install Linux dependencies
456+
uses: ./.github/actions/install-linux-deps
457+
with:
458+
wayland: true
459+
xkb: true
448460
- name: Build and check cfg typos
449461
# See tools/ci/src/main.rs for the commands this runs
450462
run: cargo run -p ci -- cfg-check

.github/workflows/daily.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77

88
env:
99
CARGO_TERM_COLOR: always
10-
NIGHTLY_TOOLCHAIN: nightly
1110

1211
jobs:
1312
build-for-iOS:

.github/workflows/docs.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
env:
1111
CARGO_TERM_COLOR: always
1212
RUSTDOCFLAGS: --html-in-header header.html
13+
# If nightly is breaking CI, modify this variable to target a specific nightly version.
1314
NIGHTLY_TOOLCHAIN: nightly
1415

1516
# Sets the permissions to allow deploying to Github pages.
@@ -37,8 +38,11 @@ jobs:
3738
with:
3839
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
3940

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

4347
# This does the following:
4448
# - Replaces the docs icon with one that clearly denotes it's not the released package on crates.io

.github/workflows/validation-jobs.yml

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ on:
77
branches:
88
- main
99

10-
1110
concurrency:
1211
group: ${{github.workflow}}-${{github.ref}}
1312
cancel-in-progress: ${{github.event_name == 'pull_request'}}
1413

1514
env:
1615
CARGO_TERM_COLOR: always
16+
# If nightly is breaking CI, modify this variable to target a specific nightly version.
1717
NIGHTLY_TOOLCHAIN: nightly
1818

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

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

3839
- name: Build and install iOS app in iOS Simulator.
3940
run: cd examples/mobile && make install
@@ -71,18 +72,14 @@ jobs:
7172
runs-on: ubuntu-latest
7273
timeout-minutes: 30
7374
steps:
74-
- name: Install Bevy dependencies
75-
run: |
76-
sudo apt-get update;
77-
DEBIAN_FRONTEND=noninteractive sudo apt-get install --no-install-recommends -yq \
78-
libasound2-dev libudev-dev libxkbcommon-x11-0;
79-
- name: install xvfb, llvmpipe and lavapipe
75+
- uses: actions/checkout@v4
76+
- name: Install Linux dependencies
77+
uses: ./.github/actions/install-linux-deps
78+
# At some point this may be merged into `install-linux-deps`, but for now it is its own step.
79+
- name: Install additional Linux dependencies for Vulkan
8080
run: |
81-
sudo apt-get update -y -qq
8281
sudo add-apt-repository ppa:kisak/turtle -y
83-
sudo apt-get update
84-
sudo apt install -y xvfb libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers
85-
- uses: actions/checkout@v4
82+
sudo apt-get install --no-install-recommends libxkbcommon-x11-0 xvfb libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers
8683
- uses: actions/cache@v4
8784
with:
8885
path: |
@@ -240,8 +237,8 @@ jobs:
240237
steps:
241238
- uses: actions/checkout@v4
242239
- uses: dtolnay/rust-toolchain@stable
243-
- name: Install alsa and udev
244-
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
240+
- name: Install Linux dependencies
241+
uses: ./.github/actions/install-linux-deps
245242
- name: Build
246243
run: cargo build -p ${{ matrix.crate }} --no-default-features
247244
env:
@@ -282,8 +279,8 @@ jobs:
282279
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
283280
- name: Installs cargo-udeps
284281
run: cargo install --force cargo-udeps
285-
- name: Install alsa and udev
286-
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
282+
- name: Install Linux dependencies
283+
uses: ./.github/actions/install-linux-deps
287284
- name: Run cargo udeps
288285
run: cargo udeps
289286

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

0 commit comments

Comments
 (0)