Skip to content

Commit

Permalink
Update to tz-rs v0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Kijewski committed Sep 15, 2024
1 parent 568dbb6 commit 70d267c
Show file tree
Hide file tree
Showing 27 changed files with 210 additions and 250 deletions.
43 changes: 0 additions & 43 deletions .github/actions/setup-rust/action.yaml

This file was deleted.

101 changes: 59 additions & 42 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,63 +3,54 @@ name: CI
on:
push:
branches:
- main
- v0.1.x
- v0.2.x
- v0.3.x
- v0.4.x
- v0.5.x
- v0.6.x
- v0.7.x
pull_request:
branches:
- main
- v0.1.x
- v0.2.x
- v0.3.x
- v0.4.x
- v0.5.x
- v0.6.x
- v0.7.x
schedule:
- cron: "58 7 * * 3"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
fmt:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Rust
uses: ./.github/actions/setup-rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: rustfmt

- run: cargo fmt --all -- --check

lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
toolchain:
- "1.56"
- "1.81"
- stable
- nightly
versions:
- ""
- "-Zminimal-versions"

runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Rust
uses: ./.github/actions/setup-rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
components: clippy
Expand All @@ -73,31 +64,38 @@ jobs:
- run: cargo clippy --workspace --all-targets -- -D warnings

clippy-pedantic:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
matrix:
package:
- tzdb
- tzdb_data
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Rust
uses: ./.github/actions/setup-rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: clippy

- run: cargo clippy --workspace --all-targets -- -D clippy::pedantic
- run: cargo clippy --package ${{ matrix.package }} --all-targets -- -D clippy::pedantic

test:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Rust
uses: ./.github/actions/setup-rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: clippy

- run: cargo check --workspace --all-targets
Expand All @@ -108,15 +106,15 @@ jobs:

miri:
name: "Miri"
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Rust
uses: ./.github/actions/setup-rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: miri
Expand All @@ -128,6 +126,7 @@ jobs:
run: cd testing && cargo miri test --workspace --all-targets

cross-miri:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
Expand All @@ -137,16 +136,14 @@ jobs:
- powerpc-unknown-linux-gnu
- powerpc64-unknown-linux-gnu
- powerpc64le-unknown-linux-gnu

runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Rust
uses: ./.github/actions/setup-rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: miri
Expand All @@ -156,42 +153,37 @@ jobs:
run: cargo miri test --workspace --target ${{ matrix.target }}

doc:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Rust
uses: ./.github/actions/setup-rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: rust-docs
components: miri

- run: cargo doc --workspace --all-features --no-deps
env:
RUSTDOCFLAGS: -D warnings --cfg docsrs
RUSTDOCFLAGS: -Z unstable-options --generate-link-to-definition --cfg=docsrs -D warnings

audit:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Rust
uses: ./.github/actions/setup-rust

- name: Audit
uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
uses: EmbarkStudios/cargo-deny-action@v2

devskim:
name: DevSkim
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
Expand All @@ -209,3 +201,28 @@ jobs:
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: devskim-results.sarif

typos:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: crate-ci/typos@master

feature-powerset:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly

- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack

- name: Check feature-powerset
run: cargo hack --workspace --feature-powerset check
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Changes between the versions

### 0.7.0 (2024-09-15)

* Update to tz-rs v0.7.0

### 0.6.1 (2023-12-30)

* Split into `tzdb` and `tzdb_data`
Expand Down
30 changes: 2 additions & 28 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,33 +1,7 @@
[package]
name = "tzdb"
version = "0.6.1"
edition = "2018"
authors = ["René Kijewski <[email protected]>"]
repository = "https://github.com/Kijewski/tzdb"
description = "Static time zone information for tz-rs"
license = "Apache-2.0"
keywords = ["date", "time", "timezone", "zone", "calendar"]
categories = ["date-and-time"]
readme = "README.md"
# rust-version = "1.56"

[dependencies]
iana-time-zone = { version = "^0.1.50", default-features = false, features = ["fallback"], optional = true }
tzdb_data = { version = "^0.1.0", default-features = false, path = "tzdb_data" }
tz-rs = { version = "^0.6.14", default-features = false, features = ["const", "std"] }

[features]
default = ["local"]
# Enable functions to query the current system time:
local = ["iana-time-zone"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[workspace]
members = [
".",
"examples/current-time",
"tzdb",
"tzdb_data",
]
resolver = "2"
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# tzdb — Time Zone Database

[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/Kijewski/tzdb/ci.yml?branch=v0.6.x&style=for-the-badge)](https://github.com/Kijewski/tzdb/actions/workflows/ci.yml)
[![Crates.io](https://img.shields.io/crates/v/tzdb?logo=rust&style=for-the-badge)](https://crates.io/crates/tzdb)
![Minimum supported Rust version](https://img.shields.io/badge/rustc-1.56+-important?logo=rust&style=for-the-badge "Minimum Supported Rust Version: 1.56")
[![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-informational?logo=apache&style=for-the-badge)](https://github.com/Kijewski/tzdb/blob/v0.6.1/LICENSE.md "License: Apache-2.0")
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/Kijewski/tzdb/ci.yml?branch=v0.7.x&style=flat-square&logo=github&logoColor=white "GitHub Workflow Status")](https://github.com/Kijewski/tzdb/actions/workflows/ci.yml)
[![Crates.io](https://img.shields.io/crates/v/tzdb?logo=rust&style=flat-square "Crates.io")](https://crates.io/crates/tzdb)
[![docs.rs](https://img.shields.io/docsrs/tzdb?logo=docsdotrs&style=flat-square&logoColor=white "docs.rs")](https://docs.rs/tzdb/)
![Minimum supported Rust version](https://img.shields.io/badge/rustc-1.81+-important?logo=rust&style=flat-square "Minimum Supported Rust Version: 1.81")
[![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-informational?logo=apache&style=flat-square)](https://github.com/Kijewski/tzdb/blob/v0.6.1/LICENSE.md "License: Apache-2.0")

Static time zone information for [tz-rs](https://crates.io/crates/tz-rs).

Expand Down
1 change: 1 addition & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

| Version | Supported |
| :-----: | :----------------: |
| 0.7.x | :white_check_mark: |
| 0.6.x | :white_check_mark: |
| 0.5.x | :white_check_mark: |
| 0.4.x | :white_check_mark: |
Expand Down
14 changes: 14 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[default]
locale = "en-us"

[files]
extend-exclude = [
# hidden files
".*",
# generated files
"tzdb_data/src/generated/*",
]

[default.extend-words]
# a suffix, as in "2nd"
nd = "nd"
16 changes: 8 additions & 8 deletions benchmarks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ authors = ["René Kijewski <[email protected]>"]
repository = "https://github.com/Kijewski/tzdb"
description = "… benchmarking …"
license = "Apache-2.0"
# rust-version = "1.56"
rust-version = "1.81.0"
publish = false

[dependencies]
chrono-tz = { version = "0.8", features = ["case-insensitive"] }
chrono-tz = { version = "0.10.0", features = ["case-insensitive"] }
tzdb_data = { path = "../tzdb_data" }

[dev-dependencies]
criterion = { version = "0.5", default-features = false, features = ["html_reports"] }
minstant = "0.1"
rand = { version = "0.8", default-features = false, features = ["std"] }
rand_xoshiro = "0.6"
test-strategy = "0.3"
structmeta = "0.2"
criterion = { version = "0.5.1", default-features = false, features = ["html_reports"] }
minstant = "0.1.7"
rand = { version = "0.8.5", default-features = false, features = ["std"] }
rand_xoshiro = "0.6.0"
test-strategy = "0.4.0"
structmeta = "0.3.0"

[[bench]]
name = "by-name"
Expand Down
Loading

0 comments on commit 70d267c

Please sign in to comment.