adapt worm_gear for solidpython 2.1.1 #461
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: TestUbuntu | |
on: [push] | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
# https://github.com/actions/setup-python/issues/853 | |
python-version: ["3.10", "3.11", "3.12"] | |
os: [ubuntu-latest, ubuntu-24.04, ubuntu-22.04] # latest and LTS | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# python packages included in install_dependencies | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: install dependencies | |
run: | | |
chmod +x ./install_dependencies.sh | |
sudo ./install_dependencies.sh | |
- name: pip configuration report | |
run: | | |
mkdir test | |
pip list > ./test/pip_list.txt | |
- name: Generate timestamp | |
id: timestamp | |
run: echo "timestamp=$(date +'%Y%m%d_%H%M%S')" >> $GITHUB_ENV | |
- name: test pylele.sh | |
run: | | |
source ./src/pylele.sh | |
- name: test pylele2.sh | |
run: | | |
source ./src/pylele2.sh -odoff | |
- name: upload demo stl | |
uses: actions/upload-artifact@v4 | |
with: | |
# path depends on the tag and the module name | |
name: pylele_stl_out_${{ matrix.python-version }}_${{ matrix.os }}_${{ env.timestamp }} | |
path: build/LeleAllAssembly/LeleAllAssembly.stl | |
# compression-level: 0 # no compression | |
# - name: convert to glb | |
# run: | | |
# python3 ./conversion/stl2glb.py build/LeleAllAssembly/LeleAllAssembly.stl | |
#- name: upload glb | |
# uses: actions/upload-artifact@v4 | |
# with: | |
# # path depends on the tag and the module name | |
# name: pylele_glb_out_${{ matrix.python-version }}_${{ matrix.os }} | |
# path: build/LeleAllAssembly/LeleAllAssembly.glb | |
# # compression-level: 0 # no compression | |
- name: test_b1scad | |
run: | | |
python3 ./src/b1scad/test.py | |
continue-on-error: true | |
- name: test_b13d | |
run: | | |
python3 ./src/b13d/test.py | |
continue-on-error: true | |
- name: test_pylele | |
run: | | |
source ./src/test.sh | |
continue-on-error: true | |
- name: upload test output | |
uses: actions/upload-artifact@v4 | |
with: | |
# path depends on the tag and the module name | |
name: pylele_test_out_${{ matrix.python-version }}_${{ matrix.os }}_${{ env.timestamp }} | |
path: test/**/**/**/* #find ./test/fretboard_assembly/cadquery/* | |
# - name: Authenticate gdrive with service account | |
# env: | |
# GDRIVE_CREDENTIALS: ${{ secrets.GDRIVE_CREDENTIALS }} | |
# run: | | |
# echo "$GDRIVE_CREDENTIALS" > /tmp/credentials.json | |
# gdrive about --service-account /tmp/credentials.json | |
#- name: Upload folder to Google Drive | |
# env: | |
# GDRIVE_CREDENTIALS: ${{ secrets.GDRIVE_CREDENTIALS }} | |
# run: | | |
# # Replace FOLDER_ID with your Google Drive folder ID | |
# gdrive upload -r --service-account /tmp/credentials.json --parent 1Ux3JPjgB9OOe-KMSFba3wrQu6IDjOamy test |