-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
99 lines (76 loc) · 4.23 KB
/
justfile
File metadata and controls
99 lines (76 loc) · 4.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
import 'sanitizers.just'
# Detect the conan profile for building.
profile:
conan profile detect -e
# Update the lock file.
update:
conan lock create . --lockfile-clean -o "&:build_evgetx11=True" -o "&:build_evgetlibinput=True"
# Build evget.
build build_type='Debug' $COMPILER_VERSION='' *build_options='': profile update clean_cache
conan build . --build=missing -s build_type={{ capitalize(build_type) }} -s compiler.cppstd=23 {{ build_options }}
# Build evget and install system dependencies.
build_system build_type='Debug' $COMPILER_VERSION='' *build_options='': profile update clean_cache \
(build build_type COMPILER_VERSION \
'-c tools.system.package_manager:mode=install -c tools.system.package_manager:sudo=True ' + build_options)
# Build with the clang profile.
build_clang build_type='Debug' $COMPILER_VERSION='20' *build_options='': \
(build build_type COMPILER_VERSION '-pr ./profiles/clang ' + build_options)
# Build with the gcc profile.
build_gcc build_type='Debug' $COMPILER_VERSION='15' *build_options='': \
(build build_type COMPILER_VERSION '-pr ./profiles/gcc ' + build_options)
# Build both Wayland and X11 evget components.
build_linux build_type='Debug' $COMPILER_VERSION='15' *build_options='': \
(build build_type COMPILER_VERSION '-o "&:build_evgetx11=True" -o "&:build_evgetlibinput=True" ' + build_options)
# Rebuild evget using the existing CMake directory.
rebuild build_type='Debug':
cd build/{{ capitalize(build_type) }} && cmake --build .
# Build only the evget library.
build_lib build_type='Debug' $COMPILER_VERSION='' *build_options='': \
(build build_type COMPILER_VERSION '-o "&:build_bin=False" ' + build_options)
# Build and install evget.
install build_type='Release' $COMPILER_VERSION='' *build_options='': \
(build build_type COMPILER_VERSION build_options)
cmake --install build/{{ capitalize(build_type) }}
# Build and package the binary in a compressed file.
package build_type='Release' name='evget.tar.gz' $COMPILER_VERSION='' *build_options='': \
(build build_type COMPILER_VERSION build_options)
cd build/{{ capitalize(build_type) }} && tar -czf {{ name }} evget && sha256sum -b {{ name }} > {{ name }}.sha256
# Build and run evget.
run args='--help' build_type='Release' $COMPILER_VERSION='' *build_options='': \
(build build_type COMPILER_VERSION build_options)
cd build/{{ capitalize(build_type) }} && ./evget {{ args }}
_run_tests filter='*':
cd build/Debug && ./evgettest --gtest_filter={{ filter }}
# Build and test evget.
test filter='*' $COMPILER_VERSION='' *build_options='': \
(build 'Debug' COMPILER_VERSION '-o "&:build_testing=True" ' + build_options) (_run_tests filter)
# Build and test evget using the clang profile.
test_clang filter='*' $COMPILER_VERSION='20' *build_options='': \
(build_clang 'Debug' COMPILER_VERSION '-o "&:build_testing=True" ' + build_options) (_run_tests filter)
# Build and test evget using the gcc profile.
test_gcc filter='*' $COMPILER_VERSION='15' *build_options='': \
(build_gcc 'Debug' COMPILER_VERSION '-o "&:build_testing=True" ' + build_options) (_run_tests filter)
# Run pre-commit and other lints.
lint:
pre-commit run --all-files
# Run clang tidy on code.
check $COMPILER_VERSION='' *build_options='': \
(build 'Debug' COMPILER_VERSION '-o "&:build_testing=True" -o "&:run_clang_tidy=True" -o "&:verify_headers=True" ' \
+ build_options) lint
# Run clang tidy for X11 and libinput implementations.
check_linux $COMPILER_VERSION='' *build_options='': (check COMPILER_VERSION \
'-o "&:build_evgetx11=True" -o "&:build_evgetlibinput=True" ' + build_options)
# Run clang tidy on code and fix errors.
check-fix $COMPILER_VERSION='' *build_options='': \
(check 'Debug' COMPILER_VERSION '-o "&:clang_tidy_fix_errors=True" ' + build_options)
# Remove the build directory.
clean:
rm -rf build
# Clean the CMakeCache.txt only.
clean_cache:
rm -f build/Debug/CMakeCache.txt && rm -f build/Release/CMakeCache.txt
# Generate documentation.
doc $COMPILER_VERSION='' *build_options='': (build 'Debug' COMPILER_VERSION build_options)
git clone --depth 1 --branch v2.3.4 https://github.com/jothepro/doxygen-awesome-css.git build/doxygen-awesome-css \
|| true
CLANG_DATABASE_PATH=build/Debug doxygen