Skip to content

Commit cc4ed4d

Browse files
committed
Update ci
1 parent a46d42f commit cc4ed4d

File tree

2 files changed

+49
-29
lines changed

2 files changed

+49
-29
lines changed

.github/workflows/ci.yml

Lines changed: 48 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,54 +3,76 @@ on:
33
push:
44
branches:
55
- '*'
6-
#pull_request:
7-
# branches:
8-
# - '*'
96
jobs:
10-
build:
11-
name: Build (${{ matrix.python-version }}, ${{ matrix.os }})
7+
test:
8+
name: Test on ${{ matrix.os }}
129
runs-on: ${{ matrix.os }}
1310
strategy:
1411
fail-fast: false
1512
matrix:
1613
os: ['ubuntu-latest', 'windows-latest']
17-
python-version: ['3.12']
1814
steps:
1915
- 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
2324
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}
2729
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"
3333
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' }}
3451
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"
3760
shell: bash -l {0}
3861
run: |
39-
conda install -c trelau -c conda-forge pyocct
4062
python -m pip install -e .
4163
python -m pip install cx-freeze
4264
- name: "Build dist"
4365
if: ${{ matrix.os == 'ubuntu-latest' }}
4466
shell: bash -l {0}
45-
run: |
46-
python release.py bdist
67+
env:
68+
QT_QPA_PLATFORM: xcb
69+
run: python release.py bdist
4770
- name: "Build msi"
4871
if: ${{ matrix.os == 'windows-latest' }}
4972
shell: bash -l {0}
50-
run: |
51-
python release.py bdist_msi
73+
run: python release.py bdist_msi
5274
- name: "Upload package"
53-
uses: actions/upload-artifact@v2
75+
uses: actions/upload-artifact@v4
5476
with:
55-
name: declaracad-py${{ matrix.python-version }}-${{ matrix.os }}
77+
name: declaracad-${{ matrix.os }}
5678
path: dist/declaracad-*

environment.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@ name: declaracad
33
channels:
44
- conda-forge
55
- defaults
6-
- https://codelv.com/assets/repo
6+
- https://repo.codelv.com
77

88
dependencies:
99
- python >=3.12
1010
- cxx-compiler
1111
- pybind11
12-
- pysmesh >=9.6
1312
- pyocct >=7.9
14-
- pychrono >=7.0

0 commit comments

Comments
 (0)