diff --git a/.github/bors.toml b/.github/bors.toml index 9931de1ec54c6..872f2a21fca02 100644 --- a/.github/bors.toml +++ b/.github/bors.toml @@ -15,6 +15,8 @@ status = [ "ci", "miri", "check-compiles", + "build-and-install-on-iOS", + "run-examples-on-windows", ] use_squash_merge = true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d4c465fef834..f96cff224d143 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -134,6 +134,7 @@ jobs: toolchain: [stable, nightly] os: [ubuntu-latest] runs-on: ${{ matrix.os }} + needs: build steps: - uses: actions/checkout@v3 - uses: actions/cache@v3 @@ -156,31 +157,6 @@ jobs: command: check args: --target wasm32-unknown-unknown --no-default-features --features bevy_winit,x11,hdr,bevy_gltf - build-android: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - uses: actions/cache@v3 - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ runner.os }}-cargo-build-android-${{ hashFiles('**/Cargo.toml') }} - - name: Uninstall android-31 - run: $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --uninstall "platforms;android-31" - - name: Install Android targets - run: rustup target add aarch64-linux-android armv7-linux-androideabi - - name: Install Cargo APK - run: cargo install --force cargo-apk - - name: Build APK - run: cargo apk build --example android - markdownlint: runs-on: ubuntu-latest needs: check-missing-examples-in-docs @@ -250,6 +226,7 @@ jobs: run-examples: runs-on: ubuntu-latest + timeout-minutes: 30 steps: - name: Install Bevy dependencies run: | @@ -277,13 +254,13 @@ jobs: toolchain: stable - name: Build bevy run: | - cargo build --no-default-features --features "bevy_dynamic_plugin,bevy_gilrs,bevy_gltf,bevy_winit,render,png,hdr,x11,bevy_ci_testing,trace,trace_chrome,bevy_audio,vorbis" + cargo build --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 "running $example_name - "`date` - time TRACE_CHROME=trace-$example_name.json CI_TESTING_CONFIG=$example xvfb-run cargo run --example $example_name --no-default-features --features "bevy_dynamic_plugin,bevy_gilrs,bevy_gltf,bevy_winit,render,png,hdr,x11,bevy_ci_testing,trace,trace_chrome,bevy_audio,vorbis" + 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 done zip traces.zip trace*.json diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml deleted file mode 100644 index 7cc954acf9c80..0000000000000 --- a/.github/workflows/ios.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: iOS cron CI - -on: - schedule: - - cron: "0 0 * * *" - -env: - CARGO_TERM_COLOR: always - -jobs: - build: - runs-on: macos-latest - steps: - - uses: actions/checkout@v3 - - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - - uses: actions/cache@v3 - with: - path: | - target - key: ${{ runner.os }}-cargo-check-test-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.lock') }} - - - name: Add iOS targets - run: rustup target add aarch64-apple-ios x86_64-apple-ios - - - name: Build and install iOS app in iOS Simulator. - run: cd examples/ios && make install diff --git a/.github/workflows/validation-jobs.yml b/.github/workflows/validation-jobs.yml new file mode 100644 index 0000000000000..533d20b7ca804 --- /dev/null +++ b/.github/workflows/validation-jobs.yml @@ -0,0 +1,99 @@ +name: validation jobs + +on: + push: + branches: + - staging + - trying + - main + +env: + CARGO_TERM_COLOR: always + +jobs: + build-and-install-on-iOS: + runs-on: macos-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + + - uses: actions/cache@v3 + with: + path: | + target + key: ${{ runner.os }}-ios-install-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.lock') }} + + - name: Add iOS targets + run: rustup target add aarch64-apple-ios x86_64-apple-ios + + - name: Build and install iOS app in iOS Simulator. + run: cd examples/ios && make install + + build-android: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + + - uses: actions/cache@v3 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-build-android-${{ hashFiles('**/Cargo.toml') }} + + - name: Uninstall android-31 + run: $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --uninstall "platforms;android-31" + + - name: Install Android targets + run: rustup target add aarch64-linux-android armv7-linux-androideabi + + - name: Install Cargo APK + run: cargo install --force cargo-apk + + - name: Build APK + run: cargo apk build --example android + + run-examples-on-windows: + runs-on: windows-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v3 + + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + + - uses: actions/cache@v3 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-windows-run-examples-${{ hashFiles('**/Cargo.toml') }} + + - name: Build bevy + run: | + cargo build --features "bevy_ci_testing" + + - name: Run examples + shell: bash + run: | + for example in .github/example-run/*.ron; do + example_name=`basename $example .ron` + echo "running $example_name - "`date` + time CI_TESTING_CONFIG=$example cargo run --example $example_name --features "bevy_ci_testing" + sleep 10 + done