Skip to content

Commit 6411468

Browse files
committed
Squash history
Squash 8428b59 into one commit. Previous squash was 1074af1.
0 parents  commit 6411468

30 files changed

Lines changed: 54579 additions & 0 deletions

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Setup Rust Environment
2+
3+
inputs:
4+
key:
5+
description: Cache key
6+
required: true
7+
toolchain:
8+
description: Pass-through to toolchain on actions-rs
9+
default: stable
10+
required: false
11+
components:
12+
description: Pass-through to components on actions-rs
13+
required: false
14+
15+
runs:
16+
using: composite
17+
steps:
18+
- name: Remove rustfmt
19+
run: rm -f ~/.cargo/bin/rustfmt ~/.cargo/bin/cargo-fmt
20+
shell: bash
21+
22+
- name: Rustup Cache
23+
uses: actions/cache@v3
24+
with:
25+
path: |
26+
~/.rustup/downloads
27+
~/.rustup/toolchains
28+
~/.rustup/update-hashes
29+
key: v5-rustup-${{ runner.os }}
30+
31+
- name: Install Toolchain
32+
uses: dtolnay/rust-toolchain@v1
33+
id: toolchain-install
34+
with:
35+
toolchain: ${{ inputs.toolchain }}
36+
components: ${{ inputs.components }}
37+
38+
- name: Update self
39+
run: rustup self update || true
40+
shell: bash
41+
42+
- name: Update
43+
run: rustup update || true
44+
shell: bash
45+
46+
- name: Build Cache
47+
uses: actions/cache@v3
48+
with:
49+
path: |
50+
~/.cargo/registry/index/
51+
~/.cargo/registry/cache/
52+
~/.cargo/git/db/
53+
~/.cargo/bin/
54+
target/
55+
key: |
56+
v5-${{ inputs.key }}-${{ runner.os }}-${{ inputs.toolchain }}-${{ steps.toolchain-install.outputs.cachekey }}-${{ hashFiles('**/Cargo.toml', 'Cargo.lock') }}
57+
restore-keys: |
58+
v5-${{ inputs.key }}-${{ runner.os }}-${{ inputs.toolchain }}-${{ steps.toolchain-install.outputs.cachekey }}-
59+
v5-${{ inputs.key }}-${{ runner.os }}-${{ inputs.toolchain }}-

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "cargo"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
8+
- package-ecosystem: "github-actions"
9+
directory: "/"
10+
schedule:
11+
interval: "daily"

.github/workflows/ci.yml

Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: ['main', 'v0.1.x']
6+
pull_request:
7+
branches: ['main', 'v0.1.x']
8+
schedule:
9+
- cron: "58 7 * * 3"
10+
11+
jobs:
12+
fmt:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v3
17+
with:
18+
lfs: true
19+
20+
- name: Setup Rust
21+
uses: ./.github/actions/setup-rust
22+
with:
23+
key: fmt
24+
toolchain: nightly
25+
components: rustfmt
26+
27+
- run: cargo +nightly fmt --all -- --check
28+
29+
check:
30+
strategy:
31+
matrix:
32+
toolchain:
33+
- "1.55"
34+
- stable
35+
- nightly
36+
37+
name: "Check/${{ matrix.toolchain }}"
38+
runs-on: ubuntu-latest
39+
steps:
40+
- name: Checkout
41+
uses: actions/checkout@v3
42+
with:
43+
lfs: true
44+
45+
- name: Setup Rust
46+
uses: ./.github/actions/setup-rust
47+
with:
48+
key: check
49+
toolchain: ${{ matrix.toolchain }}
50+
components: clippy
51+
52+
- name: Check
53+
run: cargo +${{ matrix.toolchain }} check --package tzdb --all-targets
54+
55+
- name: Lint
56+
run: cargo +${{ matrix.toolchain }} clippy --package tzdb --all-targets -- -D warnings
57+
58+
test:
59+
strategy:
60+
matrix:
61+
toolchain:
62+
- "1.55"
63+
- stable
64+
- nightly
65+
platform:
66+
- ubuntu-latest
67+
- windows-latest
68+
- macos-latest
69+
70+
name: "Test/${{ matrix.toolchain }} (${{ matrix.platform }})"
71+
runs-on: ${{ matrix.platform }}
72+
steps:
73+
- name: Checkout
74+
uses: actions/checkout@v3
75+
with:
76+
lfs: true
77+
78+
- name: Setup Rust
79+
uses: ./.github/actions/setup-rust
80+
with:
81+
key: test
82+
toolchain: ${{ matrix.toolchain }}
83+
84+
- name: Test
85+
run: cargo +${{ matrix.toolchain }} test --package tzdb --all-targets -- --show-output
86+
87+
minimum-versions:
88+
name: "Minimal versions"
89+
runs-on: ubuntu-latest
90+
steps:
91+
- name: Checkout
92+
uses: actions/checkout@v3
93+
with:
94+
lfs: true
95+
96+
- name: Setup Rust
97+
uses: ./.github/actions/setup-rust
98+
with:
99+
key: minimum-versions
100+
toolchain: nightly
101+
102+
- name: Update lockfile
103+
run: cargo generate-lockfile -Zminimal-versions
104+
105+
- name: Test
106+
run: cargo +nightly test --all-targets -- --show-output
107+
108+
miri:
109+
name: "Miri"
110+
runs-on: ubuntu-latest
111+
steps:
112+
- name: Checkout
113+
uses: actions/checkout@v3
114+
with:
115+
lfs: true
116+
117+
- name: Setup Rust
118+
uses: ./.github/actions/setup-rust
119+
with:
120+
key: miri
121+
toolchain: nightly
122+
components: miri
123+
124+
- name: Test
125+
run: cargo +nightly miri test --package tzdb --all-targets -- --show-output
126+
127+
doc:
128+
name: "Documentation"
129+
runs-on: ubuntu-latest
130+
steps:
131+
- name: Checkout
132+
uses: actions/checkout@v3
133+
with:
134+
lfs: true
135+
136+
- name: Setup Rust
137+
uses: ./.github/actions/setup-rust
138+
with:
139+
key: name
140+
toolchain: nightly
141+
components: rust-docs
142+
143+
- run: RUSTDOCFLAGS="-D warnings" cargo +nightly doc --package tzdb --features docsrs --all-features --no-deps
144+
145+
audit:
146+
name: "Cargo audit"
147+
runs-on: ubuntu-latest
148+
steps:
149+
- name: Checkout
150+
uses: actions/checkout@v3
151+
with:
152+
lfs: true
153+
154+
- name: Setup Rust
155+
uses: ./.github/actions/setup-rust
156+
with:
157+
key: audit
158+
159+
- run: cargo update
160+
161+
- name: Audit
162+
uses: actions-rs/audit-check@v1
163+
with:
164+
token: ${{ secrets.GITHUB_TOKEN }}
165+
166+
powerset:
167+
strategy:
168+
matrix:
169+
toolchain:
170+
- "1.55"
171+
- stable
172+
- nightly
173+
platform:
174+
- ubuntu-latest
175+
176+
name: "Feature powerset/${{ matrix.toolchain }} (${{ matrix.platform }})"
177+
runs-on: ubuntu-latest
178+
steps:
179+
- name: Checkout
180+
uses: actions/checkout@v3
181+
with:
182+
lfs: true
183+
184+
- name: Setup Rust
185+
uses: ./.github/actions/setup-rust
186+
with:
187+
key: powerset
188+
toolchain: ${{ matrix.toolchain }}
189+
190+
- name: Install hack
191+
run: cargo +stable install cargo-hack --force
192+
193+
- name: Powerset
194+
run: cargo +${{ matrix.toolchain }} hack test --feature-powerset --exclude-features docsrs --ignore-private --tests --lib
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: DevSkim
2+
3+
on:
4+
push:
5+
branches: ['main', 'v0.1.x']
6+
pull_request:
7+
branches: ['main', 'v0.1.x']
8+
schedule:
9+
- cron: '24 14 * * 5'
10+
11+
jobs:
12+
lint:
13+
name: DevSkim
14+
runs-on: ubuntu-20.04
15+
permissions:
16+
actions: read
17+
contents: read
18+
security-events: write
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v3
22+
with:
23+
lfs: true
24+
25+
- name: Run DevSkim scanner
26+
uses: microsoft/DevSkim-Action@v1
27+
28+
- name: Upload DevSkim scan results to GitHub Security tab
29+
uses: github/codeql-action/upload-sarif@v2
30+
with:
31+
sarif_file: devskim-results.sarif

.gitignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/target
2+
/tmp
3+
4+
run.cgi
5+
6+
*.pyc
7+
*.swp*
8+
*.nfs*
9+
*~
10+
*.~*
11+
*.tmp
12+
*.old
13+
*.bak
14+
*.orig
15+
*.pid
16+
*.so
17+
*.so.*
18+
*.cpp
19+
*.py[co]
20+
*.egg-info
21+
*.whl
22+
23+
.*
24+
!.git*
25+
!.readthedocs.yaml

CHANGELOG.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
## Changes between the versions
2+
3+
### 0.3.0
4+
5+
* Remove serde-as feature. The feature is very unrelated to goals of the crate, so it should be
6+
moved somewhere else
7+
* Split up `generated.rs` to speed up compilation if not all features are selected
8+
* Reduce msrv to 1.55
9+
10+
### 0.2.7
11+
12+
* Fix error if build and target platform have different pointer widths
13+
14+
### 0.2.6
15+
16+
* Update [iana-time-zone](https://crates.io/crates/iana-time-zone) to implement
17+
[`local_tz()`](https://docs.rs/tzdb/0.2.6/tzdb/fn.local_tz.html) for
18+
Wasm ([#38](https://github.com/strawlab/iana-time-zone/pull/38)), and
19+
{Free,Net,Open,Dragonfly}BSD ([#39](https://github.com/strawlab/iana-time-zone/pull/39))
20+
21+
### 0.2.5
22+
23+
* Ensure `-Zminimal-versions` works
24+
25+
### 0.2.4
26+
27+
* Fix missing import if the project is used with `default-features = false`
28+
29+
### 0.2.3
30+
31+
* Fix lookup error for names containing underscores
32+
33+
### 0.2.2
34+
35+
* Bump dependency versions
36+
37+
### 0.2.1
38+
39+
* Fix typos
40+
* Introduce VERSION and VERSION_HASH
41+
42+
### 0.2.0
43+
44+
* Update to 2022a
45+
* Make the unparsed binary time zone data available
46+
* Simplify the library by removing the trait TimeZoneExt:
47+
48+
* TimeZoneExt::from_db() is now tz_by_name()
49+
* TimeZoneExt::local_from_db() is now local_tz()
50+
* TimeZoneExt::names_in_db() is now TZ_NAMES
51+
52+
### 0.1.3
53+
54+
* Optimize DateTime deserialization to work without dynamic allocation
55+
([tz-rs#22](https://github.com/x-hgg-x/tz-rs/pull/22))
56+
57+
### 0.1.2
58+
59+
* Include “backzone” data to include pre-1970 information for some more time zones
60+
61+
### 0.1.1
62+
63+
* Make UtcDateTime/DateTime serializable with serde using serde_with
64+
65+
### 0.1.0
66+
67+
* Initial release

0 commit comments

Comments
 (0)