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:
|
||||
using: "composite"
|
||||
steps:
|
||||
- uses: ./.github/actions/rust-cache
|
||||
- name: Install just
|
||||
- uses: extractions/setup-just@v1
|
||||
- name: Install nightly toolchain
|
||||
shell: bash
|
||||
run: cargo install just
|
||||
run: just nightly-toolchain
|
||||
- uses: Swatinem/rust-cache@v1
|
||||
- name: Build
|
||||
shell: bash
|
||||
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:
|
||||
using: "composite"
|
||||
steps:
|
||||
- uses: ./.github/actions/rust-cache
|
||||
- name: Install just
|
||||
shell: bash
|
||||
run: cargo install just
|
||||
- uses: extractions/setup-just@v1
|
||||
- uses: actions-rs/toolchain@v1
|
||||
- uses: Swatinem/rust-cache@v1
|
||||
- name: Format
|
||||
shell: bash
|
||||
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:
|
||||
using: "composite"
|
||||
steps:
|
||||
- uses: ./.github/actions/rust-cache
|
||||
- uses: actions-rs/toolchain@v1
|
||||
- uses: Swatinem/rust-cache@v1
|
||||
- name: Install Dependencies
|
||||
shell: bash
|
||||
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:
|
||||
using: "composite"
|
||||
steps:
|
||||
- uses: ./.github/actions/rust-cache
|
||||
- uses: actions-rs/toolchain@v1
|
||||
- uses: Swatinem/rust-cache@v1
|
||||
- name: Install mdbook
|
||||
shell: bash
|
||||
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:
|
||||
using: "composite"
|
||||
steps:
|
||||
- uses: ./.github/actions/rust-cache
|
||||
- name: Install just
|
||||
- uses: extractions/setup-just@v1
|
||||
- name: Install nightly toolchain
|
||||
shell: bash
|
||||
run: cargo install just
|
||||
run: just nightly-toolchain
|
||||
- uses: Swatinem/rust-cache@v1
|
||||
- name: Build
|
||||
shell: bash
|
||||
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:
|
||||
using: "composite"
|
||||
steps:
|
||||
- uses: ./.github/actions/rust-cache
|
||||
- name: Install just
|
||||
- uses: extractions/setup-just@v1
|
||||
- name: Install nightly toolchain
|
||||
shell: bash
|
||||
run: cargo install just
|
||||
run: just nightly-toolchain
|
||||
- uses: Swatinem/rust-cache@v1
|
||||
- name: Build
|
||||
shell: bash
|
||||
run: just webpack-production
|
||||
|
||||
6
.github/workflows/apple.yml
vendored
6
.github/workflows/apple.yml
vendored
@ -15,9 +15,9 @@ jobs:
|
||||
shell: bash
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
- uses: ./.github/actions/rust-cache
|
||||
- uses: extractions/setup-just@v1
|
||||
- uses: actions-rs/toolchain@v1
|
||||
- uses: Swatinem/rust-cache@v1
|
||||
- name: Build xcframework
|
||||
run: just xcodebuild-xcframework
|
||||
- name: Build Example
|
||||
|
||||
6
justfile
6
justfile
@ -2,7 +2,7 @@
|
||||
# ^ A shebang isn't required, but allows a justfile to be executed
|
||||
# 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:
|
||||
cargo test
|
||||
@ -23,8 +23,8 @@ fmt-check: install-rustfmt
|
||||
cargo fmt --all -- --check
|
||||
|
||||
nightly-toolchain:
|
||||
rustup install $RUSTUP_TOOLCHAIN
|
||||
rustup component add rust-src --toolchain $RUSTUP_TOOLCHAIN
|
||||
rustup install $NIGHTLY_TOOLCHAIN
|
||||
rustup component add rust-src --toolchain $NIGHTLY_TOOLCHAIN
|
||||
|
||||
webpack-webgl-production: nightly-toolchain
|
||||
cd web/web && npm install && npm run webgl-production-build
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user