Skip to content

Commit

Permalink
[#349] Harmonize flags for build and test
Browse files Browse the repository at this point in the history
  • Loading branch information
elBoberido committed Oct 17, 2024
1 parent 5159008 commit f2735b7
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,14 @@ iox2_common_build_debug_template: &IOX2_COMMON_BUILD_DEBUG

iox2_common_build_and_test_debug_template: &IOX2_COMMON_BUILD_AND_TEST_DEBUG
<<: *IOX2_COMMON_BUILD_DEBUG
test_script: cargo nextest run --workspace --no-fail-fast
test_script: cargo nextest run --workspace --all-targets --no-fail-fast

iox2_common_build_release_template: &IOX2_COMMON_BUILD_RELEASE
build_script: cargo build --release --workspace --all-targets

iox2_common_build_and_test_no_doc_tests_release_template: &IOX2_COMMON_BUILD_AND_TEST_NO_DOC_TESTS_RELEASE
<<: *IOX2_COMMON_BUILD_RELEASE
test_script: cargo nextest run --release --tests --workspace --no-fail-fast
test_script: cargo nextest run --release --tests --workspace --all-targets --no-fail-fast

iox2_ffi_common_debug_template: &IOX2_FFI_COMMON_DEBUG
ffi_script:
Expand Down Expand Up @@ -140,8 +140,8 @@ only_if: false && ( $CIRRUS_BRANCH == 'main' || ($CIRRUS_PR != '' && $CIRRUS_BAS
# Global environment variables
#

env:
RUSTFLAGS: "-C debug-assertions"
# env:
# RUSTFLAGS: "-C debug-assertions"

#
# Preflight-Check with Ubuntu x86 stable debug
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
pull_request:
branches: [ main, release* ]

env:
RUSTFLAGS: "-C debug-assertions"
# env:
# RUSTFLAGS: "-C debug-assertions"

jobs:
changes:
Expand Down Expand Up @@ -208,7 +208,7 @@ jobs:
run: cargo build --workspace --all-targets ${{ matrix.mode.arg }} --target i686-unknown-linux-gnu

- name: Run cargo nextest
run: cargo nextest run --workspace --no-fail-fast ${{ matrix.mode.arg }} --target i686-unknown-linux-gnu
run: cargo nextest run --workspace --all-targets --no-fail-fast ${{ matrix.mode.arg }} --target i686-unknown-linux-gnu

- name: Build language bindings
run: |
Expand Down Expand Up @@ -313,7 +313,7 @@ jobs:
run: cargo build --workspace --all-targets ${{ matrix.mode.arg }}

- name: Run cargo nextest
run: cargo nextest run --workspace --no-fail-fast ${{ matrix.mode.arg }}
run: cargo nextest run --workspace --all-targets --no-fail-fast ${{ matrix.mode.arg }}

- name: Build iceoryx_hoofs on Windows
if: ${{ matrix.os == 'windows-latest' }}
Expand Down Expand Up @@ -401,7 +401,7 @@ jobs:
run: cargo build --workspace --all-targets ${{ matrix.mode.arg }}

- name: Run cargo nextest
run: cargo nextest run --workspace --no-fail-fast ${{ matrix.mode.arg }}
run: cargo nextest run --workspace --all-targets --no-fail-fast ${{ matrix.mode.arg }}

### TODO: does not work yet reliable on the GitHub CI, seems to end up in an infinite loop
### current alternative is a cirrus.yml aarch64 target
Expand All @@ -427,7 +427,7 @@ jobs:
# cargo fmt --all -- --check
# cargo clippy -- -D warnings
# cargo build --workspace --all-targets ${{ matrix.mode }}
# cargo test --workspace --no-fail-fast ${{ matrix.mode }}
# cargo test --workspace --all-targets --no-fail-fast ${{ matrix.mode }}

freebsd:
needs: [preflight-check, static-code-analysis]
Expand Down
4 changes: 2 additions & 2 deletions internal/scripts/ci_build_and_test_freebsd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ cd $(git rev-parse --show-toplevel)
export PATH=$PATH:$HOME/.cargo/bin
export LIBCLANG_PATH=/usr/local/llvm15/lib/
rustup default $RUST_TOOLCHAIN
export RUSTFLAGS="-C debug-assertions"
# export RUSTFLAGS="-C debug-assertions"
cargo fmt --all -- --check
cargo clippy -- -D warnings

Expand All @@ -68,7 +68,7 @@ echo "######################"
echo "# Run cargo nextest #"
echo "#####################"

cargo nextest run --workspace --no-fail-fast $RUST_BUILD_TYPE_FLAG
cargo nextest run --workspace --all-targets --no-fail-fast $RUST_BUILD_TYPE_FLAG

echo "###########################################################"
echo "# Clean the target directory to reduce memory usage on VM #"
Expand Down
2 changes: 1 addition & 1 deletion internal/scripts/generate-cov-report.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ cleanup() {
}

generate_profile() {
cargo test --workspace -- --test-threads=1
cargo test --workspace --all-targets -- --test-threads=1
}

merge_report() {
Expand Down

0 comments on commit f2735b7

Please sign in to comment.