-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 78d8319
Showing
20 changed files
with
959 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Post build environment | ||
description: Clean up build environment actions | ||
|
||
inputs: | ||
cargo-cache-primary-key: | ||
description: Primary key of cargo cache restore action | ||
required: true | ||
cargo-cache-hit: | ||
description: A boolean value to indicate an exact match was found for the cargo cache restore action | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Cache cargo output (save) | ||
if: inputs.cargo-cache-hit != 'true' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop') | ||
uses: actions/cache/[email protected] | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/.crates.toml | ||
~/.cargo/.crates2.json | ||
~/.cargo/.package-cache | ||
~/.cargo/registry/ | ||
~/.cargo/git/db/ | ||
target/ | ||
key: ${{ inputs.cargo-cache-primary-key }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Prepare build environment | ||
description: Ensures that everything is prepared for our build jobs | ||
|
||
outputs: | ||
cargo-cache-primary-key: | ||
description: Primary key of cargo cache restore action | ||
value: ${{ steps.cargo-cache.outputs.cache-primary-key }} | ||
cargo-cache-hit: | ||
description: A boolean value to indicate an exact match was found for the cargo cache restore action | ||
value: ${{ steps.cargo-cache.outputs.cache-hit }} | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Cache rust-toolchain (restore) | ||
id: rustup-cache | ||
uses: actions/cache/[email protected] | ||
with: | ||
path: | | ||
~/.rustup/toolchains | ||
~/.rustup/update-hashes | ||
~/.rustup/settings.toml | ||
key: toolchain-${{ hashFiles('rust-toolchain') }}-1 | ||
|
||
- name: Use rust-toolchain nightly | ||
if: steps.rustup-cache.outputs.cache-hit != 'true' | ||
shell: bash | ||
run: | | ||
rustup toolchain uninstall stable | ||
rustup toolchain install $(cat rust-toolchain) \ | ||
--profile minimal --component clippy,rust-src | ||
- name: Get rust version | ||
id: rustup | ||
shell: bash | ||
run: | | ||
rustup show | ||
echo "version=$(rustc --version | cut -d ' ' -f 2)" >> $GITHUB_OUTPUT | ||
- name: Cache rust-toolchain (save) | ||
uses: actions/cache/[email protected] | ||
if: steps.rustup-cache.outputs.cache-hit != 'true' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop') | ||
with: | ||
path: | | ||
~/.rustup/toolchains | ||
~/.rustup/update-hashes | ||
~/.rustup/settings.toml | ||
key: ${{ steps.rustup-cache.outputs.cache-primary-key }} | ||
|
||
- name: Cache cargo output (restore) | ||
id: cargo-cache | ||
uses: actions/cache/[email protected] | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/.crates.toml | ||
~/.cargo/.crates2.json | ||
~/.cargo/.package-cache | ||
~/.cargo/registry/ | ||
~/.cargo/git/db/ | ||
target/ | ||
key: ${{ runner.os }}-${{ steps.rustup.outputs.version }}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ github.job }}-1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
version: 2 | ||
|
||
updates: | ||
- package-ecosystem: cargo | ||
directory: / | ||
schedule: | ||
interval: daily | ||
target-branch: "develop" | ||
open-pull-requests-limit: 10 | ||
|
||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: daily | ||
target-branch: "develop" | ||
open-pull-requests-limit: 10 | ||
|
||
- package-ecosystem: github-actions | ||
directory: /.github/actions/prepare-build-env | ||
schedule: | ||
interval: daily | ||
target-branch: "develop" | ||
open-pull-requests-limit: 10 | ||
|
||
- package-ecosystem: github-actions | ||
directory: /.github/actions/post-build-env | ||
schedule: | ||
interval: daily | ||
target-branch: "develop" | ||
open-pull-requests-limit: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
name: CI | ||
|
||
on: | ||
schedule: | ||
- cron: "0 7 * * 1" | ||
push: | ||
pull_request: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
CARGO_INCREMENTAL: 0 | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
lint: | ||
timeout-minutes: 10 | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout repository and submodules | ||
uses: actions/[email protected] | ||
with: | ||
submodules: recursive | ||
|
||
- name: Prepare build environemnt | ||
id: prepare | ||
uses: ./.github/actions/prepare-build-env | ||
|
||
- name: Run cargo clippy | ||
run: | | ||
cargo clippy --tests -- --deny "warnings" | ||
- name: Post build environemnt | ||
if: always() | ||
uses: ./.github/actions/post-build-env | ||
with: | ||
cargo-cache-primary-key: ${{ steps.prepare.outputs.cargo-cache-primary-key }} | ||
cargo-cache-hit: ${{ steps.prepare.outputs.cargo-cache-hit }} | ||
|
||
build: | ||
timeout-minutes: 10 | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout repository and submodules | ||
uses: actions/[email protected] | ||
with: | ||
submodules: recursive | ||
|
||
- name: Prepare build environemnt | ||
id: prepare | ||
uses: ./.github/actions/prepare-build-env | ||
|
||
- name: Run cargo build | ||
run: cargo build | ||
|
||
- name: Post build environemnt | ||
if: always() | ||
uses: ./.github/actions/post-build-env | ||
with: | ||
cargo-cache-primary-key: ${{ steps.prepare.outputs.cargo-cache-primary-key }} | ||
cargo-cache-hit: ${{ steps.prepare.outputs.cargo-cache-hit }} | ||
|
||
unit-test: | ||
timeout-minutes: 10 | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout repository and submodules | ||
uses: actions/[email protected] | ||
with: | ||
submodules: recursive | ||
|
||
- name: Prepare build environemnt | ||
id: prepare | ||
uses: ./.github/actions/prepare-build-env | ||
|
||
- name: Use libegl1-mesa latest | ||
uses: ./.github/actions/install-graphics-driver | ||
|
||
- name: Run cargo test | ||
run: | | ||
cargo test -- --nocapture | ||
- name: Post build environemnt | ||
if: always() | ||
uses: ./.github/actions/post-build-env | ||
with: | ||
cargo-cache-primary-key: ${{ steps.prepare.outputs.cargo-cache-primary-key }} | ||
cargo-cache-hit: ${{ steps.prepare.outputs.cargo-cache-hit }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/.vscode | ||
/target | ||
**/*.rs.bk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[submodule "vector-tile-spec"] | ||
path = vector-tile-spec | ||
url = https://github.com/mapbox/vector-tile-spec | ||
[submodule "mvt-fixtures"] | ||
path = mvt-fixtures | ||
url = https://github.com/mapbox/mvt-fixtures |
Oops, something went wrong.