bevy/.github/workflows/validation-jobs.yml
dependabot[bot] 9a61e83d73
Bump actions/setup-java from 3 to 4 (#15695)
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3
to 4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/setup-java/releases">actions/setup-java's
releases</a>.</em></p>
<blockquote>
<h2>v4.0.0</h2>
<h2>What's Changed</h2>
<p>In the scope of this release, the version of the Node.js runtime was
updated to 20. The majority of dependencies were updated to the latest
versions. From now on, the code for the setup-java will run on Node.js
20 instead of Node.js 16.</p>
<h2>Breaking changes</h2>
<ul>
<li>Update Node.js runtime to version 20 by <a
href="https://github.com/aparnajyothi-y"><code>@​aparnajyothi-y</code></a>
in <a
href="https://redirect.github.com/actions/setup-java/pull/558">actions/setup-java#558</a></li>
</ul>
<h2>Non-breaking changes</h2>
<ul>
<li>Adding support for microsoft openjdk 21.0.0 by <a
href="https://github.com/ralfstuckert"><code>@​ralfstuckert</code></a>
in <a
href="https://redirect.github.com/actions/setup-java/pull/546">actions/setup-java#546</a></li>
<li>Update <code>@​actions/cache</code> dependency and documentation by
<a href="https://github.com/IvanZosimov"><code>@​IvanZosimov</code></a>
in <a
href="https://redirect.github.com/actions/setup-java/pull/549">actions/setup-java#549</a></li>
<li>Implementation of the cache-dependency-path option to control
caching dependency by <a
href="https://github.com/itchyny"><code>@​itchyny</code></a> in <a
href="https://redirect.github.com/actions/setup-java/pull/499">actions/setup-java#499</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/ralfstuckert"><code>@​ralfstuckert</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/setup-java/pull/546">actions/setup-java#546</a></li>
<li><a href="https://github.com/itchyny"><code>@​itchyny</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/setup-java/pull/499">actions/setup-java#499</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/setup-java/compare/v3...v4.0.0">https://github.com/actions/setup-java/compare/v3...v4.0.0</a></p>
<h2>v3.13.0</h2>
<h2>What's changed</h2>
<p>In the scope of this release, support for Dragonwell JDK was added by
<a
href="https://github.com/Accelerator1996"><code>@​Accelerator1996</code></a>
in <a
href="https://redirect.github.com/actions/setup-java/pull/532">actions/setup-java#532</a></p>
<pre lang="yaml"><code>steps:
 - name: Checkout
   uses: actions/checkout@v3
 - name: Setup-java
   uses: actions/setup-java@v3
   with:
     distribution: 'dragonwell'
     java-version: '17'
</code></pre>
<p>Several inaccuracies were also fixed:</p>
<ul>
<li>Fix XML namespaces wrongly using https by <a
href="https://github.com/gnodet"><code>@​gnodet</code></a> in <a
href="https://redirect.github.com/actions/setup-java/pull/503">actions/setup-java#503</a></li>
<li>Fix typo and remove unintentional(?) word by <a
href="https://github.com/CyberFlameGO"><code>@​CyberFlameGO</code></a>
in <a
href="https://redirect.github.com/actions/setup-java/pull/518">actions/setup-java#518</a></li>
<li>Fix usage link within the README.md file by <a
href="https://github.com/dassiorleando"><code>@​dassiorleando</code></a>
in <a
href="https://redirect.github.com/actions/setup-java/pull/525">actions/setup-java#525</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/CyberFlameGO"><code>@​CyberFlameGO</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/setup-java/pull/518">actions/setup-java#518</a></li>
<li><a
href="https://github.com/dassiorleando"><code>@​dassiorleando</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/setup-java/pull/525">actions/setup-java#525</a></li>
<li><a href="https://github.com/gnodet"><code>@​gnodet</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/setup-java/pull/503">actions/setup-java#503</a></li>
<li><a
href="https://github.com/Accelerator1996"><code>@​Accelerator1996</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/setup-java/pull/532">actions/setup-java#532</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/setup-java/compare/v3...v3.13.0">https://github.com/actions/setup-java/compare/v3...v3.13.0</a></p>
<h2>v3.12.0</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b36c23c0d9"><code>b36c23c</code></a>
check-dist-failure-fix (<a
href="https://redirect.github.com/actions/setup-java/issues/687">#687</a>)</li>
<li><a
href="40b9536ce5"><code>40b9536</code></a>
fix: add arch to cache key (<a
href="https://redirect.github.com/actions/setup-java/issues/664">#664</a>)</li>
<li><a
href="0a40ce6f61"><code>0a40ce6</code></a>
Add support for Oracle GraalVM (<a
href="https://redirect.github.com/actions/setup-java/issues/501">#501</a>)</li>
<li><a
href="bcfbca5b71"><code>bcfbca5</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/setup-java/issues/684">#684</a>
from actions/Jcambass-patch-1</li>
<li><a
href="78eae7945c"><code>78eae79</code></a>
Add workflow file for publishing releases to immutable action
package</li>
<li><a
href="2dfa2011c5"><code>2dfa201</code></a>
basic validation failure fix (<a
href="https://redirect.github.com/actions/setup-java/issues/682">#682</a>)</li>
<li><a
href="7467385c61"><code>7467385</code></a>
feat: add support for SapMachine JDK/JRE (<a
href="https://redirect.github.com/actions/setup-java/issues/614">#614</a>)</li>
<li><a
href="8e04ddff28"><code>8e04ddf</code></a>
Update Error Messages and Fix Architecture Detection for IBM Semeru (<a
href="https://redirect.github.com/actions/setup-java/issues/677">#677</a>)</li>
<li><a
href="67fbd726da"><code>67fbd72</code></a>
Fix typos on Corretto (<a
href="https://redirect.github.com/actions/setup-java/issues/665">#665</a>)
(<a
href="https://redirect.github.com/actions/setup-java/issues/666">#666</a>)</li>
<li><a
href="6a0805fcef"><code>6a0805f</code></a>
Fix the bug about parsing dragonwell version (<a
href="https://redirect.github.com/actions/setup-java/issues/642">#642</a>)
(<a
href="https://redirect.github.com/actions/setup-java/issues/643">#643</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/actions/setup-java/compare/v3...v4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/setup-java&package-manager=github_actions&previous-version=3&new-version=4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-07 07:30:37 +00:00

324 lines
11 KiB
YAML

name: validation jobs
on:
merge_group:
pull_request:
push:
branches:
- main
- release-*
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:
build-and-install-on-iOS:
if: ${{ github.event_name == 'merge_group' }}
runs-on: macos-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: actions/cache@v4
with:
path: |
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 aarch64-apple-ios-sim
- name: Build and install iOS app in iOS Simulator.
run: cd examples/mobile && make install
build-android:
if: ${{ github.event_name == 'merge_group' }}
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-build-android-${{ hashFiles('**/Cargo.toml') }}
- name: Install Android targets
run: rustup target add aarch64-linux-android
- name: Install Cargo NDK
run: cargo install --force cargo-ndk
- name: Build .so file
run: cargo ndk -t arm64-v8a -o android_example/app/src/main/jniLibs build --package bevy_mobile_example
- name: Build app for Android
run: cd examples/mobile/android_example && chmod +x gradlew && ./gradlew build
run-examples-linux-vulkan:
if: ${{ github.event_name == 'merge_group' }}
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- 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 add-apt-repository ppa:kisak/turtle -y
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: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-run-examples-${{ hashFiles('**/Cargo.toml') }}
- uses: dtolnay/rust-toolchain@stable
- name: Build bevy
# this uses the same command as when running the example to ensure build is reused
run: |
TRACE_CHROME=trace-alien_cake_addict.json CI_TESTING_CONFIG=.github/example-run/alien_cake_addict.ron cargo build --example alien_cake_addict --features "bevy_ci_testing,trace,trace_chrome"
- name: Run examples
run: |
for example in .github/example-run/*.ron; do
example_name=`basename $example .ron`
echo -n $example_name > last_example_run
echo "running $example_name - "`date`
time TRACE_CHROME=trace-$example_name.json CI_TESTING_CONFIG=$example xvfb-run cargo run --example $example_name --features "bevy_ci_testing,trace,trace_chrome"
sleep 10
if [ `find ./ -maxdepth 1 -name 'screenshot-*.png' -print -quit` ]; then
mkdir screenshots-$example_name
mv screenshot-*.png screenshots-$example_name/
fi
done
mkdir traces && mv trace*.json traces/
mkdir screenshots && mv screenshots-* screenshots/
- name: save traces
uses: actions/upload-artifact@v4
with:
name: example-traces-linux
path: traces
- name: save screenshots
uses: actions/upload-artifact@v4
with:
name: screenshots-linux
path: screenshots
- uses: actions/upload-artifact@v4
if: ${{ failure() && github.event_name == 'pull_request' }}
with:
name: example-run-linux
path: example-run/
run-examples-on-windows-dx12:
if: ${{ github.event_name == 'merge_group' }}
runs-on: windows-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Build bevy
shell: bash
# this uses the same command as when running the example to ensure build is reused
run: |
WGPU_BACKEND=dx12 TRACE_CHROME=trace-alien_cake_addict.json CI_TESTING_CONFIG=.github/example-run/alien_cake_addict.ron cargo build --example alien_cake_addict --features "bevy_ci_testing,trace,trace_chrome"
- name: Run examples
shell: bash
run: |
for example in .github/example-run/*.ron; do
example_name=`basename $example .ron`
echo -n $example_name > last_example_run
echo "running $example_name - "`date`
time WGPU_BACKEND=dx12 TRACE_CHROME=trace-$example_name.json CI_TESTING_CONFIG=$example cargo run --example $example_name --features "bevy_ci_testing,trace,trace_chrome"
sleep 10
if [ `find ./ -maxdepth 1 -name 'screenshot-*.png' -print -quit` ]; then
mkdir screenshots-$example_name
mv screenshot-*.png screenshots-$example_name/
fi
done
mkdir traces && mv trace*.json traces/
mkdir screenshots && mv screenshots-* screenshots/
- name: save traces
uses: actions/upload-artifact@v4
with:
name: example-traces-windows
path: traces
- name: save screenshots
uses: actions/upload-artifact@v4
with:
name: screenshots-windows
path: screenshots
- uses: actions/upload-artifact@v4
if: ${{ failure() && github.event_name == 'pull_request' }}
with:
name: example-run-windows
path: example-run/
run-examples-on-wasm:
if: ${{ github.event_name == 'merge_group' }}
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
target: wasm32-unknown-unknown
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
~/.github/start-wasm-example/node_modules
target/
key: ${{ runner.os }}-wasm-run-examples-${{ hashFiles('**/Cargo.toml') }}
- name: install xvfb, llvmpipe and lavapipe
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
- name: Install wasm-bindgen
run: cargo install --force wasm-bindgen-cli
- name: Setup playwright
run: |
cd .github/start-wasm-example
npm install
npx playwright install --with-deps
cd ../..
- name: First Wasm build
run: |
cargo build --release --example ui --target wasm32-unknown-unknown
- name: Run examples
shell: bash
run: |
# start a webserver
python3 -m http.server --directory examples/wasm &
xvfb-run cargo run -p build-wasm-example -- --browsers chromium --browsers firefox --frames 25 --test 2d_shapes lighting text_debug breakout
- name: Save screenshots
uses: actions/upload-artifact@v4
with:
name: screenshots-wasm
path: .github/start-wasm-example/screenshot-*.png
build-without-default-features:
if: ${{ github.event_name == 'merge_group' }}
timeout-minutes: 30
strategy:
max-parallel: 1
matrix:
crate: [bevy_ecs, bevy_reflect, bevy]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install Linux dependencies
uses: ./.github/actions/install-linux-deps
- name: Build
run: cargo build -p ${{ matrix.crate }} --no-default-features
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0 -D warnings"
build-without-default-features-status:
if: |
always() &&
github.event_name == 'merge_group'
needs: build-without-default-features
runs-on: ubuntu-latest
steps:
- name: Successful
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: Failing
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1
check-unused-dependencies:
if: ${{ github.event_name == 'merge_group' }}
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-check-unused-dependencies-${{ hashFiles('**/Cargo.toml') }}
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
- name: Installs cargo-udeps
run: cargo install --force cargo-udeps
- name: Install Linux dependencies
uses: ./.github/actions/install-linux-deps
- name: Run cargo udeps
run: cargo udeps
check-example-showcase-patches-still-work:
if: ${{ github.event_name == 'merge_group' }}
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-check-showcase-patches-${{ hashFiles('**/Cargo.toml') }}
- uses: dtolnay/rust-toolchain@stable
- name: Install Linux dependencies
uses: ./.github/actions/install-linux-deps
- name: Apply patches
run: |
CODE=0
for patch in tools/example-showcase/*.patch; do
# 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