Skip to content

Commit de462e3

Browse files
committed
ignoring win for now
1 parent 843f9c1 commit de462e3

File tree

3 files changed

+19
-52
lines changed

3 files changed

+19
-52
lines changed

.github/workflows/build_wheels_and_release.yml

Lines changed: 3 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ${{ matrix.os }}
1515
strategy:
1616
matrix:
17-
os: [windows-latest]
17+
os: [ubuntu-latest, macos-13, macos-14]
1818

1919
steps:
2020
- uses: actions/checkout@v2
@@ -27,53 +27,12 @@ jobs:
2727
- name: Install cibuildwheel
2828
run: pip install cibuildwheel==2.20.0
2929

30-
- name: Install Miniconda (Windows only)
31-
if: runner.os == 'Windows'
32-
shell: pwsh
33-
run: |
34-
$ErrorActionPreference = 'Stop'
35-
$ProgressPreference = 'SilentlyContinue'
36-
Write-Host "Downloading Miniconda..."
37-
Invoke-WebRequest -Uri "https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe" -OutFile "miniconda.exe"
38-
Write-Host "Installing Miniconda..."
39-
Start-Process -FilePath "miniconda.exe" -ArgumentList "/S", "/D=$env:UserProfile\Miniconda3" -Wait -NoNewWindow
40-
Write-Host "Miniconda installed. Configuring..."
41-
$env:Path = "$env:UserProfile\Miniconda3;$env:UserProfile\Miniconda3\Scripts;$env:UserProfile\Miniconda3\Library\bin;" + $env:Path
42-
conda init powershell
43-
conda config --set auto_activate_base false
44-
conda config --add channels conda-forge
45-
conda config --set channel_priority strict
46-
Write-Host "Installing sleef..."
47-
conda install -y -c conda-forge sleef
48-
pip install cibuildwheel==2.20.0
49-
Write-Host "Miniconda setup completed."
50-
51-
# Set environment variables for the build
52-
$env:INCLUDE = "$env:UserProfile\Miniconda3\Library\include;$env:INCLUDE"
53-
$env:LIB = "$env:UserProfile\Miniconda3\Library\lib;$env:LIB"
54-
$env:SLEEF_INCLUDE_DIR = "$env:UserProfile\Miniconda3\Library\include"
55-
$env:SLEEF_LIBRARY = "$env:UserProfile\Miniconda3\Library\lib"
56-
57-
# Make the environment variables available to subsequent steps
58-
echo "INCLUDE=$env:INCLUDE" >> $env:GITHUB_ENV
59-
echo "LIB=$env:LIB" >> $env:GITHUB_ENV
60-
echo "SLEEF_INCLUDE_DIR=$env:SLEEF_INCLUDE_DIR" >> $env:GITHUB_ENV
61-
echo "SLEEF_LIBRARY=$env:SLEEF_LIBRARY" >> $env:GITHUB_ENV
62-
echo "$env:UserProfile\Miniconda3;$env:UserProfile\Miniconda3\Scripts;$env:UserProfile\Miniconda3\Library\bin" >> $env:GITHUB_PATH
63-
6430
- name: Build wheels
65-
run: python -m cibuildwheel --output-dir wheelhouse
31+
run: |
32+
python -m cibuildwheel --output-dir wheelhouse
6633
env:
6734
CIBW_BUILD_VERBOSITY: "1"
6835
CIBW_ARCHS_MACOS: ${{ matrix.os == 'macos-13' && 'x86_64' || 'arm64' }}
69-
CIBW_ENVIRONMENT_WINDOWS: >-
70-
PATH="$env:UserProfile\Miniconda3\Scripts;$env:UserProfile\Miniconda3\Library\bin;$env:PATH"
71-
INCLUDE="$env:INCLUDE"
72-
LIB="$env:LIB"
73-
SLEEF_INCLUDE_DIR="$env:SLEEF_INCLUDE_DIR"
74-
SLEEF_LIBRARY="$env:SLEEF_LIBRARY"
75-
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: >
76-
python -m pip install delvewheel && python -m delvewheel repair -w {dest_dir} {wheel} --add-path "%UserProfile%\Miniconda3\Library\bin"
7736
working-directory: ./quaddtype
7837

7938
- uses: actions/upload-artifact@v2

quaddtype/pyproject.toml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,19 @@ ls -l $HOME/miniconda/include/sleef.h
7979
ls -l $HOME/miniconda/lib/libsleef*
8080
'''
8181
environment = {DYLD_LIBRARY_PATH = "$HOME/miniconda/lib:$DYLD_LIBRARY_PATH", LIBRARY_PATH = "$HOME/miniconda/lib:$LIBRARY_PATH", CFLAGS = "-I$HOME/miniconda/include $CFLAGS", CXXFLAGS = "-I$HOME/miniconda/include $CXXFLAGS", LDFLAGS = "-L$HOME/miniconda/lib $LDFLAGS", SLEEF_INCLUDE_DIR = "$HOME/miniconda/include", SLEEF_LIBRARY = "$HOME/miniconda/lib", MACOSX_DEPLOYMENT_TARGET = "10.13"}
82-
repair-wheel-command = "delocate-wheel -w {dest_dir} -v {wheel}"
82+
repair-wheel-command = "delocate-wheel -w {dest_dir} -v {wheel}"
83+
84+
[tool.cibuildwheel.windows]
85+
before-all = [
86+
"winget install --id Microsoft.Powershell --source winget",
87+
"start /wait powershell.msi /quiet /norestart",
88+
"powershell -Command \"Invoke-WebRequest -Uri https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe -OutFile miniconda.exe\"",
89+
"start /wait miniconda.exe /S /D=%UserProfile%\\Miniconda3",
90+
"%UserProfile%\\Miniconda3\\Scripts\\activate.bat",
91+
"%UserProfile%\\Miniconda3\\Scripts\\conda.exe config --add channels conda-forge",
92+
"%UserProfile%\\Miniconda3\\Scripts\\conda.exe config --set channel_priority strict",
93+
"%UserProfile%\\Miniconda3\\Scripts\\conda.exe install -y -c conda-forge sleef"
94+
]
95+
before-build = "pip install delvewheel"
96+
repair-wheel-command = "delvewheel repair -w {dest_dir} {wheel} --add-path %UserProfile%\\Miniconda3\\Library\\bin"
97+
environment = { PATH = "%UserProfile%\\Miniconda3\\Scripts;%UserProfile%\\Miniconda3\\Library\\bin;%PATH%", INCLUDE = "%UserProfile%\\Miniconda3\\Library\\include;%INCLUDE%", LIB = "%UserProfile%\\Miniconda3\\Library\\lib;%LIB%", SLEEF_INCLUDE_DIR = "%UserProfile%\\Miniconda3\\Library\\include", SLEEF_LIBRARY = "%UserProfile%\\Miniconda3\\Library\\lib"}

setup_miniconda.ps1

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)