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
|
||||
shell: bash
|
||||
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
|
||||
with:
|
||||
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
|
||||
description: Build for desktop
|
||||
name: macOS
|
||||
description: Build for macOS
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
@ -9,9 +9,16 @@ runs:
|
||||
shell: bash
|
||||
run: just default-toolchain
|
||||
- uses: Swatinem/rust-cache@v1
|
||||
- name: Build xcframework
|
||||
- name: Build
|
||||
shell: bash
|
||||
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
|
||||
shell: bash
|
||||
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
|
||||
shell: bash
|
||||
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
|
||||
description: Build for desktop
|
||||
name: linux-demo
|
||||
description: Build linux-demo for linux
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
@ -15,6 +15,9 @@ runs:
|
||||
- name: Build
|
||||
shell: bash
|
||||
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
|
||||
with:
|
||||
name: maplibre-rs
|
||||
3
.github/actions/webgl/action.yml
vendored
3
.github/actions/webgl/action.yml
vendored
@ -12,3 +12,6 @@ runs:
|
||||
- name: Build
|
||||
shell: bash
|
||||
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
|
||||
shell: bash
|
||||
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:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./.github/actions/check
|
||||
build-desktop:
|
||||
run-benchmarks:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- 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:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
@ -29,7 +34,7 @@ jobs:
|
||||
- uses: ./.github/actions/webgpu
|
||||
- uses: ./.github/actions/deploy
|
||||
with:
|
||||
source: web/web/dist/demo/.
|
||||
source: web/web/dist/linux-demo/.
|
||||
destination: webgpu
|
||||
key: ${{ secrets.SSH_KEY_MAXAMMANN_ORG }}
|
||||
build-deploy-webgl:
|
||||
@ -39,7 +44,7 @@ jobs:
|
||||
- uses: ./.github/actions/webgl
|
||||
- uses: ./.github/actions/deploy
|
||||
with:
|
||||
source: web/web/dist/demo/.
|
||||
source: web/web/dist/linux-demo/.
|
||||
destination: webgl
|
||||
key: ${{ secrets.SSH_KEY_MAXAMMANN_ORG }}
|
||||
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:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./.github/actions/check
|
||||
build-desktop:
|
||||
run-benchmarks:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- 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:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
|
||||
@ -9,11 +9,9 @@ publish = false
|
||||
[dependencies]
|
||||
maplibre = { path = "../maplibre" }
|
||||
env_logger = "0.9"
|
||||
|
||||
[target.'cfg(target_os = "android")'.dependencies]
|
||||
log = "0.4.16"
|
||||
ndk-glue = "0.5.0" # version is required by winit
|
||||
jni = "0.19.0"
|
||||
log = "0.4.16"
|
||||
|
||||
[lib]
|
||||
#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};
|
||||
pub use std::time::Instant;
|
||||
|
||||
// TODO clippy
|
||||
// #[cfg(not(any(target_os = "macos", target_os = "ios")))]
|
||||
// compile_error!("apple works only on macOS and iOS.");
|
||||
#[cfg(not(any(target_os = "macos", target_os = "ios")))]
|
||||
compile_error!("apple works only on macOS and iOS.");
|
||||
|
||||
#[no_mangle]
|
||||
pub fn maplibre_apple_main() {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "maplibre-benchmark"
|
||||
name = "benchmarks"
|
||||
version = "0.1.0"
|
||||
description = ""
|
||||
categories = []
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user