Review comments

Signed-off-by: John Nunley <dev@notgull.net>
This commit is contained in:
John Nunley
2023-10-08 09:38:51 -07:00
parent 999a1f8733
commit 49a315870e
8 changed files with 42 additions and 15 deletions

View File

@@ -60,7 +60,6 @@ jobs:
RUSTDOCFLAGS: '--deny=warnings'
OPTIONS: --target=${{ matrix.platform.target }} ${{ matrix.platform.options }}
CMD: ${{ matrix.platform.cmd }}
steps:
- uses: actions/checkout@v3
@@ -102,7 +101,7 @@ jobs:
- name: Install LLVM tools for Android
if: contains(matrix.platform.target, 'android')
run: sudo apt-get install lld llvm
run: sudo apt-get update && sudo apt-get install lld llvm
- name: Check documentation
run: cargo doc --no-deps $OPTIONS --document-private-items
@@ -110,13 +109,13 @@ jobs:
- name: Build crate
run: cargo build $OPTIONS
- name: Package crate for Android
- name: Build and package crate for Android
if: contains(matrix.platform.target, 'android')
run: x build -p xbuild-target --platform android --arch arm64
run: x build -p android-xbuild-target --platform android --arch arm64
- name: Package crate for iOS
- name: Build and package crate for iOS
if: contains(matrix.platform.target, 'ios')
run: x build -p xbuild-target --platform ios --arch arm64
run: x build -p ios-xbuild-target --platform ios --arch arm64
- name: Build tests
if: >
@@ -132,7 +131,7 @@ jobs:
!contains(matrix.platform.target, 'wasm32') &&
!contains(matrix.platform.target, 'redox') &&
matrix.toolchain != '1.65.0'
run: cargo $CMD test $OPTIONS
run: cargo test $OPTIONS
- name: Lint with clippy
if: (matrix.toolchain == 'stable') && !contains(matrix.platform.options, '--no-default-features')
@@ -143,7 +142,7 @@ jobs:
!contains(matrix.platform.target, 'redox') &&
!contains(matrix.platform.target, 'android') &&
matrix.toolchain != '1.65.0'
run: cargo $CMD test --no-run $OPTIONS --features serde
run: cargo test --no-run $OPTIONS --features serde
- name: Run tests with serde enabled
if: >
@@ -152,7 +151,7 @@ jobs:
!contains(matrix.platform.target, 'wasm32') &&
!contains(matrix.platform.target, 'redox') &&
matrix.toolchain != '1.65.0'
run: cargo $CMD test $OPTIONS --features serde
run: cargo test $OPTIONS --features serde
# See restore step above
- name: Save cache of cargo folder

View File

@@ -212,6 +212,7 @@ web-sys = { version = "0.3.22", features = ['CanvasRenderingContext2d'] }
[workspace]
members = [
"android-xbuild-target",
"ios-xbuild-target",
"run-wasm",
"xbuild-target"
]

View File

@@ -1,10 +1,12 @@
[package]
name = "xbuild-target"
name = "android-xbuild-target"
version = "0.1.0"
edition = "2021"
[lib]
crate_type = ["cdylib"]
[dependencies.winit]
version = "0.29.1-beta"
path = ".."
features = ["android-game-activity"]

View File

@@ -0,0 +1,3 @@
# android-xbuild-target
This is a crate that can be built via `x build` in order to simplify CI testing.

View File

@@ -0,0 +1,14 @@
use winit::platform::android::{
activity::AndroidApp,
EventLoopBuilderExtAndroid
};
#[no_mangle]
fn android_main(app: AndroidApp) {
winit::event_loop::EventLoopBuilder::new()
.with_android_app(app)
.build()
.unwrap()
.run(|_, _| todo!())
.ok();
}

View File

@@ -0,0 +1,8 @@
[package]
name = "ios-xbuild-target"
version = "0.1.0"
edition = "2021"
[dependencies.winit]
version = "0.29.1-beta"
path = ".."

View File

@@ -1,4 +1,3 @@
# xbuild-target
# ios-xbuild-target
This is a crate that can be built via `x build` in order to simplify CI testing.

View File

@@ -1,5 +1,6 @@
fn main() {
winit::event_loop::EventLoop::new()
winit::event_loop::EventLoopBuilder::new()
.build()
.unwrap()
.run(|_, _| todo!())
.ok();