-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix cross-platform CI.yml * remove sudo * fix issues in ci * exclude lua54 feature from dev dependencies * adjust workflows * adjust workflows * set default dir * change default dir * checkout subdir * formatting fixes * nightly toolchain set * add clippy.toml * finish fixes to workflows * change checkout strategy * typo * add feature * remove macro_tests from check.sh
- Loading branch information
Showing
45 changed files
with
260 additions
and
57 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
on: | ||
pull_request: | ||
paths: | ||
- "crates/bevy_api_gen/**" | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "crates/bevy_api_gen/**" | ||
|
||
|
||
name: Check and Lint - bevy_api_gen | ||
|
||
jobs: | ||
check: | ||
name: Check - bevy_api_gen | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
sparse-checkout: 'crates/bevy_api_gen' | ||
sparse-checkout-cone-mode: false | ||
- name: Move bevy_api_gen to root | ||
run: | | ||
mv crates/bevy_api_gen/* . | ||
rm -rf crates | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly-2024-01-24 | ||
override: true | ||
- name: Rust Cache | ||
uses: Swatinem/[email protected] | ||
- name: Clear space | ||
run: rm -rf /usr/share/dotnet; rm -rf /opt/ghc; rm -rf "/usr/local/share/boost"; rm -rf "$AGENT_TOOLSDIRECTORY" | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: check | ||
args: --profile=ephemeral-build | ||
|
||
fmt: | ||
name: Rustfmt - bevy_api_gen | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
sparse-checkout: 'crates/bevy_api_gen' | ||
sparse-checkout-cone-mode: false | ||
- name: Move bevy_api_gen to root | ||
run: | | ||
mv crates/bevy_api_gen/* . | ||
rm -rf crates | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
components: rustfmt | ||
toolchain: nightly-2024-01-24 | ||
override: true | ||
- name: Rust Cache | ||
uses: Swatinem/[email protected] | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
|
||
clippy: | ||
name: Clippy - bevy_api_gen | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
sparse-checkout: 'crates/bevy_api_gen' | ||
sparse-checkout-cone-mode: false | ||
- name: Move bevy_api_gen to root | ||
run: | | ||
mv crates/bevy_api_gen/* . | ||
rm -rf crates | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly-2024-01-24 | ||
components: clippy | ||
override: true | ||
- name: Rust Cache | ||
uses: Swatinem/[email protected] | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: clippy | ||
args: --profile=ephemeral-build -- -D warnings | ||
tests: | ||
name: Tests - bevy_api_gen | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
sparse-checkout: 'crates/bevy_api_gen' | ||
sparse-checkout-cone-mode: false | ||
- name: Move bevy_api_gen to root | ||
run: | | ||
mv crates/bevy_api_gen/* . | ||
rm -rf crates | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly-2024-01-24 | ||
override: true | ||
- name: Rust Cache | ||
uses: Swatinem/[email protected] | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --profile=ephemeral-build | ||
docs: | ||
name: Docs - bevy_api_gen | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
sparse-checkout: 'crates/bevy_api_gen' | ||
sparse-checkout-cone-mode: false | ||
- name: Move bevy_api_gen to root | ||
run: | | ||
mv crates/bevy_api_gen/* . | ||
rm -rf crates | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly-2024-01-24 | ||
override: true | ||
- name: Rust Cache | ||
uses: Swatinem/[email protected] | ||
# - name: Find docs.rs features | ||
# run: echo "DOCS_FEATURES=$(cargo metadata --no-deps | python -c "import sys,json; [print(','.join(x['metadata']['docs.rs']['features'])) for x in json.load(sys.stdin)['packages'] if x['name'] == 'bevy_mod_scripting']")" >> $GITHUB_OUTPUT | ||
# id: features | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: doc | ||
args: --profile=ephemeral-build |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
on: | ||
pull_request: | ||
paths-ignore: | ||
- 'crates/bevy_api_gen/**' | ||
- 'crates/macro_tests/**' | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- 'crates/bevy_api_gen/**' | ||
- 'crates/macro_tests/**' | ||
|
||
|
||
name: Check and Lint | ||
name: Check and Lint - bevy_mod_scripting | ||
|
||
jobs: | ||
check: | ||
|
@@ -14,20 +20,20 @@ jobs: | |
strategy: | ||
matrix: | ||
run_args: [ | ||
{os: windows-latest, lua: lua54, cross: null}, | ||
{os: macOS-latest, lua: lua54, cross: null}, | ||
# {os: ubuntu-latest, lua: lua54, cross: aarch64-unknown-linux-gnu}, see https://github.com/houseabsolute/actions-rust-cross/issues/15 | ||
{os: ubuntu-latest, lua: lua51, cross: null}, | ||
{os: ubuntu-latest, lua: lua52, cross: null}, | ||
{os: ubuntu-latest, lua: lua53, cross: null}, | ||
{os: ubuntu-latest, lua: lua54, cross: null}, | ||
{os: ubuntu-latest, lua: luajit, cross: null}, | ||
{os: ubuntu-latest, lua: luajit52, cross: null} | ||
{os: windows-latest, lua: lua54, cross: x86_64-pc-windows-msvc}, | ||
{os: macOS-latest, lua: lua54, cross: x86_64-apple-darwin}, | ||
{os: ubuntu-latest, lua: lua54, cross: aarch64-unknown-linux-gnu}, | ||
{os: ubuntu-latest, lua: lua51, cross: x86_64-unknown-linux-gnu}, | ||
{os: ubuntu-latest, lua: lua52, cross: x86_64-unknown-linux-gnu}, | ||
{os: ubuntu-latest, lua: lua53, cross: x86_64-unknown-linux-gnu}, | ||
{os: ubuntu-latest, lua: lua54, cross: x86_64-unknown-linux-gnu}, | ||
{os: ubuntu-latest, lua: luajit, cross: x86_64-unknown-linux-gnu}, | ||
{os: ubuntu-latest, lua: luajit52, cross: x86_64-unknown-linux-gnu} | ||
] | ||
steps: | ||
- name: Install alsa and udev | ||
- if: runner.os == 'linux' | ||
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' | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
|
@@ -36,18 +42,10 @@ jobs: | |
override: true | ||
- name: Rust Cache | ||
uses: Swatinem/[email protected] | ||
# for x86 builds | ||
- if: matrix.run_args.cross == null | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: check | ||
args: --workspace --features=${{ matrix.run_args.lua }},rhai,teal,lua_script_api,rhai_script_api,rune | ||
# for non x86 cross-compiled builds | ||
- if: matrix.run_args.cross != null | ||
- if: runner.os != 'windows' | ||
name: Clear space | ||
run: sudo rm -rf /usr/share/dotnet; sudo rm -rf /opt/ghc; sudo rm -rf "/usr/local/share/boost"; sudo rm -rf "$AGENT_TOOLSDIRECTORY" | ||
- if: matrix.run_args.cross != null | ||
uses: houseabsolute/actions-rust-cross@v0 | ||
run: rm -rf /usr/share/dotnet; rm -rf /opt/ghc; rm -rf "/usr/local/share/boost"; rm -rf "$AGENT_TOOLSDIRECTORY" | ||
- uses: houseabsolute/actions-rust-cross@v0 | ||
with: | ||
command: check | ||
target: ${{ matrix.run_args.cross }} | ||
|
@@ -101,7 +99,6 @@ jobs: | |
uses: actions/checkout@v3 | ||
- name: Install alsa and udev | ||
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
on: | ||
pull_request: | ||
paths: | ||
- "crates/macro_tests/**" | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "crates/macro_tests/**" | ||
|
||
|
||
name: Run macro tests | ||
|
||
jobs: | ||
tests: | ||
name: Macro Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clear space | ||
run: sudo rm -rf /usr/share/dotnet; sudo rm -rf /opt/ghc; sudo rm -rf "/usr/local/share/boost"; sudo rm -rf "$AGENT_TOOLSDIRECTORY" | ||
- uses: actions/checkout@v3 | ||
- name: Install alsa and udev | ||
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
- name: Rust Cache | ||
uses: Swatinem/[email protected] | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
- run: cd crates/macro_tests && cargo test --profile=ephemeral-build |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
type-complexity-threshold=1000 |
Oops, something went wrong.