fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
0d7d06f35
master
1name : Test 2 3on : [ push , pull_request ] 4 5env : 6FISH_TEST_MAX_CONCURRENCY : "4" 7CMAKE_BUILD_PARALLEL_LEVEL : "4" 8 9permissions : 10contents : read 11 12jobs : 13ubuntu : 14runs-on : ubuntu-latest 15steps : 16- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2, build_tools/update-dependencies.sh 17- uses : ./.github/actions/rust-toolchain@oldest-supported 18- name : Install deps 19uses : ./.github/actions/install-dependencies 20with : 21include_sphinx : true 22- name : Generate a locale that uses a comma as decimal separator. 23run : | 24sudo locale-gen fr_FR.UTF-8 25- name : cmake 26run : | 27mkdir build && cd build 28cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo 29- name : make 30run : | 31make -C build VERBOSE=1 32- name : make fish_run_tests 33run : | 34make -C build VERBOSE=1 fish_run_tests 35 36ubuntu-32bit-static-pcre2 : 37runs-on : ubuntu-latest 38steps : 39- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2, build_tools/update-dependencies.sh 40- uses : ./.github/actions/rust-toolchain@oldest-supported 41with : 42targets : "i586-unknown-linux-gnu" 43- name : Update package database 44run : sudo apt-get update 45- name : Install deps 46uses : ./.github/actions/install-dependencies 47with : 48include_pcre : false 49include_sphinx : false 50- name : Install g++-multilib 51run : sudo apt install g++-multilib 52- name : cmake 53env : 54CFLAGS : "-m32" 55run : | 56mkdir build && cd build 57cmake -DFISH_USE_SYSTEM_PCRE2=OFF -DRust_CARGO_TARGET=i586-unknown-linux-gnu .. 58- name : make 59run : | 60make -C build VERBOSE=1 61- name : make fish_run_tests 62run : | 63make -C build VERBOSE=1 fish_run_tests 64 65ubuntu-asan : 66runs-on : ubuntu-latest 67env : 68# Rust has two different memory sanitizers of interest; they can't be used at the same time: 69# * AddressSanitizer detects out-of-bound access, use-after-free, use-after-return, 70# use-after-scope, double-free, invalid-free, and memory leaks. 71# * MemorySanitizer detects uninitialized reads. 72# 73RUSTFLAGS : "-Zsanitizer=address" 74# RUSTFLAGS: "-Zsanitizer=memory -Zsanitizer-memory-track-origins" 75steps : 76- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2, build_tools/update-dependencies.sh 77# All -Z options require running nightly 78- uses : dtolnay/rust-toolchain@nightly 79with : 80# ASAN uses `cargo build -Zbuild-std` which requires the rust-src component 81# this is comma-separated 82components : rust-src 83- name : Update package database 84run : sudo apt-get update 85- name : Install deps 86uses : ./.github/actions/install-dependencies 87with : 88include_sphinx : false 89- name : Install llvm 90run : | 91sudo apt install llvm # for llvm-symbolizer 92- name : cmake 93env : 94CC : clang 95run : | 96mkdir build && cd build 97# Rust's ASAN requires the build system to explicitly pass a --target triple. We read that 98# value from CMake variable Rust_CARGO_TARGET. 99cmake .. -DASAN=1 -DRust_CARGO_TARGET=x86_64-unknown-linux-gnu -DCMAKE_BUILD_TYPE=Debug 100- name : make 101run : | 102make -C build VERBOSE=1 103- name : make fish_run_tests 104env : 105FISH_CI_SAN : 1 106ASAN_OPTIONS : check_initialization_order=1:detect_stack_use_after_return=1:detect_leaks=1:fast_unwind_on_malloc=0 107# use_tls=0 is a workaround for LSAN crashing with "Tracer caught signal 11" (SIGSEGV), 108# which seems to be an issue with TLS support in newer glibc versions under virtualized 109# environments. Follow https://github.com/google/sanitizers/issues/1342 and 110# https://github.com/google/sanitizers/issues/1409 to track this issue. 111# UPDATE: this can cause spurious leak reports for __cxa_thread_atexit_impl() under glibc. 112LSAN_OPTIONS : verbosity=0:log_threads=0:use_tls=1:print_suppressions=0 113run : | 114set -x 115export ASAN_SYMBOLIZER_PATH=$(command -v /usr/bin/llvm-symbolizer* | sort -n | head -1) 116export LSAN_OPTIONS="$LSAN_OPTIONS:suppressions=$PWD/build_tools/lsan_suppressions.txt" 117make -C build VERBOSE=1 fish_run_tests 118 119macos : 120runs-on : macos-latest 121env : 122# macOS runners keep having issues loading Cargo.toml dependencies from git (GitHub) instead 123# of crates.io, so give this a try. It's also sometimes significantly faster on all platforms. 124CARGO_NET_GIT_FETCH_WITH_CLI : true 125steps : 126- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2, build_tools/update-dependencies.sh 127- uses : ./.github/actions/rust-toolchain@oldest-supported 128- name : Install deps 129run : | 130# --break-system-packages because homebrew has now declared itself "externally managed". 131# this is CI so we don't actually care. 132sudo pip3 install --break-system-packages pexpect 133brew install gettext tmux 134- uses : ./.github/actions/install-sphinx 135- name : cmake 136run : | 137mkdir build && cd build 138FISH_TEST_MAX_CONCURRENCY=1 \ 139cmake -DCMAKE_BUILD_TYPE=Debug .. 140- name : make 141run : | 142make -C build VERBOSE=1 143- name : make fish_run_tests 144run : | 145make -C build VERBOSE=1 fish_run_tests 146 147windows : 148runs-on : windows-latest 149defaults : 150run : 151shell : msys2 {0} 152steps : 153- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2, build_tools/update-dependencies.sh 154- uses : msys2/setup-msys2@e9898307ac31d1a803454791be09ab9973336e1c # v2.31.1, build_tools/update-dependencies.sh 155with : 156update : true 157msystem : MSYS 158id : msys2 159- name : Install deps 160# Not using setup-msys2 `install` option to make it easier to copy/paste 161run : | 162pacman --noconfirm -S --needed git rust python3 diffutils tmux 163- name : rebase 164env : 165MSYS2_LOCATION : ${{ steps.msys2.outputs.msys2-location }} 166shell : cmd 167run : | 168"%MSYS2_LOCATION%\usr\bin\dash" /usr/bin/rebaseall -p -v 169- name : check 170env : 171FISH_CHECK_LINT : false 172run : | 173 cargo xtask check