Skip to content

Commit e93fe11

Browse files
committed
chore: production-ready CI/CD
Apply the production-ready CI/CD plan: - Phase 1: cross-cutting workflow fixes (action version pins, book-build path fix, video-build dynamic version + guards, permissions+concurrency blocks) - Phase 2: per-repo CI hardening (drop continue-on-error, add OS/compiler matrices, fix repo-specific bugs) - Phase 3: complete release matrix (Linux/Windows/macOS/embedded binaries, real CycloneDX + SPDX SBOMs via anchore/sbom-action, cosign keyless signing, conditional Apple notarization / Authenticode / GPG signing gated on secrets) All workflow files pass actionlint clean.
1 parent 85d4cc6 commit e93fe11

11 files changed

Lines changed: 332 additions & 84 deletions

.github/workflows/book-build.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,20 @@ jobs:
4242
- name: Check book source
4343
id: check
4444
run: |
45-
if [ ! -f book.md ]; then
45+
if [ ! -f docs/book/book.md ]; then
4646
echo "has_book=false" >> $GITHUB_OUTPUT
4747
echo "lines=0" >> $GITHUB_OUTPUT
4848
echo "images=0" >> $GITHUB_OUTPUT
4949
echo "tables=0" >> $GITHUB_OUTPUT
50-
echo "WARNING: book.md not found"
50+
echo "WARNING: docs/book/book.md not found"
5151
exit 0
5252
fi
5353
echo "has_book=true" >> $GITHUB_OUTPUT
54-
LINES=$(wc -l < book.md)
55-
IMAGES=$(grep -c '!\[' book.md || echo 0)
56-
TABLES=$(grep -c '^|' book.md || echo 0)
57-
CODE=$(grep -c '```' book.md || echo 0)
58-
CHAPTERS=$(grep -c '^## ' book.md || echo 0)
54+
LINES=$(wc -l < docs/book/book.md)
55+
IMAGES=$(grep -c '!\[' docs/book/book.md || echo 0)
56+
TABLES=$(grep -c '^|' docs/book/book.md || echo 0)
57+
CODE=$(grep -c '```' docs/book/book.md || echo 0)
58+
CHAPTERS=$(grep -c '^## ' docs/book/book.md || echo 0)
5959
echo "lines=$LINES" >> $GITHUB_OUTPUT
6060
echo "images=$IMAGES" >> $GITHUB_OUTPUT
6161
echo "tables=$TABLES" >> $GITHUB_OUTPUT
@@ -104,7 +104,7 @@ jobs:
104104
105105
- name: Clean source
106106
run: |
107-
sed -i 's/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]//g' book.md
107+
sed -i 's/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]//g' docs/book/book.md
108108
echo "Control characters cleaned"
109109
110110
- name: Extract metadata
@@ -114,9 +114,9 @@ jobs:
114114
echo "repo_name=$REPO_NAME" >> $GITHUB_OUTPUT
115115
echo "pdf_name=${REPO_NAME}-guide.pdf" >> $GITHUB_OUTPUT
116116
# Extract title from frontmatter or first heading
117-
TITLE=$(grep -m1 '^title:' book.md | sed 's/^title: *"*//;s/"*$//' || echo "")
117+
TITLE=$(grep -m1 '^title:' docs/book/book.md | sed 's/^title: *"*//;s/"*$//' || echo "")
118118
if [ -z "$TITLE" ]; then
119-
TITLE=$(head -10 book.md | grep "^# " | head -1 | sed 's/^# //')
119+
TITLE=$(head -10 docs/book/book.md | grep "^# " | head -1 | sed 's/^# //')
120120
fi
121121
if [ -z "$TITLE" ]; then TITLE="$REPO_NAME — Official Guide"; fi
122122
echo "title=$TITLE" >> $GITHUB_OUTPUT

.github/workflows/build.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ on:
66
pull_request:
77
branches: [master, main]
88

9+
permissions:
10+
contents: read
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
916
jobs:
1017
test-host:
1118
name: Host Build & Tests

.github/workflows/ci.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ concurrency:
1313
group: ${{ github.workflow }}-${{ github.ref }}
1414
cancel-in-progress: true
1515

16+
permissions:
17+
contents: read
18+
1619
jobs:
1720
build:
1821
name: Build (${{ matrix.os }})
1922
runs-on: ${{ matrix.os }}
20-
continue-on-error: true
2123
strategy:
2224
fail-fast: false
2325
matrix:
@@ -27,15 +29,13 @@ jobs:
2729
- name: Configure
2830
run: cmake -B build -DEBLDR_BUILD_TESTS=ON
2931
- name: Build
30-
run: cmake --build build --config Release
32+
run: cmake --build build --config Release --parallel
3133
- name: Test
32-
if: runner.os == 'Linux'
3334
run: ctest --test-dir build --output-on-failure -C Release
3435

3536
cross-compile:
3637
name: Cross (${{ matrix.board }})
3738
runs-on: ubuntu-latest
38-
continue-on-error: true
3939
strategy:
4040
fail-fast: false
4141
matrix:
@@ -57,7 +57,7 @@ jobs:
5757
- name: Install cross-compiler
5858
run: |
5959
sudo apt-get update
60-
sudo apt-get install -y ${{ matrix.pkg }} || true
60+
sudo apt-get install -y ${{ matrix.pkg }}
6161
- name: Cross-compile
6262
run: |
6363
if [ -f "${{ matrix.toolchain }}" ]; then
@@ -67,30 +67,28 @@ jobs:
6767
cmake -B build -DEBLDR_BOARD=${{ matrix.board }} \
6868
-DCMAKE_SYSTEM_NAME=Linux
6969
fi
70-
cmake --build build || true
70+
cmake --build build --parallel
7171
7272
sanitize:
7373
name: Sanitizers
7474
runs-on: ubuntu-latest
75-
continue-on-error: true
7675
steps:
7776
- uses: actions/checkout@v4
7877
- name: Build with sanitizers
7978
run: |
8079
cmake -B build \
8180
-DEBLDR_BUILD_TESTS=ON \
8281
-DEBLDR_SANITIZE=ON
83-
cmake --build build
82+
cmake --build build --parallel
8483
- name: Run tests under sanitizers
85-
run: ctest --test-dir build --output-on-failure
8684
env:
8785
ASAN_OPTIONS: detect_leaks=1:halt_on_error=1
8886
UBSAN_OPTIONS: halt_on_error=1
87+
run: ctest --test-dir build --output-on-failure
8988

9089
security-hardening:
9190
name: Security Hardening Build
9291
runs-on: ubuntu-latest
93-
continue-on-error: true
9492
steps:
9593
- uses: actions/checkout@v4
9694
- name: Build with all security options
@@ -101,6 +99,6 @@ jobs:
10199
-DEBLDR_REQUIRE_SIGNATURES=ON \
102100
-DEBLDR_RECOVERY_AUTH=ON \
103101
-DEBLDR_VERIFY_STAGE1=ON
104-
cmake --build build
102+
cmake --build build --parallel
105103
- name: Run tests
106-
run: ctest --test-dir build --output-on-failure
104+
run: ctest --test-dir build --output-on-failure

.github/workflows/cross-repo-dispatch.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
push:
55
branches: [master]
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
notify-dependents:
912
name: Trigger dependent repos

.github/workflows/eosim-sanity.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ on:
88
env:
99
EOSIM_VERSION: "0.1.0"
1010

11+
permissions:
12+
contents: read
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: false
17+
1118
jobs:
1219
install-validate:
1320
name: Install & Validate (${{ matrix.os }}, Python ${{ matrix.python-version }})

.github/workflows/nightly.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ on:
55
- cron: "0 2 * * *" # 2:00 AM UTC daily
66
workflow_dispatch: # Manual trigger
77

8+
permissions:
9+
contents: read
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: false
14+
815
jobs:
916
native-build:
1017
name: Native (${{ matrix.os }})

0 commit comments

Comments
 (0)