mirror of
https://github.com/maplibre/maplibre-rs.git
synced 2025-12-08 19:05:57 +00:00
Fix web pipeline
This commit is contained in:
parent
0b820ab610
commit
31fa4ed421
15
.github/workflows/build-deploy-docs.yml
vendored
15
.github/workflows/build-deploy-docs.yml
vendored
@ -10,13 +10,10 @@ on:
|
||||
required: true
|
||||
type: boolean
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
RUST_BACKTRACE: 1
|
||||
|
||||
jobs:
|
||||
build-docs:
|
||||
name: Build documentation
|
||||
name: Build
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@ -40,15 +37,15 @@ jobs:
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: api-docs
|
||||
path: target/doc
|
||||
path: target/doc/
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: book
|
||||
path: docs/book
|
||||
path: docs/book/
|
||||
deploy-docs:
|
||||
needs: build-docs
|
||||
if: inputs.deploy
|
||||
name: Deploy documentation
|
||||
name: Deploy
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/download-artifact@v2
|
||||
@ -59,11 +56,11 @@ jobs:
|
||||
name: book
|
||||
- uses: ./.github/actions/deploy
|
||||
with:
|
||||
source: target/doc/.
|
||||
source: .
|
||||
destination: api-docs
|
||||
key: ${{ secrets.SSH_KEY_MAXAMMANN_ORG }}
|
||||
- uses: ./.github/actions/deploy
|
||||
with:
|
||||
source: docs/book/.
|
||||
source: .
|
||||
destination: docs
|
||||
key: ${{ secrets.SSH_KEY_MAXAMMANN_ORG }}
|
||||
6
.github/workflows/demo-linux.yml
vendored
6
.github/workflows/demo-linux.yml
vendored
@ -3,13 +3,9 @@ name: Build demo for Linux
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
RUST_BACKTRACE: 1
|
||||
|
||||
jobs:
|
||||
demo-linux:
|
||||
name: Build demo for Linux
|
||||
name: Build
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
6
.github/workflows/demo-macos.yml
vendored
6
.github/workflows/demo-macos.yml
vendored
@ -3,13 +3,9 @@ name: Build demo for macOS
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
RUST_BACKTRACE: 1
|
||||
|
||||
jobs:
|
||||
demo-macos:
|
||||
name: Build demo for macOS
|
||||
name: Build
|
||||
runs-on: macos-11
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
6
.github/workflows/demo-windows.yml
vendored
6
.github/workflows/demo-windows.yml
vendored
@ -3,13 +3,9 @@ name: Build demo for Windows
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
RUST_BACKTRACE: 1
|
||||
|
||||
jobs:
|
||||
demo-windows:
|
||||
name: Build demo for Windows
|
||||
name: Build
|
||||
runs-on: windows-2022
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
6
.github/workflows/library-android.yml
vendored
6
.github/workflows/library-android.yml
vendored
@ -3,13 +3,9 @@ name: Build android library
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
RUST_BACKTRACE: 1
|
||||
|
||||
jobs:
|
||||
library-android:
|
||||
name: Build android library
|
||||
name: Build
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
5
.github/workflows/library-apple.yml
vendored
5
.github/workflows/library-apple.yml
vendored
@ -3,13 +3,10 @@ name: Build apple library
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
RUST_BACKTRACE: 1
|
||||
|
||||
jobs:
|
||||
library-apple:
|
||||
name: Build apple library
|
||||
name: Build
|
||||
runs-on: macos-11
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
84
.github/workflows/library-web.yml
vendored
Normal file
84
.github/workflows/library-web.yml
vendored
Normal file
@ -0,0 +1,84 @@
|
||||
name: Build library for WebGL
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
secrets:
|
||||
SSH_KEY_MAXAMMANN_ORG:
|
||||
required: false
|
||||
inputs:
|
||||
deploy:
|
||||
required: true
|
||||
type: boolean
|
||||
webgl:
|
||||
required: true
|
||||
type: boolean
|
||||
|
||||
jobs:
|
||||
library-web:
|
||||
name: Build
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: extractions/setup-just@v1
|
||||
- name: Install nightly toolchain
|
||||
shell: bash
|
||||
run: just nightly-toolchain
|
||||
- uses: Swatinem/rust-cache@v1
|
||||
- name: Build lib
|
||||
if: inputs.webgl
|
||||
shell: bash
|
||||
run: just web-lib esbuild-webgl
|
||||
- name: Build lib
|
||||
if: "!inputs.webgl"
|
||||
shell: bash
|
||||
run: just web-lib esbuild
|
||||
- name: Build demo
|
||||
shell: bash
|
||||
run: just web-demo build
|
||||
- name: Check
|
||||
if: inputs.webgl
|
||||
shell: bash
|
||||
run: just web-check "web-webgl"
|
||||
- name: Check
|
||||
if: "!inputs.webgl"
|
||||
shell: bash
|
||||
run: just web-check ""
|
||||
- name: Test
|
||||
if: inputs.webgl
|
||||
shell: bash
|
||||
run: |
|
||||
cargo install wasm-bindgen-cli --version "0.2.80"
|
||||
just web-test "web-webgl"
|
||||
- name: Test
|
||||
if: "!inputs.webgl"
|
||||
shell: bash
|
||||
run: |
|
||||
cargo install wasm-bindgen-cli --version "0.2.80"
|
||||
just web-test ""
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: webgpu-demo
|
||||
path: web/demo/dist/
|
||||
deploy:
|
||||
needs: library-web
|
||||
if: inputs.deploy
|
||||
name: Deploy
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: webgpu-demo
|
||||
- name: Deploy
|
||||
if: "!inputs.webgl"
|
||||
uses: ./.github/actions/deploy
|
||||
with:
|
||||
source: .
|
||||
destination: webgl
|
||||
key: ${{ secrets.SSH_KEY_MAXAMMANN_ORG }}
|
||||
- name: Deploy
|
||||
if: "!inputs.webgl"
|
||||
uses: ./.github/actions/deploy
|
||||
with:
|
||||
source: .
|
||||
destination: webgpu
|
||||
key: ${{ secrets.SSH_KEY_MAXAMMANN_ORG }}
|
||||
39
.github/workflows/library-webgl.yml
vendored
39
.github/workflows/library-webgl.yml
vendored
@ -1,39 +0,0 @@
|
||||
name: Build library for WebGL
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
RUST_BACKTRACE: 1
|
||||
|
||||
jobs:
|
||||
library-webgl:
|
||||
name: Build library for WebGL
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: extractions/setup-just@v1
|
||||
- name: Install nightly toolchain
|
||||
shell: bash
|
||||
run: just nightly-toolchain
|
||||
- uses: Swatinem/rust-cache@v1
|
||||
- name: Build lib
|
||||
shell: bash
|
||||
run: just web-lib esbuild-webgl
|
||||
- name: Build demo
|
||||
shell: bash
|
||||
run: just web-demo build
|
||||
- name: Check
|
||||
shell: bash
|
||||
run: just check web wasm32-unknown-unknown
|
||||
- name: Test
|
||||
shell: bash
|
||||
run: |
|
||||
cargo install wasm-bindgen-cli --version "0.2.80"
|
||||
just web-test "web-webgl"
|
||||
- uses: ./.github/actions/deploy
|
||||
with:
|
||||
source: web/demo/dist/.
|
||||
destination: webgl
|
||||
key: ${{ secrets.SSH_KEY_MAXAMMANN_ORG }}
|
||||
39
.github/workflows/library-webgpu.yml
vendored
39
.github/workflows/library-webgpu.yml
vendored
@ -1,39 +0,0 @@
|
||||
name: Build library for WebGPU
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
RUST_BACKTRACE: 1
|
||||
|
||||
jobs:
|
||||
library-webgpu:
|
||||
name: Build library for WebGPU
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: extractions/setup-just@v1
|
||||
- name: Install nightly toolchain
|
||||
shell: bash
|
||||
run: just nightly-toolchain
|
||||
- uses: Swatinem/rust-cache@v1
|
||||
- name: Build lib
|
||||
shell: bash
|
||||
run: just web-lib esbuild
|
||||
- name: Build demo
|
||||
shell: bash
|
||||
run: just web-demo build
|
||||
- name: Check
|
||||
shell: bash
|
||||
run: just check web wasm32-unknown-unknown
|
||||
- name: Test
|
||||
shell: bash
|
||||
run: |
|
||||
cargo install wasm-bindgen-cli --version "0.2.80"
|
||||
just web-test ""
|
||||
- uses: ./.github/actions/deploy
|
||||
with:
|
||||
source: web/demo/dist/.
|
||||
destination: webgpu
|
||||
key: ${{ secrets.SSH_KEY_MAXAMMANN_ORG }}
|
||||
18
.github/workflows/on_main_push.yml
vendored
18
.github/workflows/on_main_push.yml
vendored
@ -21,16 +21,24 @@ jobs:
|
||||
library-android:
|
||||
uses: ./.github/workflows/library-android.yml
|
||||
library-webgpu:
|
||||
uses: ./.github/workflows/library-webgpu.yml
|
||||
uses: ./.github/workflows/library-web.yml
|
||||
with:
|
||||
deploy: true
|
||||
webgl: false
|
||||
secrets: inherit
|
||||
library-webgl:
|
||||
uses: ./.github/workflows/library-webgl.yml
|
||||
uses: ./.github/workflows/library-web.yml
|
||||
with:
|
||||
deploy: true
|
||||
webgl: true
|
||||
secrets: inherit
|
||||
library-apple:
|
||||
uses: ./.github/workflows/library-apple.yml
|
||||
build-demo-linux:
|
||||
demo-linux:
|
||||
uses: ./.github/workflows/demo-linux.yml
|
||||
build-demo-windows:
|
||||
demo-windows:
|
||||
uses: ./.github/workflows/demo-windows.yml
|
||||
build-demo-macos:
|
||||
demo-macos:
|
||||
uses: ./.github/workflows/demo-macos.yml
|
||||
secrets: inherit
|
||||
|
||||
|
||||
16
.github/workflows/on_pull_request.yml
vendored
16
.github/workflows/on_pull_request.yml
vendored
@ -20,15 +20,21 @@ jobs:
|
||||
library-android:
|
||||
uses: ./.github/workflows/library-android.yml
|
||||
library-webgpu:
|
||||
uses: ./.github/workflows/library-webgpu.yml
|
||||
uses: ./.github/workflows/library-web.yml
|
||||
with:
|
||||
deploy: false
|
||||
webgl: false
|
||||
library-webgl:
|
||||
uses: ./.github/workflows/library-webgl.yml
|
||||
uses: ./.github/workflows/library-web.yml
|
||||
with:
|
||||
deploy: false
|
||||
webgl: true
|
||||
library-apple:
|
||||
uses: ./.github/workflows/library-apple.yml
|
||||
build-demo-linux:
|
||||
demo-linux:
|
||||
uses: ./.github/workflows/demo-linux.yml
|
||||
build-demo-windows:
|
||||
demo-windows:
|
||||
uses: ./.github/workflows/demo-windows.yml
|
||||
build-demo-macos:
|
||||
demo-macos:
|
||||
uses: ./.github/workflows/demo-macos.yml
|
||||
secrets: inherit
|
||||
|
||||
6
.github/workflows/run-benchmarks.yml
vendored
6
.github/workflows/run-benchmarks.yml
vendored
@ -3,13 +3,9 @@ name: Run benchmarks
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
RUST_BACKTRACE: 1
|
||||
|
||||
jobs:
|
||||
run-benchmarks:
|
||||
name: Run benchmarks
|
||||
name: Benchmark
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
6
.github/workflows/run-checks.yml
vendored
6
.github/workflows/run-checks.yml
vendored
@ -3,13 +3,9 @@ name: Run checks
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
RUST_BACKTRACE: 1
|
||||
|
||||
jobs:
|
||||
run-checks:
|
||||
name: Run checks
|
||||
name: Check
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
6
.github/workflows/run-tests.yml
vendored
6
.github/workflows/run-tests.yml
vendored
@ -3,13 +3,9 @@ name: Run tests of "maplibre"
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
RUST_BACKTRACE: 1
|
||||
|
||||
jobs:
|
||||
run-tests:
|
||||
name: Run tests of "maplibre"
|
||||
name: Test
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
7
justfile
7
justfile
@ -5,10 +5,15 @@
|
||||
set shell := ["bash", "-c"]
|
||||
|
||||
export NIGHTLY_TOOLCHAIN := "nightly-2022-04-04-x86_64-unknown-linux-gnu"
|
||||
export CARGO_TERM_COLOR := "always"
|
||||
export RUST_BACKTRACE := "1"
|
||||
|
||||
install-clippy:
|
||||
rustup component add clippy
|
||||
|
||||
install-nightly-clippy:
|
||||
rustup component add clippy --toolchain $NIGHTLY_TOOLCHAIN
|
||||
|
||||
check PROJECT ARCH: install-clippy
|
||||
cargo clippy --no-deps -p {{PROJECT}} --target {{ARCH}}
|
||||
|
||||
@ -45,7 +50,7 @@ web-lib TARGET: nightly-toolchain (web-install "lib")
|
||||
web-demo TARGET: (web-install "demo")
|
||||
cd web/demo && npm run {{TARGET}}
|
||||
|
||||
web-check FEATURES: nightly-toolchain
|
||||
web-check FEATURES: nightly-toolchain install-nightly-clippy
|
||||
export RUSTUP_TOOLCHAIN=$NIGHTLY_TOOLCHAIN && cargo clippy --no-deps -p web --features "{{FEATURES}}" --target wasm32-unknown-unknown -Z build-std=std,panic_abort
|
||||
|
||||
web-test FEATURES: nightly-toolchain
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user