|
| 1 | +# ******************************************************************************* |
| 2 | +# Copyright (c) 2026 Contributors to the Eclipse Foundation |
| 3 | +# |
| 4 | +# See the NOTICE file(s) distributed with this work for additional |
| 5 | +# information regarding copyright ownership. |
| 6 | +# |
| 7 | +# This program and the accompanying materials are made available under the |
| 8 | +# terms of the Apache License Version 2.0 which is available at |
| 9 | +# https://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# SPDX-License-Identifier: Apache-2.0 |
| 12 | +# ******************************************************************************* |
| 13 | + |
| 14 | +# Just recipes for Kyron project |
| 15 | +# Run `just --list` to see all available recipes |
| 16 | +default: help |
| 17 | + |
| 18 | +# =============================================================================== |
| 19 | +# BAZEL BUILD COMMANDS |
| 20 | +# =============================================================================== |
| 21 | + |
| 22 | +# Build kyron targets for x86_64-linux |
| 23 | +@build-x86-linux: |
| 24 | + echo "Building kyron targets for x86_64-linux..." |
| 25 | + bazel build --config x86_64-linux //... |
| 26 | + |
| 27 | +# Build kyron targets for x86_64-qnx |
| 28 | +@build-x86-qnx: |
| 29 | + echo "Building kyron targets for x86_64-qnx..." |
| 30 | + bazel build --config x86_64-qnx //... |
| 31 | + |
| 32 | +# Build kyron targets for arm64-qnx |
| 33 | +@build-arm64-qnx: |
| 34 | + echo "Building kyron targets for arm64-qnx..." |
| 35 | + bazel build --config arm64-qnx //... |
| 36 | + |
| 37 | +# Build all kyron targets for all platforms |
| 38 | +@build-all: build-x86-linux build-x86-qnx build-arm64-qnx |
| 39 | + echo "✓ All kyron targets built for all platforms" |
| 40 | + |
| 41 | +# =============================================================================== |
| 42 | +# BAZEL TEST COMMANDS |
| 43 | +# =============================================================================== |
| 44 | + |
| 45 | +# Run kyron tests for x86_64-linux |
| 46 | +@test-x86-linux: |
| 47 | + echo "Running kyron tests for x86_64-linux..." |
| 48 | + bazel test --config x86_64-linux //src/... |
| 49 | + |
| 50 | +# Run kyron tests for x86_64-qnx |
| 51 | +@test-x86-qnx: |
| 52 | + echo "Running kyron tests for x86_64-qnx..." |
| 53 | + bazel test --config x86_64-qnx //src/... |
| 54 | + |
| 55 | +# Run kyron tests for arm64-qnx |
| 56 | +@test-arm64-qnx: |
| 57 | + echo "Running kyron tests for arm64-qnx..." |
| 58 | + bazel test --config arm64-qnx //src/... |
| 59 | + |
| 60 | +# Run unit tests |
| 61 | +@test-unit: |
| 62 | + echo "Running kyron unit tests..." |
| 63 | + bazel test --config x86_64-linux //:unit_tests |
| 64 | + |
| 65 | +# Run component integration tests |
| 66 | +@test-cit: |
| 67 | + echo "Running kyron component integration tests..." |
| 68 | + bazel test --config x86_64-linux //tests/test_cases:cit |
| 69 | + |
| 70 | +# Run component integration tests with extended timeout (nightly) |
| 71 | +@test-cit-repeat: |
| 72 | + echo "Running kyron component integration tests with repeat..." |
| 73 | + bazel test --config x86_64-linux //tests/test_cases:cit_repeat --test_timeout=1200 |
| 74 | + |
| 75 | +# Run component integration tests with extended timeout (nightly) |
| 76 | +@test-all: test-x86-linux test-cit |
| 77 | + echo "✓ All kyron tests passed for all platforms" |
| 78 | + |
| 79 | +# Build test scenarios |
| 80 | +@test-scenarios-build: |
| 81 | + echo "Building kyron test scenarios for x86_64-linux..." |
| 82 | + bazel build --config x86_64-linux //tests/test_scenarios/rust:test_scenarios |
| 83 | + |
| 84 | +# =============================================================================== |
| 85 | +# CARGO BUILD COMMANDS |
| 86 | +# =============================================================================== |
| 87 | + |
| 88 | +# Cargo build |
| 89 | +@cargo-build: |
| 90 | + echo "Building with Cargo..." |
| 91 | + cargo build |
| 92 | + |
| 93 | +# Cargo build for test scenarios |
| 94 | +@cargo-build-scenarios: |
| 95 | + echo "Building test scenarios with Cargo..." |
| 96 | + cargo build --manifest-path tests/test_scenarios/rust/Cargo.toml |
| 97 | + |
| 98 | +# =============================================================================== |
| 99 | +# CARGO TEST COMMANDS |
| 100 | +# =============================================================================== |
| 101 | + |
| 102 | +# Cargo test |
| 103 | +@cargo-test: |
| 104 | + echo "Running tests with Cargo..." |
| 105 | + cargo test |
| 106 | + |
| 107 | +# =============================================================================== |
| 108 | +# CARGO CODE QUALITY COMMANDS |
| 109 | +# =============================================================================== |
| 110 | +# Format code with rustfmt |
| 111 | +@fmt: |
| 112 | + echo "Formatting code with rustfmt..." |
| 113 | + cargo fmt |
| 114 | + |
| 115 | +# Run clippy linter |
| 116 | +@clippy: |
| 117 | + echo "Running clippy..." |
| 118 | + cargo clippy --all-targets --all-features -- -D warnings |
| 119 | + |
| 120 | +# Clean Bazel build artifacts |
| 121 | +@clean-bazel: |
| 122 | + echo "Cleaning Bazel artifacts..." |
| 123 | + bazel clean --expunge --async |
| 124 | + |
| 125 | +# Clean Cargo build artifacts |
| 126 | +@clean-cargo: |
| 127 | + echo "Cleaning Cargo artifacts..." |
| 128 | + cargo clean |
| 129 | + |
| 130 | +# Clean everything |
| 131 | +@clean: clean-bazel clean-cargo |
| 132 | + echo "✓ All build artifacts cleaned" |
| 133 | + |
| 134 | +# =============================================================================== |
| 135 | +# CI bazel checks |
| 136 | +# =============================================================================== |
| 137 | + |
| 138 | +# Format check |
| 139 | +@ci-format-check: |
| 140 | + echo "Checking code formatting..." |
| 141 | + bazel test //:format.check |
| 142 | + |
| 143 | +# Copyrights check |
| 144 | +@ci-cr-check: |
| 145 | + echo "Checking copyrights..." |
| 146 | + bazel run //:copyright.check |
| 147 | + |
| 148 | +# License check |
| 149 | +@ci-license-check: |
| 150 | + echo "Checking licenses..." |
| 151 | + bazel run //:license-check |
| 152 | + |
| 153 | +# All CI checks |
| 154 | +@ci-all: ci-format-check ci-cr-check ci-license-check |
| 155 | + echo "✓ All CI checks passed" |
| 156 | + |
| 157 | +# =============================================================================== |
| 158 | +# HELP / DEFAULT |
| 159 | +# =============================================================================== |
| 160 | + |
| 161 | +# Show all available recipes |
| 162 | +@help: |
| 163 | + just --list --unsorted |
0 commit comments