From 1d9d61571dca127435bcb3a8cb533e7ebb51c778 Mon Sep 17 00:00:00 2001 From: amrbashir Date: Mon, 11 Nov 2024 19:20:50 +0200 Subject: [PATCH] test features --- .github/workflows/ci.yml | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a2ef204ee..c2674e529 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 }} @@ -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 @@ -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: ( @@ -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