Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@ jobs:

echo "base_commit=$BASE_COMMIT" >> "$GITHUB_OUTPUT"

# Check if this workflow or the shared parser script changed.
# These aren't buck2 inputs so BTD won't detect them, but they
# can affect builds (toolchain versions, env vars, build flags).
if git diff --name-only "$BASE_COMMIT" HEAD | grep -qE '\.github/workflows/build\.yml|\.github/scripts/'; then
echo "ci_changed=true" >> "$GITHUB_OUTPUT"
else
echo "ci_changed=false" >> "$GITHUB_OUTPUT"
fi

- name: Generate base snapshot
run: |
git checkout ${{ steps.changed-files.outputs.base_commit }}
Expand Down Expand Up @@ -124,10 +133,13 @@ jobs:
run: |
mkdir -p /tmp/btd_results

# Run parser script; --fallback means BTD failed so run everything
# Run parser script; --fallback means run everything
FALLBACK_FLAG=""
if [ "${{ steps.btd.outputs.succeeded }}" != "true" ]; then
FALLBACK_FLAG="--fallback"
elif [ "${{ steps.changed-files.outputs.ci_changed }}" = "true" ]; then
echo "CI workflow changed — rebuilding all FPGA targets"
FALLBACK_FLAG="--fallback"
fi

python3 .github/scripts/parse-affected-targets.py \
Expand Down Expand Up @@ -195,7 +207,7 @@ jobs:
echo "Build output: $OUTPUT"
echo "Output directory: $OUTPUT_DIR"
echo "output_dir=$OUTPUT_DIR" >> "$GITHUB_OUTPUT"
TARGET_NAME=$(echo "${{ matrix.target }}" | sed 's|.*:||')
TARGET_NAME=$(echo "${{ matrix.target }}" | sed 's|.*:||' | tr '_' '-')
echo "artifact_name=${TARGET_NAME}-image" >> "$GITHUB_OUTPUT"

- name: Upload artifact
Expand Down Expand Up @@ -246,7 +258,7 @@ jobs:
echo "Build output: $OUTPUT"
echo "Output directory: $OUTPUT_DIR"
echo "output_dir=$OUTPUT_DIR" >> "$GITHUB_OUTPUT"
TARGET_NAME=$(echo "${{ matrix.target }}" | sed 's|.*:||')
TARGET_NAME=$(echo "${{ matrix.target }}" | sed 's|.*:||' | tr '_' '-')
echo "artifact_name=${TARGET_NAME}-image" >> "$GITHUB_OUTPUT"

- name: Upload artifact
Expand Down Expand Up @@ -297,7 +309,7 @@ jobs:
echo "Build output: $OUTPUT"
echo "Output directory: $OUTPUT_DIR"
echo "output_dir=$OUTPUT_DIR" >> "$GITHUB_OUTPUT"
TARGET_NAME=$(echo "${{ matrix.target }}" | sed 's|.*:||')
TARGET_NAME=$(echo "${{ matrix.target }}" | sed 's|.*:||' | tr '_' '-')
echo "artifact_name=${TARGET_NAME}-image" >> "$GITHUB_OUTPUT"

- name: Upload artifact
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/simulation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,15 @@ jobs:

echo "base_commit=$BASE_COMMIT" >> "$GITHUB_OUTPUT"

# Check if this workflow or the shared parser script changed.
# These aren't buck2 inputs so BTD won't detect them, but they
# can affect simulation runs (toolchain versions, env vars).
if git diff --name-only "$BASE_COMMIT" HEAD | grep -qE '\.github/workflows/simulation\.yml|\.github/scripts/'; then
echo "ci_changed=true" >> "$GITHUB_OUTPUT"
else
echo "ci_changed=false" >> "$GITHUB_OUTPUT"
fi

- name: Generate base snapshot
run: |
git checkout ${{ steps.changed-files.outputs.base_commit }}
Expand Down Expand Up @@ -121,10 +130,13 @@ jobs:
run: |
mkdir -p /tmp/btd_results

# Run parser script; --fallback means BTD failed so run everything
# Run parser script; --fallback means run everything
FALLBACK_FLAG=""
if [ "${{ steps.btd.outputs.succeeded }}" != "true" ]; then
FALLBACK_FLAG="--fallback"
elif [ "${{ steps.changed-files.outputs.ci_changed }}" = "true" ]; then
echo "CI workflow changed — re-running all simulation targets"
FALLBACK_FLAG="--fallback"
fi

python3 .github/scripts/parse-affected-targets.py \
Expand Down
2 changes: 1 addition & 1 deletion tools/fpga_releaser/archive_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def get_relevant_files_from_buck_zip(fpga_name, zip):
continue
if item.filename.endswith(".bz2"):
zip_names.append(item.filename)
if "/maps/" in item.filename and (item.filename.endswith(".json") or item.filename.endswith(".html")):
if "maps/" in item.filename and (item.filename.endswith(".json") or item.filename.endswith(".html")):
zip_names.append(item.filename)
if item.filename.endswith("nextpnr.log"):
zip_names.append(item.filename)
Expand Down