mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-03-04 17:23:33 +01:00
ci: merge ci.yml into MinedMap.yml, update actions
This commit is contained in:
parent
b5a5c72142
commit
7cc6fca7fe
2 changed files with 57 additions and 82 deletions
58
.github/workflows/MinedMap.yml
vendored
58
.github/workflows/MinedMap.yml
vendored
|
@ -1,9 +1,12 @@
|
||||||
name: 'MinedMap'
|
name: 'MinedMap'
|
||||||
on: ['push', 'pull_request', 'workflow_dispatch']
|
on: ['push', 'pull_request', 'workflow_dispatch']
|
||||||
|
|
||||||
|
env:
|
||||||
|
RUSTFLAGS: -Dwarnings
|
||||||
|
RUSTDOCFLAGS: -Dwarnings
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
viewer:
|
viewer:
|
||||||
name: 'Package viewer'
|
|
||||||
runs-on: 'ubuntu-20.04'
|
runs-on: 'ubuntu-20.04'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
@ -28,3 +31,56 @@ jobs:
|
||||||
with:
|
with:
|
||||||
name: 'MinedMap-${{ steps.tag.outputs.tag }}-viewer'
|
name: 'MinedMap-${{ steps.tag.outputs.tag }}-viewer'
|
||||||
path: 'build/pkg'
|
path: 'build/pkg'
|
||||||
|
|
||||||
|
fmt:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: dtolnay/rust-toolchain@master
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
components: rustfmt
|
||||||
|
- run: cargo fmt --all -- --check
|
||||||
|
|
||||||
|
clippy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: dtolnay/rust-toolchain@master
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
components: clippy
|
||||||
|
- uses: swatinem/rust-cache@v2
|
||||||
|
- uses: actions-rs/clippy-check@v1
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
args: --workspace --tests --examples
|
||||||
|
|
||||||
|
docs:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: dtolnay/rust-toolchain@master
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
components: rust-docs
|
||||||
|
- uses: swatinem/rust-cache@v2
|
||||||
|
- run: cargo doc --workspace --no-deps --document-private-items
|
||||||
|
|
||||||
|
test:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, windows-latest, macOS-latest]
|
||||||
|
rust: [stable]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: dtolnay/rust-toolchain@master
|
||||||
|
with:
|
||||||
|
toolchain: ${{ matrix.rust }}
|
||||||
|
- uses: swatinem/rust-cache@v2
|
||||||
|
- run: cargo test --workspace
|
||||||
|
- run: cargo test --workspace --no-default-features
|
||||||
|
- run: cargo test --workspace --examples --bins
|
||||||
|
- run: cargo test --workspace --no-default-features --examples --bins
|
||||||
|
|
81
.github/workflows/ci.yml
vendored
81
.github/workflows/ci.yml
vendored
|
@ -1,81 +0,0 @@
|
||||||
# A lot of this has been copied from https://github.com/axodotdev/cargo-dist/blob/main/.github/workflows/ci.yml
|
|
||||||
|
|
||||||
name: MinedMap Rust CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
push:
|
|
||||||
|
|
||||||
env:
|
|
||||||
RUSTFLAGS: -Dwarnings
|
|
||||||
RUSTDOCFLAGS: -Dwarnings
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
fmt:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: dtolnay/rust-toolchain@master
|
|
||||||
with:
|
|
||||||
# Use beta for now for let-else formatting
|
|
||||||
toolchain: beta
|
|
||||||
components: rustfmt
|
|
||||||
- run: cargo fmt --all -- --check
|
|
||||||
|
|
||||||
clippy:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: dtolnay/rust-toolchain@master
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
components: clippy
|
|
||||||
- uses: swatinem/rust-cache@v2
|
|
||||||
- uses: actions-rs/clippy-check@v1
|
|
||||||
env:
|
|
||||||
PWD: ${{ env.GITHUB_WORKSPACE }}
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
args: --workspace --tests --examples
|
|
||||||
|
|
||||||
docs:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
env:
|
|
||||||
RUSTDOCFLAGS: -Dwarnings
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@master
|
|
||||||
- uses: dtolnay/rust-toolchain@master
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
components: rust-docs
|
|
||||||
- uses: swatinem/rust-cache@v2
|
|
||||||
- run: cargo doc --workspace --no-deps --document-private-items
|
|
||||||
|
|
||||||
test:
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest, windows-latest, macOS-latest]
|
|
||||||
rust: [stable]
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@master
|
|
||||||
- uses: dtolnay/rust-toolchain@master
|
|
||||||
with:
|
|
||||||
toolchain: ${{ matrix.rust }}
|
|
||||||
- uses: swatinem/rust-cache@v2
|
|
||||||
# Run the tests/doctests (default features)
|
|
||||||
- run: cargo test --workspace
|
|
||||||
env:
|
|
||||||
PWD: ${{ env.GITHUB_WORKSPACE }}
|
|
||||||
# Run the tests/doctests (no default features)
|
|
||||||
- run: cargo test --workspace --no-default-features
|
|
||||||
env:
|
|
||||||
PWD: ${{ env.GITHUB_WORKSPACE }}
|
|
||||||
# Test the examples (default features)
|
|
||||||
- run: cargo test --workspace --examples --bins
|
|
||||||
env:
|
|
||||||
PWD: ${{ env.GITHUB_WORKSPACE }}
|
|
||||||
# Test the examples (no default features)
|
|
||||||
- run: cargo test --workspace --no-default-features --examples --bins
|
|
||||||
env:
|
|
||||||
PWD: ${{ env.GITHUB_WORKSPACE }}
|
|
Loading…
Add table
Reference in a new issue