|
3 | 3 | push: |
4 | 4 | branches: |
5 | 5 | - '*' |
6 | | - #pull_request: |
7 | | - # branches: |
8 | | - # - '*' |
9 | 6 | jobs: |
10 | | - build: |
11 | | - name: Build (${{ matrix.python-version }}, ${{ matrix.os }}) |
| 7 | + test: |
| 8 | + name: Test on ${{ matrix.os }} |
12 | 9 | runs-on: ${{ matrix.os }} |
13 | 10 | strategy: |
14 | 11 | fail-fast: false |
15 | 12 | matrix: |
16 | 13 | os: ['ubuntu-latest', 'windows-latest'] |
17 | | - python-version: ['3.12'] |
18 | 14 | steps: |
19 | 15 | - name: "Download" |
20 | | - uses: actions/checkout@v2 |
21 | | - - name: "Install miniconda" |
22 | | - uses: conda-incubator/setup-miniconda@v2 |
| 16 | + uses: actions/checkout@v5 |
| 17 | + - name: "Install OpenGL" |
| 18 | + if: ${{ matrix.os == 'ubuntu-latest' }} |
| 19 | + run: | |
| 20 | + sudo apt-get update |
| 21 | + sudo apt-get -q -y install libegl-dev libglx-dev libxi-dev |
| 22 | + - name: "Create environment" |
| 23 | + uses: mamba-org/setup-micromamba@v2 |
23 | 24 | with: |
24 | | - auto-update-conda: true |
25 | | - python-version: ${{ matrix.python-version }} |
26 | | - - name: "Configure conda" |
| 25 | + environment-file: environment.yml |
| 26 | + cache-environment: true |
| 27 | + - name: "Install declaracad" |
| 28 | + shell: bash -l {0} |
27 | 29 | run: | |
28 | | - conda info |
29 | | - conda config --add channels conda-forge |
30 | | - conda install nomkl |
31 | | - - name: "Install compiler" |
32 | | - if: ${{ matrix.os == 'ubuntu-latest' }} |
| 30 | + python -m pip install -e . |
| 31 | + python -m pip install pytest pytest-qt flake8 isort black mypy |
| 32 | + - name: "Run tests" |
33 | 33 | shell: bash -l {0} |
| 34 | + env: |
| 35 | + QT_QPA_PLATFORM: xcb |
| 36 | + run: python -m pytest tests |
| 37 | + |
| 38 | + build: |
| 39 | + name: Build on ${{ matrix.os }} |
| 40 | + runs-on: ${{ matrix.os }} |
| 41 | + needs: test |
| 42 | + strategy: |
| 43 | + fail-fast: false |
| 44 | + matrix: |
| 45 | + os: ['ubuntu-latest', 'windows-latest'] |
| 46 | + steps: |
| 47 | + - name: "Download" |
| 48 | + uses: actions/checkout@v5 |
| 49 | + - name: "Install OpenGL" |
| 50 | + if: ${{ matrix.os == 'ubuntu-latest' }} |
34 | 51 | run: | |
35 | | - conda install gxx_linux-64 |
36 | | - - name: "Install" |
| 52 | + sudo apt-get update |
| 53 | + sudo apt-get -q -y install libegl-dev libglx-dev libxi-dev |
| 54 | + - name: "Create environment" |
| 55 | + uses: mamba-org/setup-micromamba@v2 |
| 56 | + with: |
| 57 | + environment-file: environment.yml |
| 58 | + cache-environment: true |
| 59 | + - name: "Install declaracad" |
37 | 60 | shell: bash -l {0} |
38 | 61 | run: | |
39 | | - conda install -c trelau -c conda-forge pyocct |
40 | 62 | python -m pip install -e . |
41 | 63 | python -m pip install cx-freeze |
42 | 64 | - name: "Build dist" |
43 | 65 | if: ${{ matrix.os == 'ubuntu-latest' }} |
44 | 66 | shell: bash -l {0} |
45 | | - run: | |
46 | | - python release.py bdist |
| 67 | + env: |
| 68 | + QT_QPA_PLATFORM: xcb |
| 69 | + run: python release.py bdist |
47 | 70 | - name: "Build msi" |
48 | 71 | if: ${{ matrix.os == 'windows-latest' }} |
49 | 72 | shell: bash -l {0} |
50 | | - run: | |
51 | | - python release.py bdist_msi |
| 73 | + run: python release.py bdist_msi |
52 | 74 | - name: "Upload package" |
53 | | - uses: actions/upload-artifact@v2 |
| 75 | + uses: actions/upload-artifact@v4 |
54 | 76 | with: |
55 | | - name: declaracad-py${{ matrix.python-version }}-${{ matrix.os }} |
| 77 | + name: declaracad-${{ matrix.os }} |
56 | 78 | path: dist/declaracad-* |
0 commit comments