Skip to content

Commit

Permalink
Turns out the other if syntax is better after all (does not freak o…
Browse files Browse the repository at this point in the history
…ut about starting with `!` at least.
  • Loading branch information
ygoldfeld committed Dec 21, 2023
1 parent 47a21c4 commit bac0f88
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 25 deletions.
72 changes: 48 additions & 24 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -352,14 +352,16 @@ jobs:
submodules: true

- name: Install clang compiler
if: matrix.compiler.install && (matrix.compiler.name == 'clang')
if: |
matrix.compiler.install && (matrix.compiler.name == 'clang')
run: |
wget https://apt.llvm.org/llvm.sh
chmod u+x llvm.sh
sudo ./llvm.sh ${{ matrix.compiler.version }}
- name: Install gcc compiler
if: matrix.compiler.install && (matrix.compiler.name == 'gcc')
if: |
matrix.compiler.install && (matrix.compiler.name == 'gcc')
run: |
sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
Expand All @@ -376,7 +378,8 @@ jobs:
pip install "conan<2"
- name: Add custom settings for Conan packages
if: matrix.build-test-cfg.conan-custom-settings-defs
if: |
matrix.build-test-cfg.conan-custom-settings-defs
run: |
conan config init
pip install PyYAML
Expand Down Expand Up @@ -475,7 +478,8 @@ jobs:
# and lastly we can put the specific failures on the ignore-list for MSAN. For now we do that; while
# unpleasant it does get the job done. TODO: Revisit/resolve tickets/improve (see above).
- name: Prepare MSAN sanitizer compile-time config file(s)
if: (!cancelled()) && (matrix.build-test-cfg.sanitizer-name == 'msan')
if: |
(!cancelled()) && (matrix.build-test-cfg.sanitizer-name == 'msan')
run: |
cat <<'EOF' > $${ env.msan-ignore-list-cfg-file }}
[memory]
Expand Down Expand Up @@ -554,7 +558,8 @@ jobs:
# *any* suppression; otherwise we skip it for brevity. `find . -name 'suppressions*.cfg` is pretty useful
# to determine their presence in addition to whether the test itself has its specific suppressions of any kind.
- name: Run link test [`ipc_core` - Flow-IPC Core]
if: !cancelled()
if: |
!cancelled()
run: |
cd ${{ env.install-dir }}/bin
mkdir -p logs/ipc_core_link_test
Expand All @@ -565,7 +570,8 @@ jobs:
./ipc_core_link_test.exec > logs/ipc_core_link_test/console.log 2>&1
- name: Run link test [`ipc_transport_structured` - Flow-IPC Structured Transport]
if: !cancelled()
if: |
!cancelled()
run: |
cd ${{ env.install-dir }}/bin
mkdir -p logs/ipc_transport_structured_link_test
Expand All @@ -576,7 +582,8 @@ jobs:
./ipc_transport_structured_link_test.exec > logs/ipc_transport_structured_link_test/console.log 2>&1
- name: Run link test [`ipc_session` - Flow-IPC Sessions]
if: !cancelled()
if: |
!cancelled()
run: |
cd ${{ env.install-dir }}/bin
mkdir -p logs/ipc_session_link_test
Expand All @@ -589,7 +596,8 @@ jobs:
./ipc_session_link_test_cli.exec > logs/ipc_session_link_test/cli.console.log 2>&1
- name: Run link test [`ipc_shm` - Flow-IPC Shared Memory]
if: !cancelled()
if: |
!cancelled()
run: |
cd ${{ env.install-dir }}/bin
mkdir -p logs/ipc_shm_link_test
Expand All @@ -602,7 +610,8 @@ jobs:
./ipc_shm_link_test_cli.exec > logs/ipc_shm_link_test/cli.console.log 2>&1
- name: Run link test [`ipc_shm_arena_lend` - Flow-IPC SHM-jemalloc]
if: !cancelled()
if: |
!cancelled()
run: |
cd ${{ env.install-dir }}/bin
mkdir -p logs/ipc_shm_arena_lend_link_test
Expand All @@ -621,7 +630,8 @@ jobs:
./ipc_shm_arena_lend_link_test_cli.exec > logs/ipc_shm_arena_lend_link_test/cli.console.log 2>&1
- name: Run unit tests
if: !cancelled()
if: |
!cancelled()
run: |
cd ${{ env.install-dir }}/bin
# Some newline issues with the possible additional args; so need to make a wrapper script
Expand Down Expand Up @@ -654,7 +664,8 @@ jobs:

# This follows the instructions in bin/transport_test/README.txt.
- name: Prepare run script for [transport_test - Scripted mode] variations below
if: !cancelled()
if: |
!cancelled()
run: |
cat <<'EOF' > ${{ env.install-dir }}/bin/run_transport_test_sc.sh
echo "Log level: [$1]."
Expand Down Expand Up @@ -682,14 +693,16 @@ jobs:
- name: Run integration test [transport_test - Scripted mode]
id: transport_test_scripted
if: !cancelled()
if: |
!cancelled()
run: |
/usr/bin/bash -e \
${{ env.install-dir }}/bin/run_transport_test_sc.sh \
info
- name: Re-run with increased logging, on failure only
if: (!cancelled()) && (steps.transport_test_scripted.outcome == 'failure')
if: |
(!cancelled()) && (steps.transport_test_scripted.outcome == 'failure')
run: |
/usr/bin/bash -e \
${{ env.install-dir }}/bin/run_transport_test_sc.sh \
Expand All @@ -701,7 +714,8 @@ jobs:
# the ipc::session safety model for estabshing IPC conversations (sessions).

- name: Prepare IPC-session safety-friendly run-time environment for [transport_test - Exercise mode]
if: !cancelled()
if: |
!cancelled()
run: |
mkdir -p ~/bin/ex_srv_run ~/bin/ex_cli_run
mkdir -p /tmp/var/run
Expand All @@ -710,7 +724,8 @@ jobs:
cp -v ~/bin/ex_srv.exec ~/bin/ex_cli.exec
- name: Prepare run script for [transport_test - Exercise mode] variations below
if: !cancelled()
if: |
!cancelled()
run: |
cat <<'EOF' > ${{ env.install-dir }}/bin/run_transport_test_ex.sh
# Script created by pipeline during job.
Expand Down Expand Up @@ -749,29 +764,33 @@ jobs:
- name: Run integration test [transport_test - Exercise mode - Heap sub-mode]
id: transport_test_ex_heap
if: !cancelled()
if: |
!cancelled()
run: |
/usr/bin/bash -e \
${{ env.install-dir }}/bin/run_transport_test_ex.sh \
info heap
- name: Re-run with increased logging, on failure only
if: (!cancelled()) && (steps.transport_test_ex_heap.outcome == 'failure')
if: |
(!cancelled()) && (steps.transport_test_ex_heap.outcome == 'failure')
run: |
/usr/bin/bash -e \
${{ env.install-dir }}/bin/run_transport_test_ex.sh \
data heap_log_level_data
- name: Run integration test [transport_test - Exercise mode - SHM-classic sub-mode]
id: transport_test_ex_shm_c
if: !cancelled()
if: |
!cancelled()
run: |
/usr/bin/bash -e \
${{ env.install-dir }}/bin/run_transport_test_ex.sh \
info shm_classic -shm-c
- name: Re-run with increased logging, on failure only
if: (!cancelled()) && (steps.transport_test_ex_shm_c.outcome == 'failure')
if: |
(!cancelled()) && (steps.transport_test_ex_shm_c.outcome == 'failure')
run: |
/usr/bin/bash -e \
${{ env.install-dir }}/bin/run_transport_test_ex.sh \
Expand Down Expand Up @@ -804,22 +823,25 @@ jobs:
# reduce optimization to -O1, as well as with and without LTO; same result.
- name: Run integration test [transport_test - Exercise mode - SHM-jemalloc sub-mode]
id: transport_test_ex_shm_j
if: (!cancelled()) && ((matrix.compiler.id != 'clang-17') || (matrix.build-test-cfg.sanitizer-name != 'tsan'))
if: |
(!cancelled()) && ((matrix.compiler.id != 'clang-17') || (matrix.build-test-cfg.sanitizer-name != 'tsan'))
run: |
/usr/bin/bash -e \
${{ env.install-dir }}/bin/run_transport_test_ex.sh \
info shm_jemalloc -shm-j
- name: Re-run with increased logging, on failure only
if: (!cancelled()) && (steps.transport_test_ex_shm_j.outcome == 'failure')
if: |
(!cancelled()) && (steps.transport_test_ex_shm_j.outcome == 'failure')
run: |
/usr/bin/bash -e \
${{ env.install-dir }}/bin/run_transport_test_ex.sh \
data shm_jemalloc_log_level_data -shm-j
# See earlier comment block about why we saved all the logs including for console-output-only tests/demos.
- name: Check test/demo logs for non-fatal sanitizer error(s)
if: (!cancelled()) && (matrix.build-test-cfg.sanitizer-name == 'ubsan')
if: |
(!cancelled()) && (matrix.build-test-cfg.sanitizer-name == 'ubsan')
run: |
cd ${{ env.install-dir }}/bin/logs
# grep returns 0 if 1+ found, 1 if none found, 2+ on error. So check results explicitly instead of -e.
Expand All @@ -838,14 +860,16 @@ jobs:
echo 'No errors found in logs.'
- name: Package test/demo logs tarball
if: always()
if: |
always()
run: |
cd ${{ env.install-dir }}/bin
tar cvzf logs.tgz logs
rm -rf logs # Save runner space.
- name: Upload test/demo logs (please inspect if failure(s) seen above)
if: always()
if: |
always()
uses: actions/upload-artifact@v3
with:
name: ipc-test-logs-${{ matrix.compiler.id }}-${{ matrix.build-test-cfg.id }}
Expand Down
2 changes: 1 addition & 1 deletion flow

0 comments on commit bac0f88

Please sign in to comment.