mirror of
https://github.com/maplibre/maplibre-rs.git
synced 2025-12-08 19:05:57 +00:00
Optimize CI runtime by using a better cache
This commit is contained in:
parent
729287cf07
commit
b18f823f43
7
.github/actions/android/action.yml
vendored
7
.github/actions/android/action.yml
vendored
@ -4,10 +4,11 @@ description: Build for android
|
|||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- uses: ./.github/actions/rust-cache
|
- uses: extractions/setup-just@v1
|
||||||
- name: Install just
|
- name: Install nightly toolchain
|
||||||
shell: bash
|
shell: bash
|
||||||
run: cargo install just
|
run: just nightly-toolchain
|
||||||
|
- uses: Swatinem/rust-cache@v1
|
||||||
- name: Build
|
- name: Build
|
||||||
shell: bash
|
shell: bash
|
||||||
run: just build-apk
|
run: just build-apk
|
||||||
|
|||||||
7
.github/actions/check/action.yml
vendored
7
.github/actions/check/action.yml
vendored
@ -4,10 +4,9 @@ description: Check
|
|||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- uses: ./.github/actions/rust-cache
|
- uses: extractions/setup-just@v1
|
||||||
- name: Install just
|
- uses: actions-rs/toolchain@v1
|
||||||
shell: bash
|
- uses: Swatinem/rust-cache@v1
|
||||||
run: cargo install just
|
|
||||||
- name: Format
|
- name: Format
|
||||||
shell: bash
|
shell: bash
|
||||||
run: just fmt-check
|
run: just fmt-check
|
||||||
|
|||||||
3
.github/actions/desktop/action.yml
vendored
3
.github/actions/desktop/action.yml
vendored
@ -4,7 +4,8 @@ description: Build for desktop
|
|||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- uses: ./.github/actions/rust-cache
|
- uses: actions-rs/toolchain@v1
|
||||||
|
- uses: Swatinem/rust-cache@v1
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
shell: bash
|
shell: bash
|
||||||
run: sudo apt-get install -y libwayland-dev libxkbcommon-dev # Required for winit
|
run: sudo apt-get install -y libwayland-dev libxkbcommon-dev # Required for winit
|
||||||
|
|||||||
3
.github/actions/docs/action.yml
vendored
3
.github/actions/docs/action.yml
vendored
@ -4,7 +4,8 @@ description: Build documentation
|
|||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- uses: ./.github/actions/rust-cache
|
- uses: actions-rs/toolchain@v1
|
||||||
|
- uses: Swatinem/rust-cache@v1
|
||||||
- name: Install mdbook
|
- name: Install mdbook
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
15
.github/actions/rust-cache/action.yml
vendored
15
.github/actions/rust-cache/action.yml
vendored
@ -1,15 +0,0 @@
|
|||||||
name: rust-cache
|
|
||||||
description: Cache for rust
|
|
||||||
|
|
||||||
runs:
|
|
||||||
using: "composite"
|
|
||||||
steps:
|
|
||||||
- uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/bin/
|
|
||||||
~/.cargo/registry/index/
|
|
||||||
~/.cargo/registry/cache/
|
|
||||||
~/.cargo/git/db/
|
|
||||||
~/.cargo/.crates*
|
|
||||||
key: 1-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
|
|
||||||
7
.github/actions/webgl/action.yml
vendored
7
.github/actions/webgl/action.yml
vendored
@ -4,10 +4,11 @@ description: Build for webgl
|
|||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- uses: ./.github/actions/rust-cache
|
- uses: extractions/setup-just@v1
|
||||||
- name: Install just
|
- name: Install nightly toolchain
|
||||||
shell: bash
|
shell: bash
|
||||||
run: cargo install just
|
run: just nightly-toolchain
|
||||||
|
- uses: Swatinem/rust-cache@v1
|
||||||
- name: Build
|
- name: Build
|
||||||
shell: bash
|
shell: bash
|
||||||
run: just webpack-webgl-production
|
run: just webpack-webgl-production
|
||||||
|
|||||||
7
.github/actions/webgpu/action.yml
vendored
7
.github/actions/webgpu/action.yml
vendored
@ -4,10 +4,11 @@ description: Build for webgpu
|
|||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- uses: ./.github/actions/rust-cache
|
- uses: extractions/setup-just@v1
|
||||||
- name: Install just
|
- name: Install nightly toolchain
|
||||||
shell: bash
|
shell: bash
|
||||||
run: cargo install just
|
run: just nightly-toolchain
|
||||||
|
- uses: Swatinem/rust-cache@v1
|
||||||
- name: Build
|
- name: Build
|
||||||
shell: bash
|
shell: bash
|
||||||
run: just webpack-production
|
run: just webpack-production
|
||||||
|
|||||||
6
.github/workflows/apple.yml
vendored
6
.github/workflows/apple.yml
vendored
@ -15,9 +15,9 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
- uses: extractions/setup-just@v1
|
||||||
submodules: 'recursive'
|
- uses: actions-rs/toolchain@v1
|
||||||
- uses: ./.github/actions/rust-cache
|
- uses: Swatinem/rust-cache@v1
|
||||||
- name: Build xcframework
|
- name: Build xcframework
|
||||||
run: just xcodebuild-xcframework
|
run: just xcodebuild-xcframework
|
||||||
- name: Build Example
|
- name: Build Example
|
||||||
|
|||||||
6
justfile
6
justfile
@ -2,7 +2,7 @@
|
|||||||
# ^ A shebang isn't required, but allows a justfile to be executed
|
# ^ A shebang isn't required, but allows a justfile to be executed
|
||||||
# like a script, with `./justfile test`, for example.
|
# like a script, with `./justfile test`, for example.
|
||||||
|
|
||||||
export RUSTUP_TOOLCHAIN := "nightly-2022-04-04-x86_64-unknown-linux-gnu"
|
export NIGHTLY_TOOLCHAIN := "nightly-2022-04-04-x86_64-unknown-linux-gnu"
|
||||||
|
|
||||||
test:
|
test:
|
||||||
cargo test
|
cargo test
|
||||||
@ -23,8 +23,8 @@ fmt-check: install-rustfmt
|
|||||||
cargo fmt --all -- --check
|
cargo fmt --all -- --check
|
||||||
|
|
||||||
nightly-toolchain:
|
nightly-toolchain:
|
||||||
rustup install $RUSTUP_TOOLCHAIN
|
rustup install $NIGHTLY_TOOLCHAIN
|
||||||
rustup component add rust-src --toolchain $RUSTUP_TOOLCHAIN
|
rustup component add rust-src --toolchain $NIGHTLY_TOOLCHAIN
|
||||||
|
|
||||||
webpack-webgl-production: nightly-toolchain
|
webpack-webgl-production: nightly-toolchain
|
||||||
cd web/web && npm install && npm run webgl-production-build
|
cd web/web && npm install && npm run webgl-production-build
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user