Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update CI workflow and dependencies #1

Merged
merged 1 commit into from
Aug 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: CI

on:
push:
branches:
- main
tags:
- "*"
pull_request:
paths:
- "nusamai-*/**"
- ".github/**"
- "*"
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10
RUST_BACKTRACE: short
ACTION_LOG_DISABLE: true

jobs:
check:
name: cargo check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Check
run: cargo check --all

style:
name: cargo fmt
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: rustfmt
run: cargo fmt --all -- --check

warnings:
runs-on: ubuntu-latest
needs: check
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: rustfmt
run: cargo clippy --all -- -D warnings

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Run tests
run: cargo test --workspace --all-targets --all-features
35 changes: 0 additions & 35 deletions .github/workflows/test.yml

This file was deleted.

11 changes: 11 additions & 0 deletions .taplo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# https://taplo.tamasfe.dev/configuration/formatter-options.html
include = ["Cargo.toml", "*/Cargo.toml"]

[formatting]
trailing_newline = true
reorder_keys = true
align_comments = false
allowed_blank_lines = 1
array_auto_collapse = false
array_auto_expand = false
reorder_arrays = true
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[package]
name = "cesiumtiles"
authors = ["MIERUNE Inc. <[email protected]>", "Re:Earth Flow Contributors"]
edition = "2021"
authors = ["MIERUNE Inc. <[email protected]>"]
license = "MIT"
name = "cesiumtiles"

[dependencies]
serde = { version = "1.0.197", features = ["derive"] }
serde_json = { version = "1.0.114", features = ["indexmap", "float_roundtrip"] }
serde_repr = "0.1.18"
serde = { version = "1.0.208", features = ["derive"] }
serde_json = { version = "1.0.125", features = ["float_roundtrip", "indexmap"] }
serde_repr = "0.1.19"

[dev-dependencies]
glob = "0.3.1"
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# 3D Tiles 1.1 (JSON models) for Rust

[![Test](https://github.com/MIERUNE/cesiumtiles-rs/actions/workflows/test.yml/badge.svg)](https://github.com/MIERUNE/cesiumtiles-rs/actions/workflows/test.yml)
[![codecov](https://codecov.io/gh/MIERUNE/cesiumtiles-rs/graph/badge.svg?token=cREJynPKKY)](https://codecov.io/gh/MIERUNE/cesiumtiles-rs)

WIP
3 changes: 3 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[toolchain]
channel = "stable"
components = ["rustc", "cargo", "clippy", "rustfmt", "rust-src"]
7 changes: 7 additions & 0 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Stable options
use_field_init_shorthand = true

# # Unstable options
# unstable_features = true
# group_imports = "StdExternalCrate"
# imports_granularity = "Crate"
3 changes: 0 additions & 3 deletions tests/gltf_extensions.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
use std::io::BufReader;
use std::io::Read;

use serde::{Deserialize, Serialize};

use cesiumtiles::gltf_extensions::gltf;
Expand Down