From 91d6213fbdaa5662c79bc251b97cdf09a7b3218c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois?= Date: Thu, 7 Apr 2022 10:18:50 +0200 Subject: [PATCH 01/11] run examples on windows --- .github/workflows/ci.yml | 81 +++++++++++++++++++++++++--------------- 1 file changed, 51 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d4c465fef834..74463af80d595 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -248,50 +248,71 @@ jobs: exit 1 fi - run-examples: - runs-on: ubuntu-latest + # run-examples: + # runs-on: ubuntu-latest + # steps: + # - name: Install Bevy dependencies + # run: | + # sudo apt-get update; + # DEBIAN_FRONTEND=noninteractive sudo apt-get install --no-install-recommends -yq \ + # libasound2-dev libudev-dev; + # - name: install xvfb, llvmpipe and lavapipe + # run: | + # sudo apt-get update -y -qq + # sudo add-apt-repository ppa:oibaf/graphics-drivers -y + # sudo apt-get update + # sudo apt install -y xvfb libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers + # - uses: actions/checkout@v3 + # - uses: actions/cache@v3 + # with: + # path: | + # ~/.cargo/bin/ + # ~/.cargo/registry/index/ + # ~/.cargo/registry/cache/ + # ~/.cargo/git/db/ + # target/ + # key: ${{ runner.os }}-cargo-run-examples-${{ hashFiles('**/Cargo.toml') }} + # - uses: actions-rs/toolchain@v1 + # with: + # 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" + # - name: Run examples + # run: | + # for example in .github/example-run/*.ron; do + # example_name=`basename $example .ron` + # echo "running $example_name - "`date` + # time 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" + # sleep 10 + # done + # zip traces.zip trace*.json + # - name: save traces + # uses: actions/upload-artifact@v3 + # with: + # name: example-traces.zip + # path: traces.zip + + + run-examples-on-windows: + runs-on: windows-latest steps: - - name: Install Bevy dependencies - run: | - sudo apt-get update; - DEBIAN_FRONTEND=noninteractive sudo apt-get install --no-install-recommends -yq \ - libasound2-dev libudev-dev; - - name: install xvfb, llvmpipe and lavapipe - run: | - sudo apt-get update -y -qq - sudo add-apt-repository ppa:oibaf/graphics-drivers -y - sudo apt-get update - sudo apt install -y xvfb libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers - uses: actions/checkout@v3 - - uses: actions/cache@v3 - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ runner.os }}-cargo-run-examples-${{ hashFiles('**/Cargo.toml') }} - uses: actions-rs/toolchain@v1 with: 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" - 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 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" sleep 10 done - zip traces.zip trace*.json - - name: save traces - uses: actions/upload-artifact@v3 - with: - name: example-traces.zip - path: traces.zip check-doc: runs-on: ubuntu-latest From f13827b0600cd1b0d0c3dc574f1ecee203110b03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois?= Date: Thu, 7 Apr 2022 10:58:25 +0200 Subject: [PATCH 02/11] adding timeout --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 74463af80d595..6101f2817269a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -250,6 +250,7 @@ jobs: # run-examples: # runs-on: ubuntu-latest + # timeout-minutes: 30 # steps: # - name: Install Bevy dependencies # run: | @@ -296,6 +297,7 @@ jobs: run-examples-on-windows: runs-on: windows-latest + timeout-minutes: 30 steps: - uses: actions/checkout@v3 - uses: actions-rs/toolchain@v1 From 514f930691b6c1fb6fed7dd5cfe2e97d0970e98e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois?= Date: Thu, 7 Apr 2022 17:45:05 +0200 Subject: [PATCH 03/11] linux is back! but can be simplified --- .github/workflows/ci.yml | 82 +++++++++++++++------------------------- 1 file changed, 30 insertions(+), 52 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6101f2817269a..8a7ee2dbf9e9f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -248,73 +248,51 @@ jobs: exit 1 fi - # run-examples: - # runs-on: ubuntu-latest - # timeout-minutes: 30 - # steps: - # - name: Install Bevy dependencies - # run: | - # sudo apt-get update; - # DEBIAN_FRONTEND=noninteractive sudo apt-get install --no-install-recommends -yq \ - # libasound2-dev libudev-dev; - # - name: install xvfb, llvmpipe and lavapipe - # run: | - # sudo apt-get update -y -qq - # sudo add-apt-repository ppa:oibaf/graphics-drivers -y - # sudo apt-get update - # sudo apt install -y xvfb libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers - # - uses: actions/checkout@v3 - # - uses: actions/cache@v3 - # with: - # path: | - # ~/.cargo/bin/ - # ~/.cargo/registry/index/ - # ~/.cargo/registry/cache/ - # ~/.cargo/git/db/ - # target/ - # key: ${{ runner.os }}-cargo-run-examples-${{ hashFiles('**/Cargo.toml') }} - # - uses: actions-rs/toolchain@v1 - # with: - # 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" - # - name: Run examples - # run: | - # for example in .github/example-run/*.ron; do - # example_name=`basename $example .ron` - # echo "running $example_name - "`date` - # time 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" - # sleep 10 - # done - # zip traces.zip trace*.json - # - name: save traces - # uses: actions/upload-artifact@v3 - # with: - # name: example-traces.zip - # path: traces.zip - - - run-examples-on-windows: - runs-on: windows-latest + run-examples: + runs-on: ubuntu-latest timeout-minutes: 30 steps: + - name: Install Bevy dependencies + run: | + sudo apt-get update; + DEBIAN_FRONTEND=noninteractive sudo apt-get install --no-install-recommends -yq \ + libasound2-dev libudev-dev; + - name: install xvfb, llvmpipe and lavapipe + run: | + sudo apt-get update -y -qq + sudo add-apt-repository ppa:oibaf/graphics-drivers -y + sudo apt-get update + sudo apt install -y xvfb libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers - uses: actions/checkout@v3 + - uses: actions/cache@v3 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-run-examples-${{ hashFiles('**/Cargo.toml') }} - uses: actions-rs/toolchain@v1 with: toolchain: stable - name: Build bevy run: | - cargo build --features "bevy_ci_testing" + cargo build --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 "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" + 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 + - name: save traces + uses: actions/upload-artifact@v3 + with: + name: example-traces.zip + path: traces.zip check-doc: runs-on: ubuntu-latest From 7e2aba69f7d63a173ae62ddb932926889f8ec1ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois?= Date: Thu, 7 Apr 2022 17:45:15 +0200 Subject: [PATCH 04/11] run windows daily --- .github/workflows/daily-jobs.yml | 53 ++++++++++++++++++++++++++++++++ .github/workflows/ios.yml | 31 ------------------- 2 files changed, 53 insertions(+), 31 deletions(-) create mode 100644 .github/workflows/daily-jobs.yml delete mode 100644 .github/workflows/ios.yml diff --git a/.github/workflows/daily-jobs.yml b/.github/workflows/daily-jobs.yml new file mode 100644 index 0000000000000..004fdf69d1557 --- /dev/null +++ b/.github/workflows/daily-jobs.yml @@ -0,0 +1,53 @@ +name: daily jobs + +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 + + + run-examples-on-windows: + runs-on: windows-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - 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 \ No newline at end of file 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 From e441191040661ebb41136115a531c9c23082b6e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois?= Date: Thu, 7 Apr 2022 17:47:24 +0200 Subject: [PATCH 05/11] last return --- .github/workflows/daily-jobs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/daily-jobs.yml b/.github/workflows/daily-jobs.yml index 004fdf69d1557..a5ae84691023d 100644 --- a/.github/workflows/daily-jobs.yml +++ b/.github/workflows/daily-jobs.yml @@ -50,4 +50,4 @@ jobs: echo "running $example_name - "`date` time CI_TESTING_CONFIG=$example cargo run --example $example_name --features "bevy_ci_testing" sleep 10 - done \ No newline at end of file + done From 1b6e40d514bba0483dc82292730cd359fe8d51b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois?= Date: Thu, 7 Apr 2022 17:53:54 +0200 Subject: [PATCH 06/11] format --- .github/workflows/daily-jobs.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/daily-jobs.yml b/.github/workflows/daily-jobs.yml index a5ae84691023d..1332cd3607d3e 100644 --- a/.github/workflows/daily-jobs.yml +++ b/.github/workflows/daily-jobs.yml @@ -8,7 +8,7 @@ env: CARGO_TERM_COLOR: always jobs: - build: + build-and-install-on-iOS: runs-on: macos-latest steps: - uses: actions/checkout@v3 @@ -36,12 +36,15 @@ jobs: timeout-minutes: 30 steps: - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 with: toolchain: stable + - name: Build bevy run: | cargo build --features "bevy_ci_testing" + - name: Run examples shell: bash run: | From 9642744aed18365dabfc560eba729d11a421e24c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois?= Date: Thu, 7 Apr 2022 20:27:36 +0200 Subject: [PATCH 07/11] cache on windows --- .github/workflows/daily-jobs.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/daily-jobs.yml b/.github/workflows/daily-jobs.yml index 1332cd3607d3e..f677980a38098 100644 --- a/.github/workflows/daily-jobs.yml +++ b/.github/workflows/daily-jobs.yml @@ -22,7 +22,7 @@ jobs: with: path: | target - key: ${{ runner.os }}-cargo-check-test-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.lock') }} + 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 @@ -41,6 +41,16 @@ jobs: 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" From 4ef4a11332eab2e64dd519a43d5abdc7b5a8a120 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois?= Date: Wed, 27 Apr 2022 13:27:08 +0200 Subject: [PATCH 08/11] adding jobs to bors --- .github/bors.toml | 2 ++ .github/workflows/{daily-jobs.yml => validation-jobs.yml} | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) rename .github/workflows/{daily-jobs.yml => validation-jobs.yml} (95%) 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/daily-jobs.yml b/.github/workflows/validation-jobs.yml similarity index 95% rename from .github/workflows/daily-jobs.yml rename to .github/workflows/validation-jobs.yml index f677980a38098..b9d03f7547ffb 100644 --- a/.github/workflows/daily-jobs.yml +++ b/.github/workflows/validation-jobs.yml @@ -1,8 +1,10 @@ -name: daily jobs +name: validation jobs on: - schedule: - - cron: "0 0 * * *" + push: + branches: + - staging + - trying env: CARGO_TERM_COLOR: always From 43735cd41991e1e8077e3a569dd8d78714cc3716 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois?= Date: Fri, 6 May 2022 23:54:08 +0200 Subject: [PATCH 09/11] remove android from common ci --- .github/workflows/ci.yml | 25 ---------------------- .github/workflows/validation-jobs.yml | 30 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8a7ee2dbf9e9f..93596f8534f85 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -156,31 +156,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 diff --git a/.github/workflows/validation-jobs.yml b/.github/workflows/validation-jobs.yml index b9d03f7547ffb..bc926d8644e3b 100644 --- a/.github/workflows/validation-jobs.yml +++ b/.github/workflows/validation-jobs.yml @@ -32,6 +32,36 @@ jobs: - 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 From 22a1e198601c49c78b36040dac8031261b6e33fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois?= Date: Fri, 6 May 2022 23:58:29 +0200 Subject: [PATCH 10/11] run all jobs on main --- .github/workflows/validation-jobs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/validation-jobs.yml b/.github/workflows/validation-jobs.yml index bc926d8644e3b..533d20b7ca804 100644 --- a/.github/workflows/validation-jobs.yml +++ b/.github/workflows/validation-jobs.yml @@ -5,6 +5,7 @@ on: branches: - staging - trying + - main env: CARGO_TERM_COLOR: always From 0223cfcc5e3bed99ecae429bfe33804beba55148 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois?= Date: Fri, 6 May 2022 23:59:10 +0200 Subject: [PATCH 11/11] build wasm after normal build --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 93596f8534f85..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