Skip to content

Commit

Permalink
Merge Github action build_ubuntu and test_ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
leon-vv committed Oct 27, 2024
1 parent 1101f54 commit fc19d66
Showing 1 changed file with 9 additions and 31 deletions.
40 changes: 9 additions & 31 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
workflow_dispatch:

jobs:
build_ubuntu:
build_and_test_ubuntu:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
Expand All @@ -19,7 +19,6 @@ jobs:
python-version: "3.8"
- name: Install dependencies
run: |
sudo apt-get update
pip install --upgrade setuptools wheel auditwheel patchelf
- name: Build the wheel
run: python setup.py bdist_wheel
Expand All @@ -29,6 +28,12 @@ jobs:
run: |
auditwheel show dist/*.whl
auditwheel repair dist/*.whl --plat manylinux_2_31_x86_64 -w wheelhouse/
- name: Install the wheel
run: |
pip install wheelhouse/traceon-*.whl
pip show traceon
- name: Run tests
run: python -m unittest tests/*.py
- name: Upload wheel artifact
uses: actions/upload-artifact@v3
with:
Expand All @@ -39,8 +44,7 @@ jobs:
with:
name: source-distribution
path: dist/*.tar.gz



build_windows:
runs-on: windows-latest
steps:
Expand All @@ -61,33 +65,7 @@ jobs:
with:
name: windows-wheel
path: dist/*.whl

test_ubuntu:
needs: build_ubuntu
runs-on: ubuntu-20.04
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y gmsh
- name: Checkout code
uses: actions/checkout@v3
- name: Download wheel artifact
uses: actions/download-artifact@v3
with:
name: ubuntu-wheel
path: ./
- name: Install the wheel
run: |
pip install traceon-*.whl
pip show traceon
- name: Run tests
run: python -m unittest tests/*.py


test_windows:
needs: build_windows
runs-on: windows-latest
Expand Down

0 comments on commit fc19d66

Please sign in to comment.