mirror of
https://github.com/maplibre/maplibre-rs.git
synced 2025-12-08 19:05:57 +00:00
168 lines
4.9 KiB
YAML
168 lines
4.9 KiB
YAML
name: Rust
|
|
|
|
on: [ push, pull_request ]
|
|
|
|
jobs:
|
|
build-x86:
|
|
runs-on: ubuntu-20.04
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: 'recursive'
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.cargo/bin/
|
|
~/.cargo/registry/index/
|
|
~/.cargo/registry/cache/
|
|
~/.cargo/git/db/
|
|
target/
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
- name: Install Dependencies
|
|
run: sudo apt-get install -y libwayland-client++0 libwayland-client0
|
|
- name: Build
|
|
run: cargo build --bin mapr
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: mapr
|
|
path: target/debug/mapr
|
|
|
|
build-macos:
|
|
runs-on: macOS-11
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: 'recursive'
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.cargo/bin/
|
|
~/.cargo/registry/index/
|
|
~/.cargo/registry/cache/
|
|
~/.cargo/git/db/
|
|
target/
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
- name: Build
|
|
run: cd apple/mapr && xcodebuild -scheme "mapr (macOS)" -arch arm64 build
|
|
|
|
build-iphonesimulator:
|
|
runs-on: macOS-11
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: 'recursive'
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.cargo/bin/
|
|
~/.cargo/registry/index/
|
|
~/.cargo/registry/cache/
|
|
~/.cargo/git/db/
|
|
target/
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
- name: Build
|
|
run: cd apple/mapr && xcodebuild -scheme "mapr (iOS)" -arch arm64 -sdk iphonesimulator build
|
|
|
|
build-aarch64-android:
|
|
runs-on: ubuntu-20.04
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: 'recursive'
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.cargo/bin/
|
|
~/.cargo/registry/index/
|
|
~/.cargo/registry/cache/
|
|
~/.cargo/git/db/
|
|
target/
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
- name: Build
|
|
run: tools/build-android
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: mapr.apk
|
|
path: target/debug/apk/mapr.apk
|
|
|
|
build-wasm:
|
|
runs-on: ubuntu-20.04
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
working-directory: web
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: 'recursive'
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.cargo/bin/
|
|
~/.cargo/registry/index/
|
|
~/.cargo/registry/cache/
|
|
~/.cargo/git/db/
|
|
target/
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
- name: Prepare Rust Toolchain # This is required because we are recompiling the stdlib
|
|
run: |
|
|
rustup install nightly-2021-12-07-x86_64-unknown-linux-gnu
|
|
rustup component add rust-src --toolchain nightly-2021-12-07-x86_64-unknown-linux-gnu
|
|
- name: NPM Install
|
|
run: npm install
|
|
- name: Build
|
|
run: npm run production-build
|
|
- name: Deploy to maxammann.org
|
|
env:
|
|
SSH_KEY: ${{ secrets.SSH_KEY_MAXAMMANN_ORG }}
|
|
run: |
|
|
echo "$SSH_KEY" > id_rsa
|
|
chmod 600 id_rsa
|
|
ssh -o StrictHostKeyChecking=no -i id_rsa max@maxammann.org 'find ~/public_html/mapr -type f -not -name ".htaccess" -delete'
|
|
rsync -e "ssh -o StrictHostKeyChecking=no -i id_rsa" -r "dist/demo/." max@maxammann.org:~/public_html/mapr/
|
|
|
|
book:
|
|
runs-on: ubuntu-20.04
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
working-directory: docs
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: 'recursive'
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.cargo/bin/
|
|
~/.cargo/registry/index/
|
|
~/.cargo/registry/cache/
|
|
~/.cargo/git/db/
|
|
target/
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
- name: Install mdbook
|
|
run: |
|
|
cargo install --force mdbook --no-default-features --features output --vers "^0.1.0"
|
|
- name: Build
|
|
run: mdbook build
|
|
- name: Deploy to maxammann.org
|
|
env:
|
|
SSH_KEY: ${{ secrets.SSH_KEY_MAXAMMANN_ORG }}
|
|
run: |
|
|
echo "$SSH_KEY" > id_rsa
|
|
chmod 600 id_rsa
|
|
ssh -o StrictHostKeyChecking=no -i id_rsa max@maxammann.org 'find ~/public_html/mapr-docs -type f -not -name ".htaccess" -delete'
|
|
rsync -e "ssh -o StrictHostKeyChecking=no -i id_rsa" -r "book/." max@maxammann.org:~/public_html/mapr-docs/
|