diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bbd67d8..2741656 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,9 +46,6 @@ jobs: - build: macos os: macos-latest rust: stable - - build: win-msvc - os: windows-latest - rust: stable steps: - name: Checkout repository uses: actions/checkout@v4 @@ -57,20 +54,30 @@ jobs: with: toolchain: ${{ matrix.rust }} - run: cargo build --verbose - - run: cargo doc --features serde --verbose + - run: cargo doc --features serde,static --verbose + - run: cargo test --verbose --lib --profile testrelease + - run: cargo test --verbose --test integration --profile testrelease + - run: ./test + + # Test for Windows. We test fewer configurations here because it just + # takes forever otherwise. + win-msvc: + runs-on: windows-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Install Rust + uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + - run: cargo build --verbose + - run: cargo doc --features serde,static --verbose - run: cargo test --verbose --all - # Skip on Windows because it takes freaking forever. - - if: matrix.build != 'win-msvc' - run: cargo test --verbose --lib --profile testrelease - - if: matrix.build != 'win-msvc' - run: cargo test --verbose --test integration --profile testrelease - - if: matrix.build != 'win-msvc' - run: ./test # Tests for stable-x86_64-gnu. It's different enough from the "main" targets # to warrant its own section. The main problem is that it is just # annoyingly slow. Like, twice as slow as the next slowest runner. So we - # run a stripped down version of tests. + # run a stripped down version (even more so than msvc) of tests. win-gnu: runs-on: windows-latest steps: @@ -81,7 +88,7 @@ jobs: with: toolchain: stable-x86_64-gnu - run: cargo build --verbose - - run: cargo doc --features serde --verbose + - run: cargo doc --features serde,static --verbose - run: cargo test --verbose --lib - run: cargo test --verbose --test integration @@ -108,7 +115,7 @@ jobs: - name: Build jiff-tzdb-platform run: cargo build -p jiff-tzdb-platform --verbose - name: Build docs - run: cargo doc --features serde --verbose + run: cargo doc --features serde,static --verbose # NOTE: We currently don't track some ecosystem integration crates # like `jiff-icu`. They don't support Jiff's MSRV at time of writing # (2025-02-02), and I think these sorts of integration crates are at very diff --git a/test b/test index 36d0711..4d5ba06 100755 --- a/test +++ b/test @@ -1,5 +1,12 @@ #!/bin/bash +# This script is used to run a more exhaustive set of tests than what just +# `cargo test` or even `cargo test --all` will do. Specifically, we run tests +# under a number of different feature configurations. +# +# This is practically necessary because it is very easy to accidentally break +# a particular feature combination, especially `--no-default-features`. + set -e # cd to the directory containing this crate's Cargo.toml so that we don't need @@ -10,7 +17,7 @@ cd "$(dirname "$0")" # features. We don't test the complete space, since the complete space is quite # large. echo "===== DEFAULT FEATURES =====" -cargo test +cargo test --all echo "===== DEFAULT FEATURES WITH STATIC =====" cargo test --features static