2021-12-02 13:54:29 +00:00
|
|
|
name: make test
|
2020-03-31 15:07:06 +00:00
|
|
|
|
2021-04-07 12:27:58 +00:00
|
|
|
on: [push, pull_request]
|
2020-03-31 15:07:06 +00:00
|
|
|
|
2021-03-22 03:12:33 +00:00
|
|
|
env:
|
|
|
|
CTEST_PARALLEL_LEVEL: "1"
|
2022-01-03 01:47:05 +00:00
|
|
|
CMAKE_BUILD_PARALLEL_LEVEL: "4"
|
2021-03-22 03:12:33 +00:00
|
|
|
|
2022-06-05 00:29:28 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2020-03-31 15:07:06 +00:00
|
|
|
jobs:
|
|
|
|
ubuntu:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2023-09-06 08:13:04 +00:00
|
|
|
- uses: actions/checkout@v4
|
2024-04-28 13:43:42 +00:00
|
|
|
- uses: dtolnay/rust-toolchain@1.70
|
2020-03-31 15:07:06 +00:00
|
|
|
- name: Install deps
|
|
|
|
run: |
|
2024-10-14 09:19:52 +00:00
|
|
|
sudo apt install gettext libpcre2-dev python3-pexpect tmux
|
2021-07-29 15:14:02 +00:00
|
|
|
# Generate a locale that uses a comma as decimal separator.
|
|
|
|
sudo locale-gen fr_FR.UTF-8
|
2020-03-31 15:07:06 +00:00
|
|
|
- name: cmake
|
|
|
|
run: |
|
|
|
|
mkdir build && cd build
|
2024-06-28 02:46:18 +00:00
|
|
|
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
2020-03-31 15:07:06 +00:00
|
|
|
- name: make
|
|
|
|
run: |
|
2024-01-25 23:21:11 +00:00
|
|
|
make VERBOSE=1
|
2020-03-31 15:07:06 +00:00
|
|
|
- name: make test
|
|
|
|
run: |
|
2024-01-25 23:21:11 +00:00
|
|
|
make VERBOSE=1 test
|
2020-03-31 15:07:06 +00:00
|
|
|
|
2024-01-13 13:23:37 +00:00
|
|
|
ubuntu-32bit-static-pcre2:
|
2020-11-11 16:43:50 +00:00
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2023-09-06 08:13:04 +00:00
|
|
|
- uses: actions/checkout@v4
|
2024-04-28 13:43:42 +00:00
|
|
|
- uses: dtolnay/rust-toolchain@1.70
|
2023-01-14 22:56:24 +00:00
|
|
|
with:
|
2024-06-21 17:45:54 +00:00
|
|
|
targets: "i586-unknown-linux-gnu" # rust-toolchain wants this comma-separated
|
2020-11-11 16:43:50 +00:00
|
|
|
- name: Install deps
|
|
|
|
run: |
|
2020-12-20 01:24:11 +00:00
|
|
|
sudo apt update
|
2024-10-14 09:19:52 +00:00
|
|
|
sudo apt install gettext python3-pexpect g++-multilib tmux
|
2020-11-11 16:43:50 +00:00
|
|
|
- name: cmake
|
|
|
|
env:
|
|
|
|
CFLAGS: "-m32"
|
|
|
|
run: |
|
|
|
|
mkdir build && cd build
|
2024-06-21 17:45:54 +00:00
|
|
|
cmake -DFISH_USE_SYSTEM_PCRE2=OFF -DRust_CARGO_TARGET=i586-unknown-linux-gnu ..
|
2020-11-11 16:43:50 +00:00
|
|
|
- name: make
|
|
|
|
run: |
|
2023-01-14 22:56:24 +00:00
|
|
|
make VERBOSE=1
|
2020-11-11 16:43:50 +00:00
|
|
|
- name: make test
|
|
|
|
run: |
|
2024-01-25 23:21:11 +00:00
|
|
|
make VERBOSE=1 test
|
2020-11-11 16:43:50 +00:00
|
|
|
|
2020-11-11 16:46:02 +00:00
|
|
|
ubuntu-asan:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
2023-03-07 00:15:36 +00:00
|
|
|
env:
|
|
|
|
# Rust has two different memory sanitizers of interest; they can't be used at the same time:
|
|
|
|
# * AddressSanitizer detects out-of-bound access, use-after-free, use-after-return,
|
|
|
|
# use-after-scope, double-free, invalid-free, and memory leaks.
|
|
|
|
# * MemorySanitizer detects uninitialized reads.
|
|
|
|
#
|
2023-03-28 04:37:31 +00:00
|
|
|
RUSTFLAGS: "-Zsanitizer=address"
|
2023-03-07 00:15:36 +00:00
|
|
|
# RUSTFLAGS: "-Zsanitizer=memory -Zsanitizer-memory-track-origins"
|
2020-11-11 16:46:02 +00:00
|
|
|
|
|
|
|
steps:
|
2023-09-06 08:13:04 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-08-24 14:37:15 +00:00
|
|
|
# All -Z options require running nightly
|
|
|
|
- uses: dtolnay/rust-toolchain@nightly
|
2023-01-14 22:56:24 +00:00
|
|
|
with:
|
2023-03-07 18:47:30 +00:00
|
|
|
# ASAN uses `cargo build -Zbuild-std` which requires the rust-src component
|
2023-08-24 14:37:15 +00:00
|
|
|
# this is comma-separated
|
2023-03-07 18:47:30 +00:00
|
|
|
components: rust-src
|
2020-11-11 16:46:02 +00:00
|
|
|
- name: Install deps
|
|
|
|
run: |
|
2024-10-14 09:19:52 +00:00
|
|
|
sudo apt install gettext libpcre2-dev python3-pexpect tmux
|
2020-11-11 16:46:02 +00:00
|
|
|
- name: cmake
|
|
|
|
env:
|
|
|
|
CC: clang
|
|
|
|
run: |
|
|
|
|
mkdir build && cd build
|
2023-03-07 00:15:36 +00:00
|
|
|
# Rust's ASAN requires the build system to explicitly pass a --target triple. We read that
|
|
|
|
# value from CMake variable Rust_CARGO_TARGET (shared with corrosion).
|
2024-04-08 06:56:33 +00:00
|
|
|
cmake .. -DASAN=1 -DRust_CARGO_TARGET=x86_64-unknown-linux-gnu -DCMAKE_BUILD_TYPE=Debug
|
2020-11-11 16:46:02 +00:00
|
|
|
- name: make
|
|
|
|
run: |
|
2024-01-25 23:21:11 +00:00
|
|
|
make VERBOSE=1
|
2022-10-24 19:06:23 +00:00
|
|
|
- name: make test
|
2022-10-24 20:00:09 +00:00
|
|
|
env:
|
2022-12-03 01:07:15 +00:00
|
|
|
FISH_CI_SAN: 1
|
2023-05-02 00:59:45 +00:00
|
|
|
ASAN_OPTIONS: check_initialization_order=1:detect_stack_use_after_return=1:detect_leaks=1:fast_unwind_on_malloc=0
|
2022-10-24 19:33:29 +00:00
|
|
|
# use_tls=0 is a workaround for LSAN crashing with "Tracer caught signal 11" (SIGSEGV),
|
|
|
|
# which seems to be an issue with TLS support in newer glibc versions under virtualized
|
|
|
|
# environments. Follow https://github.com/google/sanitizers/issues/1342 and
|
|
|
|
# https://github.com/google/sanitizers/issues/1409 to track this issue.
|
2023-05-01 22:37:44 +00:00
|
|
|
# UPDATE: this can cause spurious leak reports for __cxa_thread_atexit_impl() under glibc.
|
2023-05-02 01:27:38 +00:00
|
|
|
LSAN_OPTIONS: verbosity=0:log_threads=0:use_tls=1:print_suppressions=0
|
2022-10-24 19:06:23 +00:00
|
|
|
run: |
|
2024-01-12 08:22:01 +00:00
|
|
|
llvm_version=$(clang --version | awk 'NR==1 { split($NF, version, "."); print version[1] }')
|
|
|
|
export ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-$llvm_version
|
|
|
|
export LSAN_OPTIONS="$LSAN_OPTIONS:suppressions=$PWD/build_tools/lsan_suppressions.txt"
|
2024-01-25 23:21:11 +00:00
|
|
|
make VERBOSE=1 test
|
2020-11-11 16:46:02 +00:00
|
|
|
|
2023-02-18 18:43:56 +00:00
|
|
|
# Our clang++ tsan builds are not recognizing safe rust patterns (such as the fact that Drop
|
|
|
|
# cannot be called while a thread is using the object in question). Rust has its own way of
|
|
|
|
# running TSAN, but for the duration of the port from C++ to Rust, we'll keep this disabled.
|
|
|
|
|
|
|
|
# ubuntu-threadsan:
|
|
|
|
#
|
|
|
|
# runs-on: ubuntu-latest
|
|
|
|
#
|
|
|
|
# steps:
|
2023-09-06 08:13:04 +00:00
|
|
|
# - uses: actions/checkout@v4
|
2024-04-28 13:43:42 +00:00
|
|
|
# - uses: dtolnay/rust-toolchain@1.70
|
2023-02-18 18:43:56 +00:00
|
|
|
# - name: Install deps
|
|
|
|
# run: |
|
2024-10-14 09:19:52 +00:00
|
|
|
# sudo apt install gettext libpcre2-dev python3-pexpect tmux
|
2023-02-18 18:43:56 +00:00
|
|
|
# - name: cmake
|
|
|
|
# env:
|
|
|
|
# FISH_CI_SAN: 1
|
|
|
|
# CC: clang
|
|
|
|
# run: |
|
|
|
|
# mkdir build && cd build
|
|
|
|
# cmake ..
|
|
|
|
# - name: make
|
|
|
|
# run: |
|
|
|
|
# make
|
|
|
|
# - name: make test
|
|
|
|
# run: |
|
|
|
|
# make test
|
2020-11-02 20:04:36 +00:00
|
|
|
|
|
|
|
macos:
|
|
|
|
|
|
|
|
runs-on: macos-latest
|
|
|
|
|
2024-05-07 16:25:02 +00:00
|
|
|
env:
|
|
|
|
# macOS runners keep having issues loading Cargo.toml dependencies from git (GitHub) instead
|
|
|
|
# of crates.io, so give this a try. It's also sometimes significantly faster on all platforms.
|
|
|
|
CARGO_NET_GIT_FETCH_WITH_CLI: true
|
2020-11-02 20:04:36 +00:00
|
|
|
steps:
|
2023-09-06 08:13:04 +00:00
|
|
|
- uses: actions/checkout@v4
|
2024-04-28 13:43:42 +00:00
|
|
|
- uses: dtolnay/rust-toolchain@1.70
|
2020-11-02 20:04:36 +00:00
|
|
|
- name: Install deps
|
|
|
|
run: |
|
2024-04-23 17:42:54 +00:00
|
|
|
# --break-system-packages because homebrew has now declared itself "externally managed".
|
|
|
|
# this is CI so we don't actually care.
|
|
|
|
sudo pip3 install --break-system-packages pexpect
|
2021-04-25 14:06:03 +00:00
|
|
|
brew install tmux
|
2020-11-02 20:04:36 +00:00
|
|
|
- name: cmake
|
|
|
|
run: |
|
|
|
|
mkdir build && cd build
|
2024-04-08 06:56:33 +00:00
|
|
|
cmake -DWITH_GETTEXT=NO -DCMAKE_BUILD_TYPE=Debug ..
|
2020-11-02 20:04:36 +00:00
|
|
|
- name: make
|
|
|
|
run: |
|
2024-01-25 23:21:11 +00:00
|
|
|
make VERBOSE=1
|
2020-11-02 20:04:36 +00:00
|
|
|
- name: make test
|
|
|
|
run: |
|
2024-01-25 23:21:11 +00:00
|
|
|
make VERBOSE=1 test
|