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
11 changes: 7 additions & 4 deletions .github/workflows/merge-criteria.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,20 @@ jobs:
if [[ -n "$is_manual_trigger" || "${GITHUB_REF}" == "refs/heads/main" || $contains_dot -gt 0 || $contains_dotgithub -gt 0 ]]; then
filtered_array='["flight_computer","ground_station","telemetry"]'
else
filtered_array='${{ steps.changed-files.outputs.all_changed_files }}'
filtered_array=$(echo '${{ steps.changed-files.outputs.all_changed_files }}' | jq -c '[.[] | select(. == "flight_computer" or . == "ground_station" or . == "telemetry")]')
fi

echo "$filtered_array"
echo "matrix=$filtered_array" >> "$GITHUB_OUTPUT"
has_projects=$(echo "$filtered_array" | jq -r 'length > 0')
echo "has_projects=$has_projects" >> "$GITHUB_OUTPUT"

outputs:
matrix: ${{ steps.changed-files-filtered.outputs.matrix }}
has_projects: ${{ steps.changed-files-filtered.outputs.has_projects }}

format_check:
if: ${{ fromJson(needs.generate_matrix.outputs.matrix) }}
if: ${{ needs.generate_matrix.outputs.has_projects == 'true' }}
name: Format Check
needs: generate_matrix
strategy:
Expand All @@ -80,7 +83,7 @@ jobs:
exclude-regex: '(lib|telemetry/src/st)'

build_lint:
if: ${{ fromJson(needs.generate_matrix.outputs.matrix) }}
if: ${{ needs.generate_matrix.outputs.has_projects == 'true' }}
needs: [generate_matrix, format_check]
name: '[Ubuntu] Build + Lint'
# We are linting on Ubuntu because the linter seems to work better on Linux
Expand Down Expand Up @@ -162,7 +165,7 @@ jobs:
retention-days: 90

build_upload:
if: ${{ fromJson(needs.generate_matrix.outputs.matrix) }}
if: ${{ needs.generate_matrix.outputs.has_projects == 'true' }}
needs: [generate_matrix, format_check]
name: '[Windows] Build + Upload'
# We are running this on windows because the users get binaries compiled on windows.
Expand Down
2 changes: 1 addition & 1 deletion docs/check-manual.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ for (const link of new Set(sourceLinks)) {
requireCondition(html.includes(`href="${link.replaceAll("&", "&")}"`), `Missing external link: ${link}`);
}

const imagePrefix = "https://raw.githubusercontent.com/catsystems/cats-embedded/docs/web-manual/docs/images/";
const imagePrefix = "https://raw.githubusercontent.com/catsystems/cats-embedded/main/docs/images/";
const generatedImages = [...html.matchAll(/<img\s+[^>]*src="([^"]+)"[^>]*>/g)].map((match) => {
requireCondition(match[0].includes('loading="lazy"'), `Image is not lazy-loaded: ${match[1]}`);
requireCondition(match[0].includes('decoding="async"'), `Image does not decode asynchronously: ${match[1]}`);
Expand Down
2 changes: 1 addition & 1 deletion docs/generated/manual.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/styles.typ
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#let dark-blue = rgb("#1f4e78")
#let light-red = rgb("#ffabab")
#let dark-red = rgb("#800000")
#let web-image-root = "https://raw.githubusercontent.com/catsystems/cats-embedded/docs/web-manual/docs/images/"
#let web-image-root = "https://raw.githubusercontent.com/catsystems/cats-embedded/main/docs/images/"

#let doc-image(path, width: auto, alt: "", outline: false) = context {
if target() == "html" {
Expand Down
Loading