#132 #519
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build printable files | |
on: | |
push: | |
paths: | |
- '**.scad' | |
- '**.ini' | |
branches: | |
- '*' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
// printer: [mini, edee, mlab3d] | |
printer: [mini] | |
env: | |
OPENSCAD_BIN: xvfb-run --auto-servernum ~/OpenSCAD.AppImage | |
SLIC3R_BIN: PrusaSlicer | |
PRINTER: ${{ matrix.printer }} | |
steps: | |
- uses: FranzDiebold/github-env-vars-action@v2 | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
token: ${{ secrets.GITHUBPAT }} | |
submodules: recursive | |
- name: Install requirements | |
run: | | |
sudo apt-get update | |
wget https://github.com/prusa3d/PrusaSlicer/releases/download/version_2.6.0/PrusaSlicer-2.6.0+linux-x64-GTK3-202306191220.AppImage -O ~/prusa-slicer.AppImage | |
chmod +x ~/prusa-slicer.AppImage | |
sudo cp ~/prusa-slicer.AppImage /usr/local/bin/PrusaSlicer | |
wget https://files.openscad.org/OpenSCAD-2021.01-x86_64.AppImage -O ~/OpenSCAD.AppImage | |
chmod +x ~/OpenSCAD.AppImage | |
sudo apt-get install libc-bin python3-setuptools xvfb libglu1-mesa libglu1 libegl1 | |
sudo python3 -m pip install --upgrade pip | |
sudo python3 -m pip install stlsort lxml matplotlib thumby==0.2.3 | |
sudo python3 -m pip install git+https://github.com/ThunderFly-aerospace/yagv@a541869d11d3c094f1d7a3ed4d3c0c30489398e9 | |
sudo python3 -m pip install git+https://${{ secrets.AUTH_USER }}:${{ secrets.GITHUBPAT }}@github.com/ThunderFly-aerospace/processor3D.git@PrusaSlicer | |
- name: Make | |
run: | | |
cd CAD/src/printplate; make | |
- name: Upload a AMF Artifact | |
uses: actions/[email protected] | |
with: | |
name: 'render_amf' | |
path: './**/*.amf' | |
- name: 'Anonymize gcode' | |
run: | | |
for f in CAD/gcode/*.gcode; do sed -e 's/; .*$//g' -e '/^$/d' -i $f; done | |
- name: Upload gcodes | |
uses: MLAB-project/push-generated-file@master | |
with: | |
source_file_path: 'CAD/gcode' | |
destination_folder: 'gcode' | |
destination_repo: 'ThunderFly-aerospace/gcodes' | |
target_branch: ${{env.CI_REPOSITORY}}/${{env.CI_REF_NAME}}/${{matrix.printer}} | |
token: ${{ secrets.GITHUBPAT }} |