mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-19 23:21:15 -03:00
Remove dependency on CTest. Parallel execution is handled by `test_driver.py` internally now, so CTest is no longer relevant for performance. This also removes CMake targets for single tests. As a replacement, `test_driver.py` can be called directly with the path to the build directory as the first argument and the path to the desired test as the second argument. Ensuring that the executables in the build directory are up to date needs to be done separately. For a pure cargo build, an example of running a single test would be: `cargo b && tests/test_driver.py target/debug tests/checks/abbr.fish` The recommended way of running tests is `build_tools/check.sh`, which runs more extensive tests and does not depend on CMake. That script does not work in CI yet, so CMake testing is retained for now. Update CI config to use the new `FISH_TEST_MAX_CONCURRENCY`. Also update the FreeBSD version, since the previous one is outdated and does not support the semaphore logic in `test_driver.py`.
78 lines
2.9 KiB
YAML
78 lines
2.9 KiB
YAML
env:
|
|
CIRRUS_CLONE_DEPTH: 100
|
|
CI: 1
|
|
|
|
linux_task:
|
|
matrix:
|
|
- name: alpine
|
|
container: &step
|
|
image: ghcr.io/krobelus/fish-ci/alpine:latest
|
|
memory: 4GB
|
|
- name: jammy
|
|
container:
|
|
<<: *step
|
|
image: ghcr.io/krobelus/fish-ci/jammy:latest
|
|
# - name: jammy-asan
|
|
# container:
|
|
# <<: *step
|
|
# image: ghcr.io/krobelus/fish-ci/jammy-asan:latest
|
|
# - name: focal-32bit
|
|
# container:
|
|
# <<: *step
|
|
# image: ghcr.io/krobelus/fish-ci/focal-32bit:latest
|
|
tests_script:
|
|
# cirrus at times gives us 32 procs and 2 GB of RAM
|
|
# Unrestriced parallelism results in OOM
|
|
- lscpu || true
|
|
- (cat /proc/meminfo | grep MemTotal) || true
|
|
- mkdir build && cd build
|
|
- FISH_TEST_MAX_CONCURRENCY=6 cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug ..
|
|
- ninja -j 6 fish
|
|
- ninja fish_run_tests
|
|
only_if: $CIRRUS_REPO_OWNER == 'fish-shell'
|
|
|
|
linux_arm_task:
|
|
matrix:
|
|
- name: focal-arm64
|
|
arm_container:
|
|
image: ghcr.io/fish-shell/fish-ci/focal-arm64
|
|
- name: jammy-armv7-32bit
|
|
arm_container:
|
|
image: ghcr.io/fish-shell/fish-ci/jammy-armv7-32bit
|
|
tests_script:
|
|
# cirrus at times gives us 32 procs and 2 GB of RAM
|
|
# Unrestriced parallelism results in OOM
|
|
- lscpu || true
|
|
- (cat /proc/meminfo | grep MemTotal) || true
|
|
- mkdir build && cd build
|
|
- FISH_TEST_MAX_CONCURRENCY=6 cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug ..
|
|
- ninja -j 6 fish
|
|
- file ./fish
|
|
- ninja fish_run_tests
|
|
# CI task disabled during RIIR transition
|
|
only_if: false && $CIRRUS_REPO_OWNER == 'fish-shell'
|
|
|
|
freebsd_task:
|
|
matrix:
|
|
- name: FreeBSD 14
|
|
freebsd_instance:
|
|
image: freebsd-14-3-release-amd64-ufs
|
|
tests_script:
|
|
- pkg install -y cmake-core devel/pcre2 devel/ninja lang/rust misc/py-pexpect git-lite
|
|
# libclang.so is a required build dependency for rust-c++ ffi bridge
|
|
- pkg install -y llvm
|
|
# BSDs have the following behavior: root may open or access files even if
|
|
# the mode bits would otherwise disallow it. For example root may open()
|
|
# a file with write privileges even if the file has mode 400. This breaks
|
|
# our tests for e.g. cd and path. So create a new unprivileged user to run tests.
|
|
- pw user add -n fish-user -s /bin/csh -d /home/fish-user
|
|
- mkdir -p /home/fish-user
|
|
- chown -R fish-user /home/fish-user
|
|
- mkdir build && cd build
|
|
- chown -R fish-user ..
|
|
- sudo -u fish-user -s whoami
|
|
- sudo -u fish-user -s FISH_TEST_MAX_CONCURRENCY=1 cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug ..
|
|
- sudo -u fish-user -s ninja -j 6 fish
|
|
- sudo -u fish-user -s ninja fish_run_tests
|
|
only_if: $CIRRUS_REPO_OWNER == 'fish-shell'
|