refactor(workflows): use config switch #13
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 🐍 Build Bindings | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
bindings: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
container: ${{ matrix.os == 'ubuntu-latest' && 'fedora:38' || null }} | |
name: "🐍 Build Bindings on ${{ matrix.os }}" | |
steps: | |
- name: 📥 Checkout | |
uses: actions/checkout@v3 | |
- name: 🖥️ Setup Environment | |
uses: ./.github/actions/setup | |
with: | |
install-vtk: false | |
container: ${{ matrix.os }} | |
- name: 🐍 Build and check Python Module (Windows) | |
if: ${{ matrix.os == 'windows-latest' }} | |
run: | | |
python3 -m venv venv | |
./venv/Scripts/activate.bat | |
pip install . | |
python3 -c "import viennaps2d" | |
- name: 🐍 Build and check Python Module (Other) | |
if: ${{ matrix.os != 'windows-latest' }} | |
run: | | |
python3 -m venv venv | |
./venv/bin/pip install . | |
./venv/bin/python -c "import viennaps2d" | |
- name: 📦 Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Pre-Built (${{ matrix.os }}-${{ matrix.vtk-system }}) | |
path: venv |