Skip to content

Commit

Permalink
Test build for feature resolver version 1
Browse files Browse the repository at this point in the history
  • Loading branch information
daxpedda committed Dec 8, 2024
1 parent 104de2f commit 7d1930d
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 2 deletions.
61 changes: 60 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:

defaults:
run:
working-directory: minimal-versions
working-directory: tests-crates/minimal-versions

strategy:
fail-fast: false
Expand Down Expand Up @@ -146,3 +146,62 @@ jobs:
cargo update -p proc-macro2 --precise 1.0.60
- name: Build
run: cargo build ${{ matrix.features.features }} --target ${{ matrix.target.target }}

resolver:
name:
Feature resolver version 1 ${{ matrix.target.description }} ${{ matrix.rust.description }} ${{
matrix.features.description }}

runs-on: ubuntu-latest

defaults:
run:
working-directory: tests-crates/resolver

strategy:
fail-fast: false
matrix:
target:
- { target: x86_64-unknown-linux-gnu, description: Native }
- { target: wasm32-unknown-unknown, description: Web }
- { target: wasm32v1-none, description: Wasm v1 }
rust:
- { version: "1.60", description: MSRV }
- { version: stable }
- { version: nightly }
features:
- { features: "", no_std: false }
- { features: --features serde, no_std: false, description: (`serde`) }
- { features: --no-default-features, no_std: true, description: (`no_std`) }
- {
features: --no-default-features --features serde,
no_std: true,
description: "(`no_std`, `serde`)",
}
exclude:
- target: { target: x86_64-unknown-linux-gnu, description: Native }
rust: { version: nightly }
- target: { target: wasm32-unknown-unknown, description: Web }
rust: { version: nightly }
- target: { target: wasm32v1-none, description: Wasm v1 }
rust: { version: "1.60" }
- target: { target: wasm32v1-none, description: Wasm v1 }
rust: { version: stable }
- target: { target: wasm32v1-none, description: Wasm v1 }
features: { no_std: false }

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
run: |
rustup toolchain install ${{ matrix.rust.version }} --profile minimal --target ${{ matrix.target.target }}
rustup default ${{ matrix.rust.version }}
- name: Fix MSRV dependencies
if: matrix.rust.version == '1.60'
run: |
cargo update -p bumpalo --precise 3.14.0
cargo update -p serde --precise 1.0.210
cargo update -p syn --precise 2.0.67
- name: Build
run: cargo build ${{ matrix.features.features }} --target ${{ matrix.target.target }}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ serde = ["web-time/serde"]
std = ["web-time/std"]

[dependencies]
web-time = { path = "..", default-features = false }
web-time = { path = "../..", default-features = false }
File renamed without changes.
2 changes: 2 additions & 0 deletions tests-crates/resolver/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/target
/Cargo.lock
17 changes: 17 additions & 0 deletions tests-crates/resolver/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[workspace]

[package]
edition = "2021"
name = "resolver"
publish = false
resolver = "1"
rust-version = "1.60"
version = "0.0.0"

[features]
default = ["web-time/default"]
serde = ["web-time/serde"]
std = ["web-time/std"]

[dependencies]
web-time = { path = "../..", default-features = false }
3 changes: 3 additions & 0 deletions tests-crates/resolver/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
//! Testing feature resolver version 1.
#![cfg_attr(not(feature = "std"), no_std)]

0 comments on commit 7d1930d

Please sign in to comment.