mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-01-07 12:49:46 +00:00
Merge pull request #583 from revarbat/revarbat_dev
Added tabs code check.
This commit is contained in:
commit
fb7a7e75b8
6 changed files with 31 additions and 159 deletions
15
.github/check_for_tabs.json
vendored
Normal file
15
.github/check_for_tabs.json
vendored
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
"problemMatcher": [
|
||||||
|
{
|
||||||
|
"owner": "check_for_tabs",
|
||||||
|
"pattern": [
|
||||||
|
{
|
||||||
|
"regexp": "^([^:]+):(\\d+):(.*)$",
|
||||||
|
"file": 1,
|
||||||
|
"line": 2,
|
||||||
|
"message": 3
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
60
.github/workflows/docsgen.yml
vendored
60
.github/workflows/docsgen.yml
vendored
|
@ -1,60 +0,0 @@
|
||||||
name: Docs
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches: [master]
|
|
||||||
types: [closed]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
GenerateDocs:
|
|
||||||
if: github.event.pull_request.merged == true
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Checkout Wiki
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
repository: revarbat/BOSL2.wiki
|
|
||||||
path: BOSL2.wiki
|
|
||||||
|
|
||||||
- name: Apt Update
|
|
||||||
run: sudo apt update
|
|
||||||
|
|
||||||
- name: Install Packages
|
|
||||||
run: sudo apt-get install -y python3-pip python3-dev python3-setuptools python3-pil gifsicle
|
|
||||||
|
|
||||||
- name: Install openscad-docsgen
|
|
||||||
run: sudo pip3 install openscad_docsgen
|
|
||||||
|
|
||||||
- name: Install OpenSCAD
|
|
||||||
run: |
|
|
||||||
cd $GITHUB_WORKSPACE
|
|
||||||
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
|
|
||||||
echo "::add-matcher::.github/openscad_docsgen.json"
|
|
||||||
|
|
||||||
- name: Generating Docs Headless
|
|
||||||
run: |
|
|
||||||
export OPENSCADPATH=$(dirname $GITHUB_WORKSPACE)
|
|
||||||
xvfb-run --server-args="-screen 0, 1280x720x24" -a \
|
|
||||||
openscad-docsgen -ticmI *.scad
|
|
||||||
|
|
||||||
- name: Commit Wiki Docs
|
|
||||||
run: |
|
|
||||||
cd $GITHUB_WORKSPACE/BOSL2.wiki
|
|
||||||
git config user.name github-actions
|
|
||||||
git config user.email github-actions@github.com
|
|
||||||
git add --all
|
|
||||||
git commit -m "Wiki docs auto-regen." && git push || true
|
|
||||||
|
|
||||||
- name: Bump Release Version
|
|
||||||
run: |
|
|
||||||
cd $GITHUB_WORKSPACE
|
|
||||||
./scripts/increment_version.sh
|
|
||||||
git config user.name github-actions
|
|
||||||
git config user.email github-actions@github.com
|
|
||||||
git add version.scad
|
|
||||||
git commit -m "Bump release version." && git push || true
|
|
||||||
|
|
49
.github/workflows/forced_docsgen.yml
vendored
49
.github/workflows/forced_docsgen.yml
vendored
|
@ -1,49 +0,0 @@
|
||||||
name: FDocs
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
branches: [master]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
GenerateDocs:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Checkout Wiki
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
repository: revarbat/BOSL2.wiki
|
|
||||||
path: BOSL2.wiki
|
|
||||||
|
|
||||||
- name: Apt Update
|
|
||||||
run: sudo apt update
|
|
||||||
|
|
||||||
- name: Install Packages
|
|
||||||
run: sudo apt-get install -y python3-pip python3-dev python3-setuptools python3-pil gifsicle
|
|
||||||
|
|
||||||
- name: Install openscad-docsgen
|
|
||||||
run: sudo pip3 install openscad_docsgen
|
|
||||||
|
|
||||||
- name: Install OpenSCAD
|
|
||||||
run: |
|
|
||||||
cd $GITHUB_WORKSPACE
|
|
||||||
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
|
|
||||||
echo "::add-matcher::.github/openscad_docsgen.json"
|
|
||||||
|
|
||||||
- name: Generating Docs Headless
|
|
||||||
run: |
|
|
||||||
export OPENSCADPATH=$(dirname $GITHUB_WORKSPACE)
|
|
||||||
xvfb-run --server-args="-screen 0, 1280x720x24" -a \
|
|
||||||
openscad-docsgen -ticmIf *.scad
|
|
||||||
|
|
||||||
- name: Commit Wiki Docs
|
|
||||||
run: |
|
|
||||||
cd $GITHUB_WORKSPACE/BOSL2.wiki
|
|
||||||
git config user.name github-actions
|
|
||||||
git config user.email github-actions@github.com
|
|
||||||
git add --all
|
|
||||||
git commit -m "Wiki docs auto-regen." && git push || true
|
|
||||||
|
|
8
.github/workflows/main.yml
vendored
8
.github/workflows/main.yml
vendored
|
@ -1,4 +1,4 @@
|
||||||
name: CI
|
name: Checks
|
||||||
on: [pull_request]
|
on: [pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -49,6 +49,12 @@ jobs:
|
||||||
sudo mv OpenSCAD-2021.01*-x86_64.AppImage /usr/local/bin/openscad
|
sudo mv OpenSCAD-2021.01*-x86_64.AppImage /usr/local/bin/openscad
|
||||||
sudo chmod +x /usr/local/bin/openscad
|
sudo chmod +x /usr/local/bin/openscad
|
||||||
|
|
||||||
|
- name: Tabs Check
|
||||||
|
run: |
|
||||||
|
cd $GITHUB_WORKSPACE
|
||||||
|
echo "::add-matcher::.github/check_for_tabs.json"
|
||||||
|
./scripts/check_for_tabs.sh
|
||||||
|
|
||||||
- name: Checking Docs
|
- name: Checking Docs
|
||||||
run: |
|
run: |
|
||||||
cd $GITHUB_WORKSPACE
|
cd $GITHUB_WORKSPACE
|
||||||
|
|
49
.github/workflows/testwf.yml
vendored
49
.github/workflows/testwf.yml
vendored
|
@ -1,49 +0,0 @@
|
||||||
name: TestWorkflow
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
branches: [master]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
TestJob:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Checkout Wiki
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
repository: revarbat/BOSL2.wiki
|
|
||||||
path: BOSL2.wiki
|
|
||||||
|
|
||||||
- name: Setup OpenGL
|
|
||||||
uses: openrndr/setup-opengl@v1.1
|
|
||||||
|
|
||||||
- name: Apt Update
|
|
||||||
run: sudo apt update
|
|
||||||
|
|
||||||
- name: Install Packages
|
|
||||||
run: sudo apt-get install -y python3-pip python3-dev python3-setuptools python3-pil gifsicle
|
|
||||||
|
|
||||||
- name: Install openscad-docsgen
|
|
||||||
run: sudo pip3 install openscad_docsgen
|
|
||||||
|
|
||||||
- name: Install OpenSCAD
|
|
||||||
run: |
|
|
||||||
cd $GITHUB_WORKSPACE
|
|
||||||
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
|
|
||||||
echo "::add-matcher::.github/openscad_docsgen.json"
|
|
||||||
|
|
||||||
- name: Make SCAD File
|
|
||||||
run: |
|
|
||||||
cd $GITHUB_WORKSPACE
|
|
||||||
echo "cube(50, center=100);" > testwf.scad
|
|
||||||
|
|
||||||
- name: TestScript
|
|
||||||
run: |
|
|
||||||
export OPENSCADPATH=$(dirname $GITHUB_WORKSPACE)
|
|
||||||
xvfb-run --server-args="-screen 0, 1280x720x24" -a \
|
|
||||||
glxinfo
|
|
||||||
|
|
9
scripts/check_for_tabs.sh
Executable file
9
scripts/check_for_tabs.sh
Executable file
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if grep -H -n -P '\t' *.scad ; then
|
||||||
|
echo "Tabs found in source code." 2>&1
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue