Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use GitHub Actions config from master branch #217

Merged
merged 3 commits into from
Jun 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/ci-cron.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CI-cron

on:
schedule:
- cron: 0 9 * * *

env:
CARGO_TERM_COLOR: always

jobs:

build:
strategy:
matrix:
toolchain: [stable, nightly]
os: [windows-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
ref: bevy-main

- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
components: rustfmt, clippy
- name: fmt
if: ${{ matrix.toolchain == 'nightly' && runner.os == 'linux' }}
run: cargo fmt --all -- --check

- 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: lint
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-targets --all-features -- -D warnings -A unknown-lints

- name: Build & run tests
run: cargo test --workspace
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0 -D warnings"
18 changes: 6 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ name: CI

on:
pull_request:
branches: [master]
branches: [master, bevy-main]
push:
branches: [master]
schedule:
- cron: 0 9 * * *
branches: [master, bevy-main]

env:
CARGO_TERM_COLOR: always
Expand All @@ -20,20 +18,16 @@ jobs:
os: [windows-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
components: rustfmt, clippy
override: true
- name: fmt
if: ${{ matrix.toolchain == 'nightly' && runner.os == 'linux' }}
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

run: cargo fmt --all -- --check

- 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'
Expand Down
28 changes: 16 additions & 12 deletions .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ jobs:
check-advisories:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
with:
ref: bevy-main
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
override: true
- name: Install cargo-deny
run: cargo install cargo-deny
- name: Check for security advisories and unmaintained crates
Expand All @@ -37,11 +38,12 @@ jobs:
check-bans:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
with:
ref: bevy-main
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
override: true
- name: Install cargo-deny
run: cargo install cargo-deny
- name: Check for banned and duplicated dependencies
Expand All @@ -50,11 +52,12 @@ jobs:
check-licenses:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
with:
ref: bevy-main
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
override: true
- name: Install cargo-deny
run: cargo install cargo-deny
- name: Check for unauthorized licenses
Expand All @@ -63,11 +66,12 @@ jobs:
check-sources:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
with:
ref: bevy-main
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
override: true
- name: Install cargo-deny
run: cargo install cargo-deny
- name: Checked for unauthorized crate sources
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ fn main() {
App::new()
.insert_resource(Msaa::Sample4)
.add_plugins(DefaultPlugins)
.add_plugin(ShapePlugin)
.add_plugins(ShapePlugin)
.add_systems(Startup, setup_system)
.run();
}
Expand Down
2 changes: 1 addition & 1 deletion examples/dynamic_shape.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fn main() {
App::new()
.insert_resource(Msaa::Sample4)
.add_plugins(DefaultPlugins)
.add_plugin(ShapePlugin)
.add_plugins(ShapePlugin)
.add_systems(Startup, setup_system)
.add_systems(Update, change_draw_mode_system)
.add_systems(Update, change_number_of_sides)
Expand Down
2 changes: 1 addition & 1 deletion examples/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ fn main() {
App::new()
.insert_resource(Msaa::Sample4)
.add_plugins(DefaultPlugins)
.add_plugin(ShapePlugin)
.add_plugins(ShapePlugin)
.add_systems(Startup, setup_system)
.run();
}
Expand Down
2 changes: 1 addition & 1 deletion examples/readme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ fn main() {
App::new()
.insert_resource(Msaa::Sample4)
.add_plugins(DefaultPlugins)
.add_plugin(ShapePlugin)
.add_plugins(ShapePlugin)
.add_systems(Startup, setup_system)
.run();
}
Expand Down
2 changes: 1 addition & 1 deletion examples/rounded_polygon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ fn main() {
App::new()
.insert_resource(Msaa::Sample4)
.add_plugins(DefaultPlugins)
.add_plugin(ShapePlugin)
.add_plugins(ShapePlugin)
.add_systems(Startup, setup_system)
.run();
}
Expand Down
2 changes: 1 addition & 1 deletion examples/svg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ fn main() {
//Added msaa to reduce aliasing
.insert_resource(Msaa::Sample4)
.add_plugins(DefaultPlugins)
.add_plugin(ShapePlugin)
.add_plugins(ShapePlugin)
.add_systems(Startup, setup_system)
.run();
}
Expand Down
2 changes: 1 addition & 1 deletion src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ impl Plugin for ShapePlugin {
BuildShapes.after(bevy::transform::TransformSystem::TransformPropagate),
)
.add_systems(PostUpdate, mesh_shapes_system.in_set(BuildShapes))
.add_plugin(ShapeMaterialPlugin);
.add_plugins(ShapeMaterialPlugin);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ impl Plugin for ShapeMaterialPlugin {
Shader::from_wgsl
);

app.add_plugin(Material2dPlugin::<ShapeMaterial>::default())
app.add_plugins(Material2dPlugin::<ShapeMaterial>::default())
.register_asset_reflect::<ShapeMaterial>();

app.world
Expand Down
6 changes: 3 additions & 3 deletions src/shapes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,12 +291,12 @@ impl Geometry for Line {
///offset the coordinates of the paths
///
///In inkscape for example, to turn your units into pixels, you:
///1) Go to File>Document Properties>General>Display Units and set it to px
/// 1) Go to File>Document Properties>General>Display Units and set it to px
///
///2) In File>Document Properties>Custom Size>Units set it to px, also, this
/// 2) In File>Document Properties>Custom Size>Units set it to px, also, this
/// size would be used for `svg_doc_size_in_px`
///
///3) In File>Document Properties>Scale>Scale x make sure it is set to 1 User
/// 3) In File>Document Properties>Scale>Scale x make sure it is set to 1 User
/// unit per px
///
///Example exists in the examples folder
Expand Down