forked from bguan/pylele
-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (86 loc) · 3.11 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
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