Skip to content

Commit b220d15

Browse files
committed
ci: repack extracted artifacts into ZIPs and read INI directly from extracted files
1 parent d58e165 commit b220d15

2 files changed

Lines changed: 37 additions & 40 deletions

File tree

.github/workflows/nightly-release.yaml

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,15 @@ jobs:
9090
path: downloaded/
9191
pattern: 'rusefi_bundle_*'
9292

93-
- name: Debug downloaded structure
94-
run: find downloaded/ | head -40
95-
9693
- name: Collect bundle ZIPs
9794
run: |
9895
mkdir -p bundles
99-
find downloaded/ -mindepth 2 -maxdepth 2 -type f -exec cp {} bundles/ \;
96+
for artifact_dir in downloaded/*/; do
97+
artifact_name=$(basename "${artifact_dir%/}")
98+
zip_name="${artifact_name%.zip}.zip"
99+
(cd "$artifact_dir" && zip -r "../../bundles/${zip_name}" .)
100+
echo "Packed: bundles/${zip_name}"
101+
done
100102
101103
- name: List bundles
102104
run: find bundles/ -type f | sort
@@ -150,28 +152,20 @@ jobs:
150152
id: extract-ini
151153
run: |
152154
mkdir -p ini-pages
153-
for zip in bundles/*.zip; do
154-
[ -f "$zip" ] || continue
155-
tmpdir=$(mktemp -d)
156-
unzip -q "$zip" "*.ini" -d "$tmpdir" 2>/dev/null || true
157-
for ini in "$tmpdir"/*.ini; do
158-
[ -f "$ini" ] || continue
159-
# Parse signature: "rusEFI master.2026.06.22.mazduino-lite.1830052633"
160-
SIG=$(grep -oP 'signature\s*=\s*"\K[^"]+' "$ini" | head -1)
161-
# Strip "rusEFI " prefix and split by dot
162-
SIGPART="${SIG#rusEFI }"
163-
IFS='.' read -r BRANCH YEAR MONTH DAY TARGET HASH <<< "$SIGPART"
164-
if [ -z "$HASH" ]; then
165-
echo "Skipping $ini — could not parse signature: $SIG"
166-
continue
167-
fi
168-
DEST="ini-pages/$BRANCH/$YEAR/$MONTH/$DAY/$TARGET"
169-
mkdir -p "$DEST"
170-
cp "$ini" "$DEST/${HASH}.ini"
171-
echo "Staged: $DEST/${HASH}.ini"
172-
done
173-
rm -rf "$tmpdir"
174-
done
155+
while IFS= read -r ini; do
156+
[ -f "$ini" ] || continue
157+
SIG=$(grep -oP 'signature\s*=\s*"\K[^"]+' "$ini" | head -1)
158+
SIGPART="${SIG#rusEFI }"
159+
IFS='.' read -r BRANCH YEAR MONTH DAY TARGET HASH <<< "$SIGPART"
160+
if [ -z "$HASH" ]; then
161+
echo "Skipping $ini — could not parse signature: $SIG"
162+
continue
163+
fi
164+
DEST="ini-pages/$BRANCH/$YEAR/$MONTH/$DAY/$TARGET"
165+
mkdir -p "$DEST"
166+
cp "$ini" "$DEST/${HASH}.ini"
167+
echo "Staged: $DEST/${HASH}.ini"
168+
done < <(find downloaded/ -name "*.ini" -type f)
175169
ls -lR ini-pages/
176170
177171
- name: Deploy INI files to GitHub Pages

.github/workflows/unit-tests.yaml

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,18 @@ on:
88
workflow_dispatch:
99

1010
jobs:
11-
build-firmware:
11+
build-unit-tests:
1212
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
board:
17+
- mazduino-lite
18+
- mazduino-compact
19+
- mazduino-mini6ch
20+
- mazduino-mega100
21+
- mazduino-mega100-512
22+
1323
steps:
1424
- uses: webfactory/ssh-agent@v0.9.0
1525
with:
@@ -27,25 +37,18 @@ jobs:
2737
distribution: 'zulu'
2838
java-version: '11'
2939

30-
- name: Test Java Compiler
31-
shell: bash
32-
run: javac -version
33-
3440
- name: Print Compiler version
35-
shell: bash
3641
run: gcc -v
3742

3843
- name: Set Env Variables
39-
id: set-env-variables
40-
shell: bash
4144
run: |
42-
: Set Env Variables
43-
ABSOLUTE_BOARD_DIR=${{github.workspace}}
44-
echo "ABSOLUTE_BOARD_DIR=$ABSOLUTE_BOARD_DIR" >> $GITHUB_ENV
45+
echo "ABSOLUTE_BOARD_DIR=${{ github.workspace }}/boards/${{ matrix.board }}" >> $GITHUB_ENV
4546
echo "META_OUTPUT_ROOT_FOLDER=$(realpath --relative-to=ext/rusefi/firmware generated)/" >> $GITHUB_ENV
4647
4748
- name: Compile and execute Unit Tests
48-
shell: bash
4949
run: |
50-
: Compile and execute Unit Tests
51-
bash bin/compile_and_run_unit_tests.sh
50+
MI=$(realpath boards/${{ matrix.board }}/meta-info.env)
51+
cd ext/rusefi/unit_tests/
52+
source ../firmware/config/boards/common_script_read_meta_env.inc "$MI"
53+
make -j$(nproc)
54+
timeout 20m build/rusefi_test

0 commit comments

Comments
 (0)