From f9a975e6e519c070e6d7f538b1d1c90c5c66c0d8 Mon Sep 17 00:00:00 2001 From: John Nunley Date: Mon, 4 Sep 2023 13:36:12 -0700 Subject: [PATCH 01/13] Use xbuild instead of cargo apk in the CI In addition to cargo apk being deprecated, xbuild also has support for ios. Signed-off-by: John Nunley --- .github/workflows/ci.yml | 34 +++++++++++++++------------------- Cargo.toml | 1 + xbuild-target/Cargo.toml | 10 ++++++++++ xbuild-target/README.md | 4 ++++ xbuild-target/src/main.rs | 6 ++++++ 5 files changed, 36 insertions(+), 19 deletions(-) create mode 100644 xbuild-target/Cargo.toml create mode 100644 xbuild-target/README.md create mode 100644 xbuild-target/src/main.rs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2dab89f10e..d33f42a855 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: - { name: 'Linux 64bit', target: x86_64-unknown-linux-gnu, os: ubuntu-latest, } - { name: 'X11', target: x86_64-unknown-linux-gnu, os: ubuntu-latest, options: '--no-default-features --features=x11' } - { name: 'Wayland', target: x86_64-unknown-linux-gnu, os: ubuntu-latest, options: '--no-default-features --features=wayland,wayland-dlopen' } - - { name: 'Android', target: aarch64-linux-android, os: ubuntu-latest, options: '--package=winit --features=android-native-activity', cmd: 'apk --' } + - { name: 'Android', target: aarch64-linux-android, os: ubuntu-latest, options: '--features=android-native-activity' } - { name: 'Redox OS', target: x86_64-unknown-redox, os: ubuntu-latest, } - { name: 'macOS', target: x86_64-apple-darwin, os: macos-latest, } - { name: 'iOS x86_64', target: x86_64-apple-ios, os: macos-latest, } @@ -87,23 +87,11 @@ jobs: if: (matrix.platform.os == 'ubuntu-latest') && contains(matrix.platform.target, 'i686') run: sudo apt-get update && sudo apt-get install gcc-multilib - - name: Cache cargo-apk - if: contains(matrix.platform.target, 'android') - id: cargo-apk-cache - uses: actions/cache@v3 - with: - path: ~/.cargo/bin/cargo-apk - # Change this key if we update the required cargo-apk version - key: cargo-apk-v0-9-7 - - - uses: dtolnay/rust-toolchain@master - if: contains(matrix.platform.target, 'android') && (steps.cargo-apk-cache.outputs.cache-hit != 'true') + - name: Install xbuild + uses: taiki-e/install-action + if: contains(matrix.platform.target, 'android') || contains(matrix.platform.target, 'ios') with: - toolchain: stable - - - name: Install cargo-apk - if: contains(matrix.platform.target, 'android') && (steps.cargo-apk-cache.outputs.cache-hit != 'true') - run: cargo install cargo-apk --version=^0.9.7 --locked + tool: xbuild@0.2.0 - uses: dtolnay/rust-toolchain@master with: @@ -114,8 +102,16 @@ jobs: - name: Check documentation run: cargo doc --no-deps $OPTIONS --document-private-items - - name: Build crate - run: cargo $CMD build $OPTIONS + - name: Build crate + run: cargo build $OPTIONS + + - name: Package crate for Android + if: contains(matrix.platform.target, 'android') + run: x build -p xbuild-target --platform android --arch arm64 + + - name: Package crate for iOS + if: contains(matrix.platform.target, 'ios') + run: x buikd -p xbuild-target --plaform ios --arch arm64 - name: Build tests if: > diff --git a/Cargo.toml b/Cargo.toml index 9ee521722e..8645e5c322 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -213,4 +213,5 @@ web-sys = { version = "0.3.22", features = ['CanvasRenderingContext2d'] } [workspace] members = [ "run-wasm", + "xbuild-target" ] diff --git a/xbuild-target/Cargo.toml b/xbuild-target/Cargo.toml new file mode 100644 index 0000000000..3ac57fa162 --- /dev/null +++ b/xbuild-target/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "xbuild-target" +version = "0.1.0" +edition = "2021" + +[dependencies.winit] +version = "0.29.1-beta" +path = ".." +features = ["android-game-activity"] + diff --git a/xbuild-target/README.md b/xbuild-target/README.md new file mode 100644 index 0000000000..5d41179eb3 --- /dev/null +++ b/xbuild-target/README.md @@ -0,0 +1,4 @@ +# xbuild-target + +This is a crate that can be built via `x build` in order to simplify CI testing. + diff --git a/xbuild-target/src/main.rs b/xbuild-target/src/main.rs new file mode 100644 index 0000000000..8fe5d3ea15 --- /dev/null +++ b/xbuild-target/src/main.rs @@ -0,0 +1,6 @@ +fn main() { + winit::event_loop::EventLoop::new() + .unwrap() + .run(|_, _, _| todo!()) + .ok(); +} From e30f112516f47e09af561045680aaf272f5fe996 Mon Sep 17 00:00:00 2001 From: John Nunley Date: Mon, 4 Sep 2023 21:06:13 -0700 Subject: [PATCH 02/13] Fix malformed install-action call Signed-off-by: John Nunley --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d33f42a855..a7ac9407bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,7 +88,7 @@ jobs: run: sudo apt-get update && sudo apt-get install gcc-multilib - name: Install xbuild - uses: taiki-e/install-action + uses: taiki-e/install-action@v2 if: contains(matrix.platform.target, 'android') || contains(matrix.platform.target, 'ios') with: tool: xbuild@0.2.0 From 5cfdb3fc424c88bf8c0eba2ba486a0bbeed5a14a Mon Sep 17 00:00:00 2001 From: John Nunley Date: Mon, 4 Sep 2023 21:11:34 -0700 Subject: [PATCH 03/13] Typo! Signed-off-by: John Nunley --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a7ac9407bc..a30a2c2541 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -111,7 +111,7 @@ jobs: - name: Package crate for iOS if: contains(matrix.platform.target, 'ios') - run: x buikd -p xbuild-target --plaform ios --arch arm64 + run: x build -p xbuild-target --plaform ios --arch arm64 - name: Build tests if: > From fe893e66905c6325aa731e2a4e60f23cd9e6e5f2 Mon Sep 17 00:00:00 2001 From: John Nunley Date: Wed, 6 Sep 2023 20:36:29 -0700 Subject: [PATCH 04/13] Empty commit to re-run CI Signed-off-by: John Nunley From 8671481db499843c31d0c8a83cb9175a0f254470 Mon Sep 17 00:00:00 2001 From: John Nunley Date: Sun, 10 Sep 2023 13:48:22 -0700 Subject: [PATCH 05/13] Once more unto the breach! Signed-off-by: John Nunley --- .github/workflows/ci.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a30a2c2541..8b662b4edc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -93,11 +93,9 @@ jobs: with: tool: xbuild@0.2.0 - - uses: dtolnay/rust-toolchain@master - with: - toolchain: ${{ matrix.toolchain }}${{ matrix.platform.host }} - targets: ${{ matrix.platform.target }} - components: clippy + - name: Install LLVM tools for Android + if: contains(matrix.platform.target, 'android') + run: sudo apt-get install llvm lld lldb clang clang++ - name: Check documentation run: cargo doc --no-deps $OPTIONS --document-private-items @@ -111,7 +109,7 @@ jobs: - name: Package crate for iOS if: contains(matrix.platform.target, 'ios') - run: x build -p xbuild-target --plaform ios --arch arm64 + run: x build -p xbuild-target --platform ios --arch arm64 - name: Build tests if: > From 0c4e725692c81dc3e0fbccbeeb0892ccaa1f8816 Mon Sep 17 00:00:00 2001 From: John Nunley Date: Sun, 10 Sep 2023 13:54:46 -0700 Subject: [PATCH 06/13] Fix compile error in xbuild-target Signed-off-by: John Nunley --- .github/workflows/ci.yml | 2 +- xbuild-target/src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8b662b4edc..a912e790d6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -95,7 +95,7 @@ jobs: - name: Install LLVM tools for Android if: contains(matrix.platform.target, 'android') - run: sudo apt-get install llvm lld lldb clang clang++ + run: sudo apt-get install lld llvm - name: Check documentation run: cargo doc --no-deps $OPTIONS --document-private-items diff --git a/xbuild-target/src/main.rs b/xbuild-target/src/main.rs index 8fe5d3ea15..91b390c63c 100644 --- a/xbuild-target/src/main.rs +++ b/xbuild-target/src/main.rs @@ -1,6 +1,6 @@ fn main() { winit::event_loop::EventLoop::new() .unwrap() - .run(|_, _, _| todo!()) + .run(|_, _| todo!()) .ok(); } From af32c5c2987a519102c178e7aa9dc60a07891181 Mon Sep 17 00:00:00 2001 From: John Nunley Date: Sun, 10 Sep 2023 14:00:32 -0700 Subject: [PATCH 07/13] Don't use CMD subselection on Android Signed-off-by: John Nunley --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a912e790d6..84e6ec28c9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -115,7 +115,7 @@ jobs: if: > !contains(matrix.platform.target, 'redox') && matrix.toolchain != '1.65.0' - run: cargo $CMD test --no-run $OPTIONS + run: cargo test --no-run $OPTIONS - name: Run tests if: > From 023ab591b518f1ccfaa1ee00cea237e1438c7502 Mon Sep 17 00:00:00 2001 From: John Nunley Date: Sun, 10 Sep 2023 14:08:57 -0700 Subject: [PATCH 08/13] Disable test builds on Android Signed-off-by: John Nunley --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 84e6ec28c9..9c1e613fdd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -114,6 +114,7 @@ jobs: - name: Build tests if: > !contains(matrix.platform.target, 'redox') && + !contains(matrix.platform.target, 'android') && matrix.toolchain != '1.65.0' run: cargo test --no-run $OPTIONS From 999a1f8733f1143787d6fde02041c1775300ba56 Mon Sep 17 00:00:00 2001 From: John Nunley Date: Sun, 10 Sep 2023 14:13:51 -0700 Subject: [PATCH 09/13] Hacky way to exclude 1.65.0 on Android Signed-off-by: John Nunley --- .github/workflows/ci.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9c1e613fdd..5ea20e51c6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,19 +35,20 @@ jobs: - { name: 'Linux 64bit', target: x86_64-unknown-linux-gnu, os: ubuntu-latest, } - { name: 'X11', target: x86_64-unknown-linux-gnu, os: ubuntu-latest, options: '--no-default-features --features=x11' } - { name: 'Wayland', target: x86_64-unknown-linux-gnu, os: ubuntu-latest, options: '--no-default-features --features=wayland,wayland-dlopen' } - - { name: 'Android', target: aarch64-linux-android, os: ubuntu-latest, options: '--features=android-native-activity' } - { name: 'Redox OS', target: x86_64-unknown-redox, os: ubuntu-latest, } - { name: 'macOS', target: x86_64-apple-darwin, os: macos-latest, } - { name: 'iOS x86_64', target: x86_64-apple-ios, os: macos-latest, } - { name: 'iOS Aarch64', target: aarch64-apple-ios, os: macos-latest, } - { name: 'web', target: wasm32-unknown-unknown, os: ubuntu-latest, } - exclude: - # Android is tested on stable-3 - - toolchain: '1.65.0' - platform: { name: 'Android', target: aarch64-linux-android, os: ubuntu-latest, options: '--package=winit --features=android-native-activity', cmd: 'apk --' } include: + # Android is tested on stable-3 - toolchain: '1.69.0' - platform: { name: 'Android', target: aarch64-linux-android, os: ubuntu-latest, options: '--package=winit --features=android-native-activity', cmd: 'apk --' } + platform: { name: 'Android', target: aarch64-linux-android, os: ubuntu-latest, options: '--package=winit --features=android-native-activity' } + - toolchain: 'stable' + platform: { name: 'Android', target: aarch64-linux-android, os: ubuntu-latest, options: '--package=winit --features=android-native-activity' } + - toolchain: 'nightly' + platform: { name: 'Android', target: aarch64-linux-android, os: ubuntu-latest, options: '--package=winit --features=android-native-activity' } + env: # Set more verbose terminal output @@ -93,6 +94,12 @@ jobs: with: tool: xbuild@0.2.0 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ matrix.toolchain }}${{ matrix.platform.host }} + targets: ${{ matrix.platform.target }} + components: clippy + - name: Install LLVM tools for Android if: contains(matrix.platform.target, 'android') run: sudo apt-get install lld llvm @@ -134,6 +141,7 @@ jobs: - name: Build tests with serde enabled if: > !contains(matrix.platform.target, 'redox') && + !contains(matrix.platform.target, 'android') && matrix.toolchain != '1.65.0' run: cargo $CMD test --no-run $OPTIONS --features serde From 49a315870ee7408c90f507b344ff498603015fd4 Mon Sep 17 00:00:00 2001 From: John Nunley Date: Sun, 8 Oct 2023 09:38:51 -0700 Subject: [PATCH 10/13] Review comments Signed-off-by: John Nunley --- .github/workflows/ci.yml | 17 ++++++++--------- Cargo.toml | 3 ++- .../Cargo.toml | 6 ++++-- android-xbuild-target/README.md | 3 +++ android-xbuild-target/src/lib.rs | 14 ++++++++++++++ ios-xbuild-target/Cargo.toml | 8 ++++++++ {xbuild-target => ios-xbuild-target}/README.md | 3 +-- .../src/main.rs | 3 ++- 8 files changed, 42 insertions(+), 15 deletions(-) rename {xbuild-target => android-xbuild-target}/Cargo.toml (69%) create mode 100644 android-xbuild-target/README.md create mode 100644 android-xbuild-target/src/lib.rs create mode 100644 ios-xbuild-target/Cargo.toml rename {xbuild-target => ios-xbuild-target}/README.md (80%) rename {xbuild-target => ios-xbuild-target}/src/main.rs (54%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5ea20e51c6..8d84ea466b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/Cargo.toml b/Cargo.toml index 8645e5c322..2d9d7d429a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -212,6 +212,7 @@ web-sys = { version = "0.3.22", features = ['CanvasRenderingContext2d'] } [workspace] members = [ + "android-xbuild-target", + "ios-xbuild-target", "run-wasm", - "xbuild-target" ] diff --git a/xbuild-target/Cargo.toml b/android-xbuild-target/Cargo.toml similarity index 69% rename from xbuild-target/Cargo.toml rename to android-xbuild-target/Cargo.toml index 3ac57fa162..dfcab59fc7 100644 --- a/xbuild-target/Cargo.toml +++ b/android-xbuild-target/Cargo.toml @@ -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"] - diff --git a/android-xbuild-target/README.md b/android-xbuild-target/README.md new file mode 100644 index 0000000000..d0dfd8f36e --- /dev/null +++ b/android-xbuild-target/README.md @@ -0,0 +1,3 @@ +# android-xbuild-target + +This is a crate that can be built via `x build` in order to simplify CI testing. diff --git a/android-xbuild-target/src/lib.rs b/android-xbuild-target/src/lib.rs new file mode 100644 index 0000000000..ad211382e0 --- /dev/null +++ b/android-xbuild-target/src/lib.rs @@ -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(); +} diff --git a/ios-xbuild-target/Cargo.toml b/ios-xbuild-target/Cargo.toml new file mode 100644 index 0000000000..0bee9d1380 --- /dev/null +++ b/ios-xbuild-target/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "ios-xbuild-target" +version = "0.1.0" +edition = "2021" + +[dependencies.winit] +version = "0.29.1-beta" +path = ".." diff --git a/xbuild-target/README.md b/ios-xbuild-target/README.md similarity index 80% rename from xbuild-target/README.md rename to ios-xbuild-target/README.md index 5d41179eb3..6284d0e5a9 100644 --- a/xbuild-target/README.md +++ b/ios-xbuild-target/README.md @@ -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. - diff --git a/xbuild-target/src/main.rs b/ios-xbuild-target/src/main.rs similarity index 54% rename from xbuild-target/src/main.rs rename to ios-xbuild-target/src/main.rs index 91b390c63c..a04cad9acb 100644 --- a/xbuild-target/src/main.rs +++ b/ios-xbuild-target/src/main.rs @@ -1,5 +1,6 @@ fn main() { - winit::event_loop::EventLoop::new() + winit::event_loop::EventLoopBuilder::new() + .build() .unwrap() .run(|_, _| todo!()) .ok(); From 73348f49d7822e9a26633df0689d5c1bfe842954 Mon Sep 17 00:00:00 2001 From: John Nunley Date: Sun, 8 Oct 2023 09:48:46 -0700 Subject: [PATCH 11/13] fmt Signed-off-by: John Nunley --- android-xbuild-target/src/lib.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/android-xbuild-target/src/lib.rs b/android-xbuild-target/src/lib.rs index ad211382e0..0b8d6ca32a 100644 --- a/android-xbuild-target/src/lib.rs +++ b/android-xbuild-target/src/lib.rs @@ -1,7 +1,4 @@ -use winit::platform::android::{ - activity::AndroidApp, - EventLoopBuilderExtAndroid -}; +use winit::platform::android::{activity::AndroidApp, EventLoopBuilderExtAndroid}; #[no_mangle] fn android_main(app: AndroidApp) { From 9382b7238cb6818510fc4d1fe80fffa3f844e97b Mon Sep 17 00:00:00 2001 From: John Nunley Date: Fri, 13 Oct 2023 19:43:03 -0700 Subject: [PATCH 12/13] Eyepatch for the android linker error Signed-off-by: John Nunley --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d84ea466b..b897aa88ad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -111,7 +111,8 @@ jobs: - name: Build and package crate for Android if: contains(matrix.platform.target, 'android') - run: x build -p android-xbuild-target --platform android --arch arm64 + # TODO: Figure out why this build fails on Github Actions + run: x build -p ios-xbuild-target --platform android --arch arm64 - name: Build and package crate for iOS if: contains(matrix.platform.target, 'ios') From d3657449abd4247447e6304d5524bb956c1238b5 Mon Sep 17 00:00:00 2001 From: John Nunley Date: Sat, 14 Oct 2023 21:36:54 -0700 Subject: [PATCH 13/13] Review comments Signed-off-by: John Nunley --- .github/workflows/ci.yml | 3 +-- Cargo.toml | 4 ++-- android-xbuild-target/README.md | 3 --- ios-xbuild-target/README.md | 3 --- xbuild/README.md | 3 +++ {android-xbuild-target => xbuild/android-target}/Cargo.toml | 5 +++-- {android-xbuild-target => xbuild/android-target}/src/lib.rs | 0 {ios-xbuild-target => xbuild/ios-target}/Cargo.toml | 3 ++- {ios-xbuild-target => xbuild/ios-target}/src/main.rs | 0 9 files changed, 11 insertions(+), 13 deletions(-) delete mode 100644 android-xbuild-target/README.md delete mode 100644 ios-xbuild-target/README.md create mode 100644 xbuild/README.md rename {android-xbuild-target => xbuild/android-target}/Cargo.toml (68%) rename {android-xbuild-target => xbuild/android-target}/src/lib.rs (100%) rename {ios-xbuild-target => xbuild/ios-target}/Cargo.toml (79%) rename {ios-xbuild-target => xbuild/ios-target}/src/main.rs (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b897aa88ad..8d84ea466b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -111,8 +111,7 @@ jobs: - name: Build and package crate for Android if: contains(matrix.platform.target, 'android') - # TODO: Figure out why this build fails on Github Actions - run: x build -p ios-xbuild-target --platform android --arch arm64 + run: x build -p android-xbuild-target --platform android --arch arm64 - name: Build and package crate for iOS if: contains(matrix.platform.target, 'ios') diff --git a/Cargo.toml b/Cargo.toml index 2d9d7d429a..d159020b1f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -212,7 +212,7 @@ web-sys = { version = "0.3.22", features = ['CanvasRenderingContext2d'] } [workspace] members = [ - "android-xbuild-target", - "ios-xbuild-target", + "xbuild/android-target", + "xbuild/ios-target", "run-wasm", ] diff --git a/android-xbuild-target/README.md b/android-xbuild-target/README.md deleted file mode 100644 index d0dfd8f36e..0000000000 --- a/android-xbuild-target/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# android-xbuild-target - -This is a crate that can be built via `x build` in order to simplify CI testing. diff --git a/ios-xbuild-target/README.md b/ios-xbuild-target/README.md deleted file mode 100644 index 6284d0e5a9..0000000000 --- a/ios-xbuild-target/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# ios-xbuild-target - -This is a crate that can be built via `x build` in order to simplify CI testing. diff --git a/xbuild/README.md b/xbuild/README.md new file mode 100644 index 0000000000..f5001d1548 --- /dev/null +++ b/xbuild/README.md @@ -0,0 +1,3 @@ +# xbuild-target + +These are crates that can be built via `x build` in order to simplify CI testing. diff --git a/android-xbuild-target/Cargo.toml b/xbuild/android-target/Cargo.toml similarity index 68% rename from android-xbuild-target/Cargo.toml rename to xbuild/android-target/Cargo.toml index dfcab59fc7..17444af2d2 100644 --- a/android-xbuild-target/Cargo.toml +++ b/xbuild/android-target/Cargo.toml @@ -2,11 +2,12 @@ name = "android-xbuild-target" version = "0.1.0" edition = "2021" +publish = false [lib] crate_type = ["cdylib"] [dependencies.winit] version = "0.29.1-beta" -path = ".." -features = ["android-game-activity"] +path = "../.." +features = ["android-native-activity"] diff --git a/android-xbuild-target/src/lib.rs b/xbuild/android-target/src/lib.rs similarity index 100% rename from android-xbuild-target/src/lib.rs rename to xbuild/android-target/src/lib.rs diff --git a/ios-xbuild-target/Cargo.toml b/xbuild/ios-target/Cargo.toml similarity index 79% rename from ios-xbuild-target/Cargo.toml rename to xbuild/ios-target/Cargo.toml index 0bee9d1380..7dcebb4a2f 100644 --- a/ios-xbuild-target/Cargo.toml +++ b/xbuild/ios-target/Cargo.toml @@ -2,7 +2,8 @@ name = "ios-xbuild-target" version = "0.1.0" edition = "2021" +publish = false [dependencies.winit] version = "0.29.1-beta" -path = ".." +path = "../.." diff --git a/ios-xbuild-target/src/main.rs b/xbuild/ios-target/src/main.rs similarity index 100% rename from ios-xbuild-target/src/main.rs rename to xbuild/ios-target/src/main.rs