Skip to content

chore: trigger isolated AC-flow validation #2

chore: trigger isolated AC-flow validation

chore: trigger isolated AC-flow validation #2

name: freeze-ac-flow-v2
on:
push:
branches:
- clean/freeze-export-ac-flow-v2
permissions:
contents: write
jobs:
rewrite-test-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: 3.x
- uses: mlugg/setup-zig@v2
with:
version: 0.16.0
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pre-commit
- name: Rewrite from clean base
run: |
cp .github/freeze_ac_flow_v2.py /tmp/freeze_ac_flow_v2.py
git reset --hard 842d69946d28d6fba46dc02f5ccacaf3db627b7c
python /tmp/freeze_ac_flow_v2.py
- name: Format and lint changed source
run: |
pre-commit run --files \
apps/predbat/prediction.py \
apps/predbat/prediction_kernel.cpp \
apps/predbat/prediction_kernel.py \
apps/predbat/tests/test_model.py || true
pre-commit run --files \
apps/predbat/prediction.py \
apps/predbat/prediction_kernel.cpp \
apps/predbat/prediction_kernel.py \
apps/predbat/tests/test_model.py
- name: Build native kernel
run: bash apps/predbat/build_kernel.sh
- name: Run quick unit tests
env:
PREDBAT_KERNEL_REQUIRED: "1"
run: |
cd coverage
python3 ../apps/predbat/unit_test.py --quick
- name: Run kernel parity test
run: |
cd coverage
./run_all --test kernel_parity
- name: Cross-build kernel binaries
run: bash apps/predbat/build_kernel_cross.sh
- name: Verify checked-in x86_64 kernel
run: |
cd coverage
python3 ../apps/predbat/verify_kernel_binary.py ../apps/predbat/prediction_kernel_lib_x86_64.so
- name: Publish one clean commit to main
run: |
git add \
apps/predbat/prediction.py \
apps/predbat/prediction_kernel.cpp \
apps/predbat/prediction_kernel.py \
apps/predbat/tests/test_model.py \
apps/predbat/prediction_kernel_lib_*.so
git diff --cached --check
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git commit -m "fix(prediction): allow Freeze Export residual discharge to reach grid"
git fetch origin main
test "$(git rev-parse origin/main)" = "842d69946d28d6fba46dc02f5ccacaf3db627b7c"
git push origin HEAD:refs/heads/main --force-with-lease=refs/heads/main:842d69946d28d6fba46dc02f5ccacaf3db627b7c
git push origin HEAD:refs/heads/clean/freeze-export-ac-flow-v2 --force