Skip to content

Commit

Permalink
Simplified CI, omitted wheel building.
Browse files Browse the repository at this point in the history
  • Loading branch information
twomagpi committed Aug 2, 2024
1 parent 9043981 commit b729579
Showing 1 changed file with 31 additions and 54 deletions.
85 changes: 31 additions & 54 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,68 +56,45 @@ jobs:
- name: Check python version
run: python -c "import sys; print(sys.version)"

- name: RC.exe for Windows
if: startsWith(runner.os, 'Windows')
run: |
function Invoke-VSDevEnvironment {
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
$installationPath = & $vswhere -prerelease -legacy -latest -property installationPath
$Command = Join-Path $installationPath "Common7\Tools\vsdevcmd.bat"
& "${env:COMSPEC}" /s /c "`"$Command`" -no_logo && set" | Foreach-Object {
if ($_ -match '^([^=]+)=(.*)') {
[System.Environment]::SetEnvironmentVariable($matches[1], $matches[2])
}
}
}
Invoke-VSDevEnvironment
Get-Command rc.exe | Format-Table -AutoSize
echo "::add-path::$(Get-Command rc.exe | Split-Path)"
- name: Install pip
run: |
python -m pip install --upgrade pip
- name: Fix matplotlib backend for MacOS
if: startsWith(runner.os, 'macOS')
run: |
mkdir ~/.matplotlib
echo "backend: TkAgg" >> ~/.matplotlib/matplotlibrc
- name: install PyGOM
run: |
pip install .
- name: Run tests
run: python -m unittest discover --start-directory tests

build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest] #ubuntu-latest#, macos-13, macos-14]

steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
# Used to host cibuildwheel
- uses: actions/setup-python@v5

- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.19.2

- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
# to supply options, put them in 'env', like:
# env:
# CIBW_SOME_OPTION: value

- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
# build_wheels:
# name: Build wheels on ${{ matrix.os }}
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os: [windows-latest] #ubuntu-latest#, macos-13, macos-14]
#
# steps:
# - uses: actions/checkout@v4
#
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install -r requirements.txt
#
# # Used to host cibuildwheel
# - uses: actions/setup-python@v5
#
# - name: Install cibuildwheel
# run: python -m pip install cibuildwheel==2.19.2
#
# - name: Build wheels
# run: python -m cibuildwheel --output-dir wheelhouse
# # to supply options, put them in 'env', like:
# # env:
# # CIBW_SOME_OPTION: value
#
# - uses: actions/upload-artifact@v4
# with:
# name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
# path: ./wheelhouse/*.whl

0 comments on commit b729579

Please sign in to comment.