Skip to content

Fix electronics/project-box build script iteration #968

Fix electronics/project-box build script iteration

Fix electronics/project-box build script iteration #968

Workflow file for this run

---
name: Build
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
jobs:
Build:
runs-on: ubuntu-latest
steps:
- name: 💾 Check out repository
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'recursive'
- name: 🌿 Fetch base branch
run: |
git fetch origin "${GITHUB_BASE_REF}"
- name: 🪝 Cache pre-commit hooks
uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: "pre-commit-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml')
}}"
- name: 🛠️ Install tools
shell: bash
run: |
sudo apt update
sudo apt install -y openscad xvfb pandoc texlive-xetex
python3 -m pip install pre-commit scons
- name: 🔥 Run static checks
run: pre-commit run --all-files
- name: 🏗️ Render models
run: xvfb-run scons ref="origin/${GITHUB_BASE_REF}"
# Only render models for pull requests
if: ${{ github.event_name == 'pull_request' }}
- name: 📦 Save artifacts
uses: actions/upload-artifact@v3
with:
name: "Rendered Models"
path: |
**/build/*
!**/build/**/*.deps
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false