diff --git a/.github/actions/check/action.yml b/.github/actions/check/action.yml index 68ae9670..b4d98ae6 100644 --- a/.github/actions/check/action.yml +++ b/.github/actions/check/action.yml @@ -4,18 +4,15 @@ description: Check runs: using: "composite" steps: - - name: Setup + - name: Install just shell: bash - run: | - rustup component add rustfmt + run: cargo install just - name: Format shell: bash - run: cargo fmt --all -- --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: | - rustup component add clippy - cargo clippy --all-targets --all-features \ No newline at end of file + run: just clippy \ No newline at end of file diff --git a/.github/actions/desktop/action.yml b/.github/actions/desktop/action.yml index 4217d2b5..861e69a8 100644 --- a/.github/actions/desktop/action.yml +++ b/.github/actions/desktop/action.yml @@ -19,8 +19,8 @@ runs: run: sudo apt-get install -y libwayland-dev libxkbcommon-dev # Required for winit - name: Build shell: bash - run: cargo build --example desktop + run: cargo build -p maplibre-example - uses: actions/upload-artifact@v2 with: name: maplibre-rs - path: target/debug/maplibre \ No newline at end of file + path: target/x86_64-unknown-linux-gnu/debug/maplibre-example \ No newline at end of file diff --git a/justfile b/justfile index 7f2c9e0b..4e81d1dd 100644 --- a/justfile +++ b/justfile @@ -7,55 +7,68 @@ export RUSTUP_TOOLCHAIN := "nightly-2022-04-04-x86_64-unknown-linux-gnu" test: cargo test -clippy: +install-clippy: + rustup component add clippy + +clippy: install-clippy cargo clippy --all-targets --all-features -fmt: +install-rustfmt: + rustup component add rustfmt + +fmt: install-rustfmt cargo fmt --all -- +fmt-check: install-rustfmt + cargo fmt --all -- --check + nightly-toolchain: rustup install $RUSTUP_TOOLCHAIN rustup component add rust-src --toolchain $RUSTUP_TOOLCHAIN webpack-webgl-production: nightly-toolchain - cd web && npm install && npm run webgl-production-build + cd maplibre-web/web && npm install && npm run webgl-production-build webpack-production: nightly-toolchain - cd web && npm install && npm run production-build + cd maplibre-web/web && npm install && npm run production-build -wasm-pack-webgl: nightly-toolchain - ./wasm-pack-v0.10.1-x86_64-unknown-linux-musl/wasm-pack build . \ - --release --target web --out-dir web/dist/maplibre-rs -- \ - --features "web-webgl" -Z build-std=std,panic_abort - -wasm-pack: nightly-toolchain - ./wasm-pack-v0.10.1-x86_64-unknown-linux-musl/wasm-pack build . \ - --release --target web --out-dir web/dist/maplibre-rs -- \ - -Z build-std=std,panic_abort - -build-web-webgl: nightly-toolchain - cargo build --features web-webgl --target wasm32-unknown-unknown -Z build-std=std,panic_abort - -build-web: nightly-toolchain - cargo build --features "" --target wasm32-unknown-unknown -Z build-std=std,panic_abort - -wasm-bindgen: - cargo install wasm-bindgen-cli - # TODO: Untested: --reference-types - wasm-bindgen --target web --out-dir web/dist/maplibre-rs-plain-bindgen target/wasm32-unknown-unknown/debug/maplibre.wasm - -build-wasm-bindgen: build-web wasm-bindgen - -build-wasm-bindgen-webgpu: build-web wasm-bindgen +# TODO +# wasm-pack-webgl: nightly-toolchain +# ./wasm-pack-v0.10.1-x86_64-unknown-linux-musl/wasm-pack build . \ +# --release --target web --out-dir web/dist/maplibre-rs -- \ +# --features "web-webgl" -Z build-std=std,panic_abort +# +# wasm-pack: nightly-toolchain +# ./wasm-pack-v0.10.1-x86_64-unknown-linux-musl/wasm-pack build . \ +# --release --target web --out-dir web/dist/maplibre-rs -- \ +# -Z build-std=std,panic_abort +# +# build-web-webgl: nightly-toolchain +# cargo build --features web-webgl --target wasm32-unknown-unknown -Z build-std=std,panic_abort +# +# build-web: nightly-toolchain +# cargo build --features "" --target wasm32-unknown-unknown -Z build-std=std,panic_abort +# +# wasm-bindgen: +# cargo install wasm-bindgen-cli +# # TODO: Untested: --reference-types +# wasm-bindgen --target web --out-dir web/dist/maplibre-rs-plain-bindgen target/wasm32-unknown-unknown/debug/maplibre.wasm +# +# build-wasm-bindgen: build-web wasm-bindgen +# +# build-wasm-bindgen-webgpu: build-web wasm-bindgen +# TODO +#profile-bench: +# cargo flamegraph --bench render -- --bench install-cargo-apk: cargo install cargo-apk run-apk: nightly-toolchain install-cargo-apk - cargo apk run --lib -Zbuild-std + cargo apk run -p maplibre-android --lib -Zbuild-std build-apk: nightly-toolchain install-cargo-apk - cargo apk build --lib -Zbuild-std + cargo apk build -p maplibre-android --lib -Zbuild-std # language=bash print-android-env: @@ -63,11 +76,6 @@ print-android-env: echo "ANDROID_SDK_ROOT: $ANDROID_SDK_ROOT" echo "ANDROID_NDK_ROOT: $ANDROID_NDK_ROOT" - -# FIXME -profile-bench: - cargo flamegraph --bench render -- --bench - # language=bash extract-tiles: #!/usr/bin/env bash