-
-
Notifications
You must be signed in to change notification settings - Fork 4
67 lines (54 loc) · 1.72 KB
/
Copy pathbuild.yml
File metadata and controls
67 lines (54 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Build and Sync
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Update z-core submodule
run: |
git submodule update --remote --merge
echo "Submodule updated to latest remote version."
- name: Test Z-Scanner
run: |
echo "Running scanner on examples/..."
mkdir -p include
python3 z-core/zscanner.py examples/ include/z_registry.h
if [ -f "include/z_registry.h" ]; then
echo "Scanner successfully generated registry!"
cat include/z_registry.h
else
echo "::error::Scanner failed to generate registry file."
exit 1
fi
rm -rf include
- name: Build Library
run: make bundle
- name: Run Unit Tests
run: |
echo "Running C and C++ Test Suites..."
# Runs the 'test' target from your Makefile.
# If it fails (non-zero exit), we print an error and exit.
make test || { echo "::error::Unit tests failed! Check the logs above for assertion errors."; exit 1; }
- name: Commit and Push changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Auto-update: Bump z-core and regenerate zvec.h [skip ci]"
file_pattern: '.'