Use reusable workflows

This commit is contained in:
Maximilian Ammann 2022-06-02 15:08:26 +02:00
parent 9728caa2ac
commit c707fa3b5c
24 changed files with 475 additions and 426 deletions

View File

@ -1,32 +0,0 @@
name: android
description: Build for android
runs:
using: "composite"
steps:
- uses: extractions/setup-just@v1
- name: Install nightly toolchain
shell: bash
run: just nightly-toolchain-android
- uses: Swatinem/rust-cache@v1
- name: Build
shell: bash
run: just build-android
# TODO: Additional clippy checks for different targets
- name: Check x86_64
shell: bash
run: |
env "AR_x86_64-linux-android=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar" \
env "CC_x86_64-linux-android=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android30-clang" \
just check maplibre-android x86_64-linux-android
- name: Check aarch64
shell: bash
run: |
env "AR_aarch64-linux-android=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar" \
env "CC_aarch64-linux-android=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android30-clang" \
just check maplibre-android aarch64-linux-android
# FIXME: Requires cross-compilation
#- name: Test
# shell: bash
# # TODO: Additional test runs for different targets
# run: just test maplibre-android aarch64-linux-android

View File

@ -1,42 +0,0 @@
name: macOS
description: Build for macOS
inputs:
GITHUB_TOKEN:
required: true
description: On macos runners we often hit API limits. Using this token avoid this.
runs:
using: "composite"
steps:
- uses: extractions/setup-just@v1
env:
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
- name: Install toolchain
shell: bash
run: just default-toolchain
- uses: Swatinem/rust-cache@v1
- 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 x86_64 darwin
shell: bash
# TODO: Additional clippy checks for different targets (iOS)
run: just check apple x86_64-apple-darwin
- name: Test x86_64 darwin
shell: bash
# TODO: Additional test runs for different targets (Different targets might require emulation)
run: just test apple x86_64-apple-darwin
- name: Build Example
shell: bash
run: cd apple/xcode && xcodebuild -scheme "example (iOS)" -arch arm64 -sdk iphoneos build CODE_SIGNING_ALLOWED=NO
- name: Build Swift Package (arm64)
shell: bash
run: cd apple/MapLibreRs && swift build --arch=arm64
- name: Build Swift Package (x86_64)
shell: bash
run: cd apple/MapLibreRs && swift build --arch=x86_64

View File

@ -1,17 +0,0 @@
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 benchmarks x86_64-unknown-linux-gnu

View File

@ -1,14 +0,0 @@
name: check
description: Check
runs:
using: "composite"
steps:
- uses: extractions/setup-just@v1
- name: Install toolchain
shell: bash
run: just default-toolchain
- uses: Swatinem/rust-cache@v1
- name: Format
shell: bash
run: just fmt-check

View File

@ -1,27 +0,0 @@
name: linux-demo
description: Build linux-demo for linux
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: Build
shell: bash
run: cargo build -p maplibre-demo
- name: Check
shell: bash
run: just check maplibre-demo x86_64-unknown-linux-gnu
- name: Test x86_64 linux
shell: bash
run: just test maplibre-demo x86_64-unknown-linux-gnu
- uses: actions/upload-artifact@v2
with:
name: maplibre-rs
path: target/x86_64-unknown-linux-gnu/debug/maplibre-demo

View File

@ -1,32 +0,0 @@
name: macOS
description: Build for macOS
inputs:
GITHUB_TOKEN:
required: true
description: On macos runners we often hit API limits. Using this token avoid this.
runs:
using: "composite"
steps:
- uses: extractions/setup-just@v1
env:
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
- name: Install toolchain
shell: bash
run: just default-toolchain
- uses: Swatinem/rust-cache@v1
- name: Build
shell: bash
run: cd apple/xcode && xcodebuild -scheme "example (macOS)" build CODE_SIGNING_ALLOWED=NO MACOSX_DEPLOYMENT_TARGET=10.9 -derivedDataPath build
- name: Check x86_64 darwin
shell: bash
run: just check maplibre-demo x86_64-apple-darwin
- name: Test x86_64 darwin
shell: bash
run: just test maplibre-demo x86_64-apple-darwin
- uses: actions/upload-artifact@v3
with:
name: maplibre-x86_64-apple-darwin-demo
path: apple/xcode/build/Build/Products/Debug/*.app
if-no-files-found: error

View File

@ -1,35 +0,0 @@
name: windows-demo
description: Build windows-demo for windows
runs:
using: "composite"
steps:
- uses: extractions/setup-just@v1
- name: Install toolchain
shell: bash
run: just default-toolchain
- uses: Swatinem/rust-cache@v1
- uses: ilammy/msvc-dev-cmd@v1 # Provide access to lib.exe
- name: Install SQLite
shell: powershell
run: choco install sqlite -y --params "/NoTools"
- name: Build SQLite lib
shell: powershell
run: |
cd "C:\ProgramData\chocolatey\lib\SQLite\tools"
lib /DEF:sqlite3.def /OUT:sqlite3.lib /MACHINE:x64
echo "SQLITE3_LIB_DIR=C:\ProgramData\chocolatey\lib\SQLite\tools" >> $env:GITHUB_ENV
- name: Build
shell: bash
run: cargo build -p maplibre-demo --release --target x86_64-pc-windows-msvc
- name: Check x86_64 windows
shell: bash
run: just check maplibre-demo x86_64-pc-windows-msvc
- name: Test x86_64 windows
shell: bash
run: just test maplibre-demo x86_64-pc-windows-msvc
- uses: actions/upload-artifact@v3
with:
name: maplibre-x86_64-windows-demo
path: target/x86_64-pc-windows-msvc/release/maplibre-demo.exe
if-no-files-found: error

View File

@ -1,23 +0,0 @@
name: docs
description: Build documentation
runs:
using: "composite"
steps:
- uses: extractions/setup-just@v1
- name: Install toolchain
shell: bash
run: just default-toolchain
- uses: Swatinem/rust-cache@v1
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
- name: Install Dependencies
shell: bash
run: sudo apt-get install -y libwayland-dev libxkbcommon-dev # Required for winit
- name: Build
working-directory: docs
shell: bash
run: mdbook build
- name: API Documentation
shell: bash
run: cargo doc -p maplibre --no-deps --lib --document-private-items

View File

@ -1,29 +0,0 @@
name: tests
description: Run tests
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 Mesa Dependencies
shell: bash
run: sudo apt install -y libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers
- name: wgpu info
shell: bash
run: |
cargo install --git "https://github.com/gfx-rs/wgpu" wgpu-info
wgpu-info
- name: Test Vulkan
shell: bash
# TODO: Additional test runs for different targets
run: |
WGPU_BACKEND=vulkan just test maplibre x86_64-unknown-linux-gnu
- name: Test EGL
shell: bash
# TODO: Additional test runs for different targets
run: |
EGL_LOG_LEVEL=debug WGPU_BACKEND=gl just test maplibre x86_64-unknown-linux-gnu

View File

@ -1,25 +0,0 @@
name: webgl
description: Build for webgl
runs:
using: "composite"
steps:
- 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"

View File

@ -1,25 +0,0 @@
name: webgpu
description: Build for webgpu
runs:
using: "composite"
steps:
- 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 ""

69
.github/workflows/build-deploy-docs.yml vendored Normal file
View File

@ -0,0 +1,69 @@
name: Build documentation
on:
workflow_call:
secrets:
SSH_KEY_MAXAMMANN_ORG:
required: false
inputs:
deploy:
required: true
type: boolean
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
build-docs:
name: Build documentation
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: extractions/setup-just@v1
- name: Install toolchain
shell: bash
run: just default-toolchain
- uses: Swatinem/rust-cache@v1
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
- name: Install Dependencies
shell: bash
run: sudo apt-get install -y libwayland-dev libxkbcommon-dev # Required for winit
- name: Build
working-directory: docs
shell: bash
run: mdbook build
- name: API Documentation
shell: bash
run: cargo doc -p maplibre --no-deps --lib --document-private-items
- uses: actions/upload-artifact@v2
with:
name: api-docs
path: target/doc
- uses: actions/upload-artifact@v2
with:
name: book
path: docs/book
deploy-docs:
needs: build-docs
if: inputs.deploy
name: Deploy documentation
runs-on: ubuntu-20.04
steps:
- uses: actions/download-artifact@v2
with:
name: api-docs
- uses: actions/download-artifact@v2
with:
name: book
- uses: ./.github/actions/deploy
with:
source: target/doc/.
destination: api-docs
key: ${{ secrets.SSH_KEY_MAXAMMANN_ORG }}
- uses: ./.github/actions/deploy
with:
source: docs/book/.
destination: docs
key: ${{ secrets.SSH_KEY_MAXAMMANN_ORG }}

36
.github/workflows/demo-linux.yml vendored Normal file
View File

@ -0,0 +1,36 @@
name: Build demo for Linux
on:
workflow_call:
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
demo-linux:
name: Build demo for Linux
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- 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: Build
shell: bash
run: cargo build -p maplibre-demo
- name: Check
shell: bash
run: just check maplibre-demo x86_64-unknown-linux-gnu
- name: Test x86_64 linux
shell: bash
run: just test maplibre-demo x86_64-unknown-linux-gnu
- uses: actions/upload-artifact@v2
with:
name: maplibre-rs
path: target/x86_64-unknown-linux-gnu/debug/maplibre-demo

36
.github/workflows/demo-macos.yml vendored Normal file
View File

@ -0,0 +1,36 @@
name: Build demo for macOS
on:
workflow_call:
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
demo-macos:
name: Build demo for macOS
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- uses: extractions/setup-just@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install toolchain
shell: bash
run: just default-toolchain
- uses: Swatinem/rust-cache@v1
- name: Build
shell: bash
run: cd apple/xcode && xcodebuild -scheme "example (macOS)" build CODE_SIGNING_ALLOWED=NO MACOSX_DEPLOYMENT_TARGET=10.9 -derivedDataPath build
- name: Check x86_64 darwin
shell: bash
run: just check maplibre-demo x86_64-apple-darwin
- name: Test x86_64 darwin
shell: bash
run: just test maplibre-demo x86_64-apple-darwin
- uses: actions/upload-artifact@v3
with:
name: maplibre-x86_64-apple-darwin-demo
path: apple/xcode/build/Build/Products/Debug/*.app
if-no-files-found: error

44
.github/workflows/demo-windows.yml vendored Normal file
View File

@ -0,0 +1,44 @@
name: Build demo for Windows
on:
workflow_call:
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
demo-windows:
name: Build demo for Windows
runs-on: windows-2022
steps:
- uses: actions/checkout@v2
- uses: extractions/setup-just@v1
- name: Install toolchain
shell: bash
run: just default-toolchain
- uses: Swatinem/rust-cache@v1
- uses: ilammy/msvc-dev-cmd@v1 # Provide access to lib.exe
- name: Install SQLite
shell: powershell
run: choco install sqlite -y --params "/NoTools"
- name: Build SQLite lib
shell: powershell
run: |
cd "C:\ProgramData\chocolatey\lib\SQLite\tools"
lib /DEF:sqlite3.def /OUT:sqlite3.lib /MACHINE:x64
echo "SQLITE3_LIB_DIR=C:\ProgramData\chocolatey\lib\SQLite\tools" >> $env:GITHUB_ENV
- name: Build
shell: bash
run: cargo build -p maplibre-demo --release --target x86_64-pc-windows-msvc
- name: Check x86_64 windows
shell: bash
run: just check maplibre-demo x86_64-pc-windows-msvc
- name: Test x86_64 windows
shell: bash
run: just test maplibre-demo x86_64-pc-windows-msvc
- uses: actions/upload-artifact@v3
with:
name: maplibre-x86_64-windows-demo
path: target/x86_64-pc-windows-msvc/release/maplibre-demo.exe
if-no-files-found: error

41
.github/workflows/library-android.yml vendored Normal file
View File

@ -0,0 +1,41 @@
name: Build android library
on:
workflow_call:
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
library-android:
name: Build android library
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-android
- uses: Swatinem/rust-cache@v1
- name: Build
shell: bash
run: just build-android
# TODO: Additional clippy checks for different targets
- name: Check x86_64
shell: bash
run: |
env "AR_x86_64-linux-android=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar" \
env "CC_x86_64-linux-android=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android30-clang" \
just check maplibre-android x86_64-linux-android
- name: Check aarch64
shell: bash
run: |
env "AR_aarch64-linux-android=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar" \
env "CC_aarch64-linux-android=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android30-clang" \
just check maplibre-android aarch64-linux-android
# FIXME: Requires cross-compilation
#- name: Test
# shell: bash
# # TODO: Additional test runs for different targets
# run: just test maplibre-android aarch64-linux-android

46
.github/workflows/library-apple.yml vendored Normal file
View File

@ -0,0 +1,46 @@
name: Build apple library
on:
workflow_call:
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
library-apple:
name: Build apple library
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- uses: extractions/setup-just@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install toolchain
shell: bash
run: just default-toolchain
- uses: Swatinem/rust-cache@v1
- 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 x86_64 darwin
shell: bash
# TODO: Additional clippy checks for different targets (iOS)
run: just check apple x86_64-apple-darwin
- name: Test x86_64 darwin
shell: bash
# TODO: Additional test runs for different targets (Different targets might require emulation)
run: just test apple x86_64-apple-darwin
- name: Build Example
shell: bash
run: cd apple/xcode && xcodebuild -scheme "example (iOS)" -arch arm64 -sdk iphoneos build CODE_SIGNING_ALLOWED=NO
- name: Build Swift Package (arm64)
shell: bash
run: cd apple/MapLibreRs && swift build --arch=arm64
- name: Build Swift Package (x86_64)
shell: bash
run: cd apple/MapLibreRs && swift build --arch=x86_64

39
.github/workflows/library-webgl.yml vendored Normal file
View File

@ -0,0 +1,39 @@
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 Normal file
View File

@ -0,0 +1,39 @@
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 }}

View File

@ -8,82 +8,29 @@ on:
jobs:
run-check:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/check
uses: ./.github/workflows/run-checks.yml
run-benchmarks:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/benchmarks
uses: ./.github/workflows/run-benchmarks.yml
run-tests:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/tests
build-android:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/android
build-deploy-webgpu:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/webgpu
- uses: ./.github/actions/deploy
with:
source: web/demo/dist/.
destination: webgpu
key: ${{ secrets.SSH_KEY_MAXAMMANN_ORG }}
build-deploy-webgl:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/webgl
- uses: ./.github/actions/deploy
with:
source: web/demo/dist/.
destination: webgl
key: ${{ secrets.SSH_KEY_MAXAMMANN_ORG }}
uses: ./.github/workflows/run-tests.yml
build-deploy-docs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/docs
- uses: ./.github/actions/deploy
with:
source: target/doc/.
destination: api-docs
key: ${{ secrets.SSH_KEY_MAXAMMANN_ORG }}
- uses: ./.github/actions/deploy
with:
source: docs/book/.
destination: docs
key: ${{ secrets.SSH_KEY_MAXAMMANN_ORG }}
build-apple:
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/apple
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: ./.github/workflows/build-deploy-docs.yml
with:
deploy: true
secrets: inherit
library-android:
uses: ./.github/workflows/library-android.yml
library-webgpu:
uses: ./.github/workflows/library-webgpu.yml
library-webgl:
uses: ./.github/workflows/library-webgl.yml
library-apple:
uses: ./.github/workflows/library-apple.yml
build-demo-linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/demo/linux
uses: ./.github/workflows/demo-linux.yml
build-demo-windows:
runs-on: windows-2022
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/demo/windows
uses: ./.github/workflows/demo-windows.yml
build-demo-macos:
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/demo/macos
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: ./.github/workflows/demo-macos.yml
secrets: inherit

View File

@ -8,61 +8,27 @@ on:
jobs:
run-check:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/check
uses: ./.github/workflows/run-checks.yml
run-benchmarks:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/benchmarks
uses: ./.github/workflows/run-benchmarks.yml
run-tests:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/tests
build-android:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/android
build-webgpu:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/webgpu
build-webgl:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/webgl
build-docs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/docs
build-apple:
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/apple
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: ./.github/workflows/run-tests.yml
build-deploy-docs:
uses: ./.github/workflows/build-deploy-docs.yml
with:
deploy: false
library-android:
uses: ./.github/workflows/library-android.yml
library-webgpu:
uses: ./.github/workflows/library-webgpu.yml
library-webgl:
uses: ./.github/workflows/library-webgl.yml
library-apple:
uses: ./.github/workflows/library-apple.yml
build-demo-linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/demo/linux
uses: ./.github/workflows/demo-linux.yml
build-demo-windows:
runs-on: windows-2022
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/demo/windows
uses: ./.github/workflows/demo-windows.yml
build-demo-macos:
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/demo/macos
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: ./.github/workflows/demo-macos.yml
secrets: inherit

26
.github/workflows/run-benchmarks.yml vendored Normal file
View File

@ -0,0 +1,26 @@
name: Run benchmarks
on:
workflow_call:
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
run-benchmarks:
name: Run benchmarks
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- 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 benchmarks x86_64-unknown-linux-gnu

23
.github/workflows/run-checks.yml vendored Normal file
View File

@ -0,0 +1,23 @@
name: Run checks
on:
workflow_call:
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
run-checks:
name: Run checks
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: extractions/setup-just@v1
- name: Install toolchain
shell: bash
run: just default-toolchain
- uses: Swatinem/rust-cache@v1
- name: Format
shell: bash
run: just fmt-check

38
.github/workflows/run-tests.yml vendored Normal file
View File

@ -0,0 +1,38 @@
name: Run tests of "maplibre"
on:
workflow_call:
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
run-tests:
name: Run tests of "maplibre"
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: extractions/setup-just@v1
- name: Install toolchain
shell: bash
run: just default-toolchain
- uses: Swatinem/rust-cache@v1
- name: Install Mesa Dependencies
shell: bash
run: sudo apt install -y libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers
- name: wgpu info
shell: bash
run: |
cargo install --git "https://github.com/gfx-rs/wgpu" wgpu-info
wgpu-info
- name: Test Vulkan
shell: bash
# TODO: Additional test runs for different targets
run: |
WGPU_BACKEND=vulkan just test maplibre x86_64-unknown-linux-gnu
- name: Test EGL
shell: bash
# TODO: Additional test runs for different targets
run: |
EGL_LOG_LEVEL=debug WGPU_BACKEND=gl just test maplibre x86_64-unknown-linux-gnu