mirror of
https://github.com/maplibre/maplibre-rs.git
synced 2025-12-08 19:05:57 +00:00
Fix clippy in CI
This commit is contained in:
parent
e7e14d014d
commit
66ffdfdd02
8
.github/actions/android/action.yml
vendored
8
.github/actions/android/action.yml
vendored
@ -12,7 +12,13 @@ runs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
shell: bash
|
shell: bash
|
||||||
run: just build-android
|
run: just build-android
|
||||||
|
- name: Check x86_64
|
||||||
|
shell: bash
|
||||||
|
run: just check maplibre-android x86_64-linux-android
|
||||||
|
- name: Check aarch64
|
||||||
|
shell: bash
|
||||||
|
run: just check maplibre-android aarch64-linux-android
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: maplibre-rs.apk
|
name: maplibre-rs.apk
|
||||||
path: target/debug/apk/maplibre-rs-demo.apk
|
path: target/debug/apk/maplibre-rs-linux-demo.apk
|
||||||
|
|||||||
13
.github/actions/apple/action.yml
vendored
13
.github/actions/apple/action.yml
vendored
@ -1,5 +1,5 @@
|
|||||||
name: desktop
|
name: macOS
|
||||||
description: Build for desktop
|
description: Build for macOS
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
@ -9,9 +9,16 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: just default-toolchain
|
run: just default-toolchain
|
||||||
- uses: Swatinem/rust-cache@v1
|
- uses: Swatinem/rust-cache@v1
|
||||||
- name: Build xcframework
|
- name: Build
|
||||||
shell: bash
|
shell: bash
|
||||||
run: just xcodebuild-xcframework
|
run: just xcodebuild-xcframework
|
||||||
|
- name: Check x86_64 darwin
|
||||||
|
shell: bash
|
||||||
|
run: just check apple x86_64-apple-darwin
|
||||||
|
- name: Check aarch64 darwin
|
||||||
|
shell: bash
|
||||||
|
run: just check apple aarch64-apple-darwin
|
||||||
|
# TODO: Additional clippy checks for iOS
|
||||||
- name: Build Example
|
- name: Build Example
|
||||||
shell: bash
|
shell: bash
|
||||||
run: cd apple/xcode && xcodebuild -scheme "example (iOS)" -arch arm64 -sdk iphoneos build CODE_SIGNING_ALLOWED=NO
|
run: cd apple/xcode && xcodebuild -scheme "example (iOS)" -arch arm64 -sdk iphoneos build CODE_SIGNING_ALLOWED=NO
|
||||||
|
|||||||
17
.github/actions/benchmarks/action.yml
vendored
Normal file
17
.github/actions/benchmarks/action.yml
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
name: benchmarks
|
||||||
|
description: Run benchmarks
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- uses: extractions/setup-just@v1
|
||||||
|
- name: Install toolchain
|
||||||
|
shell: bash
|
||||||
|
run: just default-toolchain
|
||||||
|
- uses: Swatinem/rust-cache@v1
|
||||||
|
- name: Install Dependencies
|
||||||
|
shell: bash
|
||||||
|
run: sudo apt-get install -y libwayland-dev libxkbcommon-dev # Required for winit
|
||||||
|
- name: Check
|
||||||
|
shell: bash
|
||||||
|
run: just check maplibre-benchmarks x86_64-unknown-linux-gnu
|
||||||
6
.github/actions/check/action.yml
vendored
6
.github/actions/check/action.yml
vendored
@ -12,9 +12,3 @@ runs:
|
|||||||
- name: Format
|
- name: Format
|
||||||
shell: bash
|
shell: bash
|
||||||
run: just fmt-check
|
run: just fmt-check
|
||||||
- name: Install Dependencies
|
|
||||||
shell: bash
|
|
||||||
run: sudo apt-get install -y libwayland-dev libxkbcommon-dev # Required for winit
|
|
||||||
- name: Clippy
|
|
||||||
shell: bash
|
|
||||||
run: just clippy
|
|
||||||
@ -1,5 +1,5 @@
|
|||||||
name: desktop
|
name: linux-demo
|
||||||
description: Build for desktop
|
description: Build linux-demo for linux
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
@ -15,6 +15,9 @@ runs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
shell: bash
|
shell: bash
|
||||||
run: cargo build -p maplibre-demo
|
run: cargo build -p maplibre-demo
|
||||||
|
- name: Check
|
||||||
|
shell: bash
|
||||||
|
run: just check maplibre-demo x86_64-unknown-linux-gnu
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: maplibre-rs
|
name: maplibre-rs
|
||||||
3
.github/actions/webgl/action.yml
vendored
3
.github/actions/webgl/action.yml
vendored
@ -12,3 +12,6 @@ runs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
shell: bash
|
shell: bash
|
||||||
run: just webpack-webgl-production
|
run: just webpack-webgl-production
|
||||||
|
- name: Check
|
||||||
|
shell: bash
|
||||||
|
run: just check web wasm32-unknown-unknown
|
||||||
|
|||||||
3
.github/actions/webgpu/action.yml
vendored
3
.github/actions/webgpu/action.yml
vendored
@ -12,3 +12,6 @@ runs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
shell: bash
|
shell: bash
|
||||||
run: just webpack-production
|
run: just webpack-production
|
||||||
|
- name: Check
|
||||||
|
shell: bash
|
||||||
|
run: just check web wasm32-unknown-unknown
|
||||||
13
.github/workflows/on_main_push.yml
vendored
13
.github/workflows/on_main_push.yml
vendored
@ -12,11 +12,16 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: ./.github/actions/check
|
- uses: ./.github/actions/check
|
||||||
build-desktop:
|
run-benchmarks:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: ./.github/actions/desktop
|
- uses: ./.github/actions/benchmarks
|
||||||
|
build-linux-demo:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: ./.github/actions/linux-demo
|
||||||
build-android:
|
build-android:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
@ -29,7 +34,7 @@ jobs:
|
|||||||
- uses: ./.github/actions/webgpu
|
- uses: ./.github/actions/webgpu
|
||||||
- uses: ./.github/actions/deploy
|
- uses: ./.github/actions/deploy
|
||||||
with:
|
with:
|
||||||
source: web/web/dist/demo/.
|
source: web/web/dist/linux-demo/.
|
||||||
destination: webgpu
|
destination: webgpu
|
||||||
key: ${{ secrets.SSH_KEY_MAXAMMANN_ORG }}
|
key: ${{ secrets.SSH_KEY_MAXAMMANN_ORG }}
|
||||||
build-deploy-webgl:
|
build-deploy-webgl:
|
||||||
@ -39,7 +44,7 @@ jobs:
|
|||||||
- uses: ./.github/actions/webgl
|
- uses: ./.github/actions/webgl
|
||||||
- uses: ./.github/actions/deploy
|
- uses: ./.github/actions/deploy
|
||||||
with:
|
with:
|
||||||
source: web/web/dist/demo/.
|
source: web/web/dist/linux-demo/.
|
||||||
destination: webgl
|
destination: webgl
|
||||||
key: ${{ secrets.SSH_KEY_MAXAMMANN_ORG }}
|
key: ${{ secrets.SSH_KEY_MAXAMMANN_ORG }}
|
||||||
build-deploy-docs:
|
build-deploy-docs:
|
||||||
|
|||||||
9
.github/workflows/on_pull_request.yml
vendored
9
.github/workflows/on_pull_request.yml
vendored
@ -12,11 +12,16 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: ./.github/actions/check
|
- uses: ./.github/actions/check
|
||||||
build-desktop:
|
run-benchmarks:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: ./.github/actions/desktop
|
- uses: ./.github/actions/benchmarks
|
||||||
|
build-linux-demo:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: ./.github/actions/linux-demo
|
||||||
build-android:
|
build-android:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@ -9,11 +9,9 @@ publish = false
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
maplibre = { path = "../maplibre" }
|
maplibre = { path = "../maplibre" }
|
||||||
env_logger = "0.9"
|
env_logger = "0.9"
|
||||||
|
log = "0.4.16"
|
||||||
[target.'cfg(target_os = "android")'.dependencies]
|
|
||||||
ndk-glue = "0.5.0" # version is required by winit
|
ndk-glue = "0.5.0" # version is required by winit
|
||||||
jni = "0.19.0"
|
jni = "0.19.0"
|
||||||
log = "0.4.16"
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
#name = "maplibre_android" Currently not supported: https://github.com/rust-windowing/android-ndk-rs/issues/136
|
#name = "maplibre_android" Currently not supported: https://github.com/rust-windowing/android-ndk-rs/issues/136
|
||||||
|
|||||||
@ -2,9 +2,8 @@ use maplibre::window::FromWindow;
|
|||||||
use maplibre::{MapBuilder, ScheduleMethod, TokioScheduleMethod};
|
use maplibre::{MapBuilder, ScheduleMethod, TokioScheduleMethod};
|
||||||
pub use std::time::Instant;
|
pub use std::time::Instant;
|
||||||
|
|
||||||
// TODO clippy
|
#[cfg(not(any(target_os = "macos", target_os = "ios")))]
|
||||||
// #[cfg(not(any(target_os = "macos", target_os = "ios")))]
|
compile_error!("apple works only on macOS and iOS.");
|
||||||
// compile_error!("apple works only on macOS and iOS.");
|
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub fn maplibre_apple_main() {
|
pub fn maplibre_apple_main() {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "maplibre-benchmark"
|
name = "benchmarks"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = ""
|
description = ""
|
||||||
categories = []
|
categories = []
|
||||||
|
|||||||
4
justfile
4
justfile
@ -12,8 +12,8 @@ test:
|
|||||||
install-clippy:
|
install-clippy:
|
||||||
rustup component add clippy
|
rustup component add clippy
|
||||||
|
|
||||||
clippy: install-clippy
|
check PROJECT ARCH: install-clippy
|
||||||
cargo clippy --all-targets --all-features --no-deps
|
cargo clippy --no-deps -p {{PROJECT}} --target {{ARCH}}
|
||||||
|
|
||||||
install-rustfmt:
|
install-rustfmt:
|
||||||
rustup component add rustfmt
|
rustup component add rustfmt
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user