Skip to content

Commit 3b53992

Browse files
committed
upgrade CI workflows to latest compas actions
1 parent 1b06a86 commit 3b53992

File tree

2 files changed

+53
-56
lines changed

2 files changed

+53
-56
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -11,64 +11,16 @@ on:
1111
- 'compas-2.x-compat'
1212

1313
jobs:
14-
build-cpython:
14+
build:
15+
if: "!contains(github.event.pull_request.labels.*.name, 'docs-only')"
1516
runs-on: ${{ matrix.os }}
1617
strategy:
1718
matrix:
18-
name: [
19-
"windows-py38",
20-
"macos-py39",
21-
"ubuntu-py39",
22-
]
23-
include:
24-
- name: "windows-py38"
25-
os: windows-latest
26-
python-version: 3.8
27-
- name: "macos-py39"
28-
os: macos-latest
29-
python-version: 3.9
30-
- name: "ubuntu-py39"
31-
os: ubuntu-latest
32-
python-version: 3.9
19+
os: [ubuntu-latest, macos-latest, windows-latest]
20+
python: ['3.8', '3.9', '3.10']
21+
3322
steps:
34-
- uses: actions/checkout@v2
35-
- name: Set up Python ${{ matrix.python-version }}
36-
uses: actions/setup-python@v2
23+
- uses: compas-dev/compas-actions.build@v3
3724
with:
38-
python-version: ${{ matrix.python-version }}
39-
- name: Install dependencies
40-
run: |
41-
python -m pip install --upgrade pip
42-
python -m pip install wheel
43-
python -m pip install cython --config-settings="--build-option=--no-cython-compile"
44-
- name: Install
45-
run: |
46-
python -m pip install --no-cache-dir -r requirements-dev.txt
47-
- name: Run linter
48-
run: |
49-
invoke lint
50-
- name: Run tests
51-
run: |
52-
pytest
53-
build-ironpython:
54-
name: windows-ironpython
55-
runs-on: windows-latest
56-
steps:
57-
- uses: actions/checkout@v2
58-
- name: Install dependencies
59-
run: |
60-
curl -o compas.tar.gz -LJO https://pypi.debian.net/COMPAS/COMPAS-2.0.2.tar.gz
61-
curl -o roslibpy.tar.gz -LJO https://pypi.debian.net/roslibpy/latest
62-
curl -o ironpython-pytest.tar.gz -LJO https://pypi.debian.net/ironpython-pytest/latest
63-
curl -o compas_robots.tar.gz -LJO https://pypi.debian.net/compas_robots/latest
64-
choco install ironpython --version=2.7.8.1
65-
ipy -X:Frames -m ensurepip
66-
ipy -X:Frames -m pip install --no-deps compas.tar.gz
67-
ipy -X:Frames -m pip install --no-deps roslibpy.tar.gz
68-
ipy -X:Frames -m pip install --no-deps ironpython-pytest.tar.gz
69-
ipy -X:Frames -m pip install --no-deps compas_robots.tar.gz
70-
- name: Run tests
71-
env:
72-
IRONPYTHONPATH: ./src
73-
run: |
74-
ipy tests/ipy_test_runner.py
25+
python: ${{ matrix.python }}
26+
invoke_lint: true

.github/workflows/ironpython.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: ironpython
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- 'compas-2.x-compat'
8+
pull_request:
9+
branches:
10+
- main
11+
- 'compas-2.x-compat'
12+
13+
jobs:
14+
build:
15+
name: windows-ironpython
16+
runs-on: windows-latest
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Install dependencies
20+
run: |
21+
choco install ironpython --version=2.7.8.1
22+
curl -o ironpython-pytest.tar.gz -LJO https://pypi.debian.net/ironpython-pytest/latest
23+
curl -o compas.tar.gz -LJO https://pypi.debian.net/COMPAS/COMPAS-2.0.4.tar.gz
24+
curl -o roslibpy.tar.gz -LJO https://pypi.debian.net/roslibpy/latest
25+
curl -o compas_robots.tar.gz -LJO https://pypi.debian.net/compas_robots/latest
26+
ipy -X:Frames -m ensurepip
27+
ipy -X:Frames -m pip install --no-deps ironpython-pytest.tar.gz
28+
ipy -X:Frames -m pip install --no-deps compas.tar.gz
29+
ipy -X:Frames -m pip install --no-deps roslibpy.tar.gz
30+
ipy -X:Frames -m pip install --no-deps compas_robots.tar.gz
31+
- uses: NuGet/setup-nuget@v1.0.5
32+
- uses: compas-dev/compas-actions.ghpython_components@v5
33+
with:
34+
source: src/compas_fab/ghpython/components
35+
target: src/compas_fab/ghpython/components/ghuser
36+
- name: Test import
37+
run: |
38+
ipy -m compas_fab
39+
env:
40+
IRONPYTHONPATH: ./src
41+
- name: Run tests
42+
run: |
43+
ipy tests/ipy_test_runner.py
44+
env:
45+
IRONPYTHONPATH: ./src

0 commit comments

Comments
 (0)