Skip to content

Commit c56c3fe

Browse files
committed
Automatic ICD generation
1 parent 3b56ea9 commit c56c3fe

File tree

2 files changed

+69
-1
lines changed

2 files changed

+69
-1
lines changed

.github/workflows/pages.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: pages.yml
2+
on:
3+
push:
4+
branches:
5+
- "main_protected"
6+
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: false
17+
18+
jobs:
19+
build:
20+
name: "Generate pages"
21+
runs-on: "ubuntu-22.04"
22+
23+
environment:
24+
name: github-pages
25+
url: ${{ steps.deployment.outputs.page_url }}
26+
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
- name: Setup Pages
31+
uses: actions/configure-pages@v5
32+
33+
- name: Disable man-db auto-update
34+
run: sudo rm -f /var/lib/man-db/auto-update
35+
36+
- name: Generate skeleton
37+
run: |
38+
mkdir -p _site
39+
cat << EOF > _site/index.html
40+
<!DOCTYPE html>
41+
<meta charset=utf-8>
42+
<title>Redirecting...</title>
43+
<link rel=canonical href="./icd/">
44+
<meta http-equiv=refresh content="0; url=./icd/">
45+
EOF
46+
47+
mkdir -p _site/icd
48+
49+
- name: Download & install asn1scc
50+
working-directory: ${{ runner.temp }}
51+
run: |
52+
wget "https://github.com/scsd-cdh/asn1scc/releases/latest/download/asn1scc.linux.x86_64.zip" -O asn1scc.zip
53+
unzip -d asn1scc asn1scc.zip
54+
55+
- name: Generate ICD
56+
run: |
57+
${{ runner.temp }}/asn1scc/asn1scc --icdacn icd.html APP/_asn1/*.asn1
58+
mv icd.css _site/icd/icd.css
59+
mv icd.html _site/icd/index.html
60+
61+
- name: Upload artifact
62+
uses: actions/upload-pages-artifact@v3
63+
with:
64+
path: '_site'
65+
66+
- name: Deploy to GitHub Pages
67+
id: deployment
68+
uses: actions/deploy-pages@v4

APP/CDH_App/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ asn1scc_generate_c(app ../_asn1/_systems.asn1 ../_asn1/bms.asn1 EXTRA_OPTS --sli
2121
add_custom_command(
2222
TARGET app
2323
POST_BUILD
24-
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/icd_new.html ${CMAKE_CURRENT_LIST_DIR}/../_asn1/icd.html
24+
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/icd.html ${CMAKE_CURRENT_LIST_DIR}/../_asn1/icd.html
2525
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/icd.css ${CMAKE_CURRENT_LIST_DIR}/../_asn1/icd.css
2626
)

0 commit comments

Comments
 (0)