2021-08-03 06:05:19 +10:00
|
|
|
name: CI
|
|
|
|
|
2021-08-03 06:08:38 +10:00
|
|
|
on:
|
2021-08-03 06:05:19 +10:00
|
|
|
push:
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2021-08-03 06:08:38 +10:00
|
|
|
runs-on: ubuntu-latest
|
2021-08-03 06:05:19 +10:00
|
|
|
|
|
|
|
steps:
|
2021-08-03 06:55:14 +10:00
|
|
|
- uses: actions/checkout@v2
|
2021-08-03 07:59:49 +10:00
|
|
|
# x11 server needed for png output lol
|
|
|
|
- name: Setup xvfb (Linux)
|
|
|
|
if: runner.os == 'Linux'
|
|
|
|
run: |
|
|
|
|
sudo apt-get install -y xvfb libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xinput0 libxcb-xfixes0
|
|
|
|
# start xvfb in the background
|
|
|
|
sudo /usr/bin/Xvfb $DISPLAY -screen 0 1280x1024x24 &
|
|
|
|
- name: Install openscad
|
|
|
|
run: sudo apt-get install openscad
|
2021-08-03 07:34:11 +10:00
|
|
|
- run: mkdir tests/output/
|
2021-08-03 07:36:58 +10:00
|
|
|
- run: touch tests/empty.scad
|
2021-08-03 07:34:11 +10:00
|
|
|
- run: 'openscad -o "tests/output/test.stl" "tests/test.scad"'
|
2021-08-03 07:52:18 +10:00
|
|
|
- run: openscad tests/empty.scad -D 'color(0.5,0,0,0.5)import("test.stl");color(0,0.5,0,0.5)import("output/test.stl");' -o output.png
|
2021-08-03 07:48:51 +10:00
|
|
|
# - run: du -B 1 output.stl
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: test-output
|
|
|
|
path: output.png
|
|
|
|
# - run: |
|
|
|
|
# git config --global user.name 'KeyV2 GHA Bot'
|
|
|
|
# git config --global user.email 'keyv2-gha-bot@users.noreply.github.com'
|
|
|
|
# git add -A
|
|
|
|
# git commit -m "Update test stls"
|
|
|
|
# git push
|