test the feature matrix exhaustively #171
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: [push, pull_request] | |
| name: CI | |
| jobs: | |
| rustfmt: | |
| name: "Rustfmt (${{ matrix.crate && matrix.crate || 'base' }})" | |
| runs-on: ${{ matrix.config.os }} | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| config: | |
| - { os: ubuntu-latest, target: 'x86_64-unknown-linux-gnu' } | |
| crate: [null, "derive"] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| target: ${{ matrix.config.target }} | |
| override: true | |
| - uses: actions-rs/cargo@v1 | |
| with: | |
| command: fmt | |
| args: --check | |
| clippy: | |
| name: "Clippy (${{ matrix.crate && matrix.crate || 'base' }})" | |
| runs-on: ${{ matrix.config.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - { os: ubuntu-latest, target: 'x86_64-unknown-linux-gnu' } | |
| crate: [null, "derive"] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| target: ${{ matrix.config.target }} | |
| override: true | |
| - uses: actions-rs/cargo@v1 | |
| with: | |
| command: clippy | |
| args: ${{ matrix.crate && format(' --manifest-path {0}/Cargo.toml', matrix.crate) }} | |
| test_all: | |
| name: TestAll | |
| runs-on: ${{ matrix.config.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - { os: ubuntu-latest, target: 'x86_64-unknown-linux-gnu' } | |
| - { os: macos-latest, target: 'x86_64-apple-darwin' } | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| target: ${{ matrix.config.target }} | |
| override: true | |
| - uses: actions-rs/cargo@v1 | |
| with: | |
| command: test | |
| args: --all-features | |
| test_feature_matrix: | |
| name: TestFeatures | |
| runs-on: ${{ matrix.config.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - { os: ubuntu-latest, target: 'x86_64-unknown-linux-gnu' } | |
| backend: ["syn", null] | |
| serde: ["nanoserde", "serde", null] | |
| debug_asserts: ["debug_asserts", null] | |
| debug_diffs: ["debug_diffs", null] | |
| hash: ['rustc_hash', null] | |
| generated_setters: ["generated_setters", null] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| target: ${{ matrix.config.target }} | |
| override: true | |
| - uses: actions-rs/cargo@v1 | |
| with: | |
| command: test | |
| args: ${{ format('--features "{0}"', join(fromJSON(format('["{0}","{1}","{2}","{3}","{4}","{5}"]', matrix.backend || '', matrix.serde || '', matrix.debug_asserts || '', matrix.debug_diffs || '', matrix.hash || '', matrix.generated_setters || '')), ',')) }} | |
| test_min: | |
| name: TestMin | |
| runs-on: ${{ matrix.config.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - { os: ubuntu-latest, target: 'x86_64-unknown-linux-gnu' } | |
| - { os: macos-latest, target: 'x86_64-apple-darwin' } | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| target: ${{ matrix.config.target }} | |
| override: true | |
| - uses: actions-rs/cargo@v1 | |
| with: | |
| command: test | |
| build_release: | |
| name: BuildRelease | |
| runs-on: ${{ matrix.config.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - { os: ubuntu-latest, target: 'x86_64-unknown-linux-gnu' } | |
| - { os: macos-latest, target: 'x86_64-apple-darwin' } | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| target: ${{ matrix.config.target }} | |
| override: true | |
| - uses: actions-rs/cargo@v1 | |
| with: | |
| command: build | |
| args: --release --all-features |