Update .gitea/workflows/kibot.yml
This commit is contained in:
@@ -181,11 +181,23 @@ jobs:
|
||||
if: steps.config_check.outputs.found == 'true'
|
||||
run: |
|
||||
cd "${{ steps.find_project.outputs.project_dir }}"
|
||||
CONFIG_PATH="../${{ steps.config_check.outputs.config_path }}"
|
||||
CONFIG_PATH=$(realpath "$CONFIG_PATH")
|
||||
CONFIG_PATH="${{ steps.config_check.outputs.config_path }}"
|
||||
|
||||
# Convert to absolute path if needed
|
||||
if [[ "$CONFIG_PATH" != /* ]]; then
|
||||
CONFIG_PATH="$(pwd)/$CONFIG_PATH"
|
||||
fi
|
||||
|
||||
# Normalize the path
|
||||
CONFIG_PATH=$(readlink -f "$CONFIG_PATH" 2>/dev/null || realpath "$CONFIG_PATH" 2>/dev/null || echo "$CONFIG_PATH")
|
||||
|
||||
if [ ! -f "$CONFIG_PATH" ]; then
|
||||
echo "Warning: Config file not found at $CONFIG_PATH"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -n "${{ steps.find_project.outputs.sch_file }}" ]; then
|
||||
echo "Running ERC on schematic files..."
|
||||
echo "Running ERC with config: $CONFIG_PATH"
|
||||
kibot -c "$CONFIG_PATH" -s run_erc -v || true
|
||||
else
|
||||
echo "No schematic files found, skipping ERC"
|
||||
@@ -196,10 +208,22 @@ jobs:
|
||||
if: steps.config_check.outputs.found == 'true'
|
||||
run: |
|
||||
cd "${{ steps.find_project.outputs.project_dir }}"
|
||||
CONFIG_PATH="../${{ steps.config_check.outputs.config_path }}"
|
||||
CONFIG_PATH=$(realpath "$CONFIG_PATH")
|
||||
CONFIG_PATH="${{ steps.config_check.outputs.config_path }}"
|
||||
|
||||
echo "Running DRC on PCB..."
|
||||
# Convert to absolute path if needed
|
||||
if [[ "$CONFIG_PATH" != /* ]]; then
|
||||
CONFIG_PATH="$(pwd)/$CONFIG_PATH"
|
||||
fi
|
||||
|
||||
# Normalize the path
|
||||
CONFIG_PATH=$(readlink -f "$CONFIG_PATH" 2>/dev/null || realpath "$CONFIG_PATH" 2>/dev/null || echo "$CONFIG_PATH")
|
||||
|
||||
if [ ! -f "$CONFIG_PATH" ]; then
|
||||
echo "Warning: Config file not found at $CONFIG_PATH"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Running DRC with config: $CONFIG_PATH"
|
||||
kibot -c "$CONFIG_PATH" -s run_drc -v || true
|
||||
continue-on-error: true
|
||||
|
||||
@@ -207,11 +231,24 @@ jobs:
|
||||
if: steps.config_check.outputs.found == 'true'
|
||||
run: |
|
||||
cd "${{ steps.find_project.outputs.project_dir }}"
|
||||
CONFIG_PATH="../${{ steps.config_check.outputs.config_path }}"
|
||||
CONFIG_PATH=$(realpath "$CONFIG_PATH")
|
||||
CONFIG_PATH="${{ steps.config_check.outputs.config_path }}"
|
||||
|
||||
# Convert to absolute path if needed
|
||||
if [[ "$CONFIG_PATH" != /* ]]; then
|
||||
CONFIG_PATH="$(pwd)/$CONFIG_PATH"
|
||||
fi
|
||||
|
||||
# Normalize the path
|
||||
CONFIG_PATH=$(readlink -f "$CONFIG_PATH" 2>/dev/null || realpath "$CONFIG_PATH" 2>/dev/null || echo "$CONFIG_PATH")
|
||||
|
||||
if [ ! -f "$CONFIG_PATH" ]; then
|
||||
echo "Error: Config file not found at $CONFIG_PATH"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Generating outputs for ${{ steps.layers.outputs.layers }} layer board"
|
||||
echo "Project: ${{ steps.find_project.outputs.project_name }}"
|
||||
echo "Using config: $CONFIG_PATH"
|
||||
|
||||
# Run KiBot with the configuration
|
||||
kibot -c "$CONFIG_PATH" -d Fabrication -v
|
||||
|
||||
Reference in New Issue
Block a user