Merge branch 'main' into release/0.8 #149
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
# This is a basic workflow to help you get started with Actions | |
name: WheelHouse | |
env: | |
python.venv: 'testvenv' | |
# Following env vars when changed will "reset" the mentioned cache, | |
# by changing the cache file name. It is rendered as ...-v%RESET_XXX%-... | |
# You should go up in number, if you go down (or repeat a previous value) | |
# you might end up reusing a previous cache if it haven't been deleted already. | |
# It applies 7 days retention policy by default. | |
RESET_PIP_CACHE: 0 | |
PACKAGE_NAME: PyAEDT | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the main branch | |
push: | |
tags: | |
- 'v*' | |
- v* | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: [windows-latest] | |
strategy: | |
matrix: | |
python-version: [ 3.7, 3.8, 3.9, '3.10'] | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: 'Create virtual env' | |
run: | | |
python -m venv testenv | |
testenv\Scripts\Activate.ps1 | |
python -m pip install pip -U | |
python -m pip install wheel setuptools -U | |
python -c "import sys; print(sys.executable)" | |
pip install .[all,dotnet] | |
pip install jupyterlab | |
- name: Retrieve PyAEDT version | |
run: | | |
testenv\Scripts\Activate.ps1 | |
echo "PYAEDT_VERSION=$(python -c 'from pyaedt import __version__; print(__version__)')" >> $GITHUB_OUTPUT | |
echo "PyAEDT version is: $(python -c "from pyaedt import __version__; print(__version__)")" | |
id: version | |
- name: Generate wheelhouse | |
run: | | |
testenv\Scripts\Activate.ps1 | |
$packages=$(pip freeze) | |
# Iterate over the packages and generate wheels | |
foreach ($package in $packages) { | |
echo "Generating wheel for $package" | |
pip wheel "$package" -w wheelhouse | |
} | |
- name: Zip wheelhouse | |
uses: vimtor/action-zip@v1 | |
with: | |
files: wheelhouse | |
dest: ${{ env.PACKAGE_NAME }}-v${{ steps.version.outputs.PYAEDT_VERSION }}-${{ runner.os }}-${{ matrix.python-version }}.zip | |
- name: Upload Wheelhouse | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.PACKAGE_NAME }}-v${{ steps.version.outputs.PYAEDT_VERSION }}-${{ runner.os }}-${{ matrix.python-version }} | |
path: '*.zip' | |
retention-days: 7 | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
with: | |
generate_release_notes: true | |
files: | | |
${{ env.PACKAGE_NAME }}-v${{ steps.version.outputs.PYAEDT_VERSION }}-${{ runner.os }}-${{ matrix.python-version }}.zip |