Re-work to use openscad_docsgen package.

This commit is contained in:
Garth Minette
2021-02-19 19:56:43 -08:00
parent f0e7bd8597
commit 6cfbc538fc
36 changed files with 1154 additions and 1879 deletions

View File

@@ -1,38 +1,37 @@
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run. Triggers the workflow on push events but only for the master branch
on:
push:
branches:
- master
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
GenerateDocs:
# The type of runner that the job will run on
runs-on: macos-10.15
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Wiki Checkout
env:
GH_PAT: ${{ secrets.GH_PAT }}
run: |
cd $GITHUB_WORKSPACE
git clone https://${GH_PAT}@github.com/revarbat/BOSL2.wiki.git
cd BOSL2.wiki
git config user.name "revarbat"
git config user.email "revarbat@users.noreply.github.com"
git config user.name github-actions
git config user.email github-actions@github.com
- name: Checkout Wiki
uses: actions/checkout@v2
with:
repository: ${{github.repository}}.wiki
path: BOSL2.wiki
run: |
git config user.name github-actions
git config user.email github-actions@github.com
- name: Install Pillow
run: sudo pip3 install Pillow
- name: Install Docsgen
run: sudo pip3 install openscad_docsgen
- name: Install OpenSCAD
run: |
curl -L -o OpenSCAD.dmg https://files.openscad.org/snapshots/OpenSCAD-2021.01.04.dmg
curl -L -o OpenSCAD.dmg https://files.openscad.org/OpenSCAD-2021.01.dmg
hdiutil attach OpenSCAD.dmg
cp -a /Volumes/OpenSCAD/OpenSCAD.app /Applications/
@@ -47,11 +46,20 @@ jobs:
./scripts/gencheat.sh
- name: Generating Docs
env:
GH_PAT: ${{ secrets.GH_PAT }}
run: |
cd $GITHUB_WORKSPACE
export OPENSCADPATH=$(dirname $GITHUB_WORKSPACE)
./scripts/make_all_docs.sh -i && cd BOSL2.wiki && git add --all && ( git commit -m "Wiki docs auto-regen." && git push --set-upstream https://${GH_PAT}@github.com/revarbat/BOSL2.wiki.git master || true )
openscad-docsgen -m -i -t -c *.scad
cd BOSL2.wiki
git add --all
git commit -m "Wiki docs auto-regen."
git push
- name: Bump Release Version
run: |
cd $GITHUB_WORKSPACE
./scripts/increment_version.sh
git add version.scad
git commit -m "Bump release version."
git push

View File

@@ -1,30 +1,24 @@
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on: [pull_request]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Regressions:
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Wiki Checkout
run: |
cd $GITHUB_WORKSPACE
git clone https://github.com/revarbat/BOSL2.wiki.git
- name: Checkout Wiki
uses: actions/checkout@v2
with:
repository: ${{github.repository}}.wiki
path: BOSL2.wiki
- name: Get OpenSCAD Appimage
- name: Install OpenSCAD
run: |
cd $GITHUB_WORKSPACE
wget https://files.openscad.org/snapshots/OpenSCAD-2021.01.03.ai6611-a980a3a-x86_64.AppImage
sudo mv OpenSCAD-2021.01.03.*-x86_64.AppImage /usr/local/bin/openscad
wget https://files.openscad.org/OpenSCAD-2021.01-x86_64.AppImage
sudo mv OpenSCAD-2021.01*-x86_64.AppImage /usr/local/bin/openscad
sudo chmod +x /usr/local/bin/openscad
- name: Run Regression Tests
@@ -34,38 +28,33 @@ jobs:
./scripts/run_tests.sh
CheckDocs:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout
uses: actions/checkout@v2
- name: Wiki Checkout
run: |
cd $GITHUB_WORKSPACE
git clone https://github.com/revarbat/BOSL2.wiki.git
- name: Checkout Wiki
uses: actions/checkout@v2
with:
repository: ${{github.repository}}.wiki
path: BOSL2.wiki
- name: Install Python dev
run: sudo apt-get install python3-pip python3-dev python3-setuptools python3-pil
- name: Install OpenSCAD-DocsGen package.
run: sudo pip3 install openscad-docsgen
- name: Install OpenSCAD
run: |
cd $GITHUB_WORKSPACE
wget https://files.openscad.org/snapshots/OpenSCAD-2021.01.03.ai6611-a980a3a-x86_64.AppImage
sudo mv OpenSCAD-2021.01.03.*-x86_64.AppImage /usr/local/bin/openscad
wget https://files.openscad.org/OpenSCAD-2021.01-x86_64.AppImage
sudo mv OpenSCAD-2021.01*-x86_64.AppImage /usr/local/bin/openscad
sudo chmod +x /usr/local/bin/openscad
- name: Generate Index
run: |
cd $GITHUB_WORKSPACE
./scripts/genindex.sh
- name: Generating Docs
run: |
cd $GITHUB_WORKSPACE
export OPENSCADPATH=$(dirname $GITHUB_WORKSPACE)
./scripts/make_all_docs.sh -t -i
openscad-docsgen -T *.scad