Skip to content

Commit

Permalink
test features
Browse files Browse the repository at this point in the history
  • Loading branch information
amrbashir committed Nov 11, 2024
1 parent 8465bf7 commit 1d9d615
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@ jobs:
- { id: windows, target: x86_64-pc-windows-msvc, os: windows-latest }
# Ubuntu with default features
- { id: ubuntu, target: x86_64-unknown-linux-gnu, os: ubuntu-latest }
# Ubuntu without features
- {
id: ubuntu-without-feat,
target: x86_64-unknown-linux-gnu,
os: ubuntu-latest,
options: --no-default-features,
}
# macOS
- { id: macos, target: x86_64-apple-darwin, os: macos-latest }
# Android on Ubuntu
Expand All @@ -30,13 +23,17 @@ jobs:
}
# iOS on Ubuntu
- { id: ios, target: aarch64-apple-ios, os: macos-latest }
features:
- "" # default features
- "serde" # serde + default features
- "rwh_04,rwh_05,rwh_06" # rwh features

env:
RUST_BACKTRACE: 1
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0"
OPTIONS: ${{ matrix.platform.options }}
FEATURES: ${{ format(',{0}', matrix.platform.features ) }}
FEATURES: ${{ format(',{0}', matrix.features ) }}
CMD: ${{ matrix.platform.cmd }}

runs-on: ${{ matrix.platform.os }}
Expand All @@ -59,11 +56,6 @@ jobs:
sudo apt-get update
sudo apt-get install -y libgtk-3-dev
- name: Install ayatana-libappindicator (ubuntu[default/tray] only)
if: matrix.platform.id == 'ubuntu'
run: |
sudo apt-get install -y libayatana-appindicator3-dev
- name: Install GCC Multilib
if: (matrix.platform.os == 'ubuntu-latest') && contains(matrix.platform.target, 'i686')
run: sudo apt-get install gcc-multilib
Expand Down Expand Up @@ -93,18 +85,18 @@ jobs:

- name: Build with all features enabled
shell: bash
run: cargo $CMD build --verbose --target ${{ matrix.platform.target }} $OPTIONS --features serde,$FEATURES
run: cargo $CMD build --verbose --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES

- name: Build tests with all features enabled
shell: bash
run: cargo $CMD test --no-run --verbose --target ${{ matrix.platform.target }} $OPTIONS --features serde,$FEATURES
run: cargo $CMD test --no-run --verbose --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES

- name: Run tests with all features enabled
shell: bash
if: (
!contains(matrix.platform.target, 'android') &&
!contains(matrix.platform.target, 'ios'))
run: cargo $CMD test --verbose --target ${{ matrix.platform.target }} $OPTIONS --features serde,$FEATURES
run: cargo $CMD test --verbose --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES

- uses: dtolnay/rust-toolchain@nightly
if: (
Expand All @@ -119,7 +111,7 @@ jobs:
!contains(matrix.platform.target, 'android') &&
!contains(matrix.platform.target, 'ios'))
shell: bash
run: cargo +nightly miri test --target ${{ matrix.platform.target }} $OPTIONS --features serde,$FEATURES
run: cargo +nightly miri test --target ${{ matrix.platform.target }} $OPTIONS --features $FEATURES

test_tao_macros:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 1d9d615

Please sign in to comment.