-
Notifications
You must be signed in to change notification settings - Fork 3
/
justfile
86 lines (68 loc) · 1.65 KB
/
justfile
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
# SPDX-FileCopyrightText: © 2022 Melg Eight <public.melg8@gmail.com>
#
# SPDX-License-Identifier: MIT
# This list of available targets.
default:
@just --list
# Choose what to do from the list.
choose:
@just --choose
# Lint, build, and run all tests.
checkit:
@just clean-all
@just lint-all
@just build-gcc
@just build-clang
# Run all linters.
lint-all:
@ci/checks/lint_all.sh
# Run concrete linter.
lint-with +linter_name:
@ENABLE_LINTERS={{linter_name}} ci/checks/lint_all.sh
# Build with gcc, run tests.
build-gcc:
@ci/builders/gcc/build.sh
# Build with clang, run tests.
build-clang:
@ci/builders/clang/build.sh
# Build with gcc, run tests, create coverage report.
build-test-coverage:
@ci/checks/coverage_report.sh
# Remove build and test folders.
clean-all:
@rm -rf build_gcc
@rm -rf build_clang
@rm -rf build
@rm -rf coverage
@rm -rf report
@echo "all cleaned"
# Build and load docker image.
docker-update-locally:
@just docker-build
@just docker-load
# Build, load and push docker image.
docker-update:
@just docker-build
@just docker-load
@just docker-push
# Build docker image using nix.
docker-build:
@ci/docker/build.sh
# Load resulting image of docker-build.
docker-load:
@docker load < result
# Push loaded image to docker hub.
docker-push:
@ci/docker/push.sh
# Pull image from docker hub.
docker-pull:
@ci/docker/pull.sh
# Run commands inside docker image.
docker-run +commands:
@ci/docker/run.sh {{commands}}
# Run command inside of nix shell in docker image.
docker-run-nix-shell +commands:
@ci/docker/run_nix_shell.sh {{commands}}
# Run shell from docker.
docker-run-shell:
@ci/docker/run_shell.sh