Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support windows compilation #233

Closed
wants to merge 58 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
af64b5b
Add one master CI which builds, tests and deploys
paddyroddy Mar 17, 2023
43d66a8
Change needs order
paddyroddy Mar 17, 2023
0852a0e
Fix matrix syntax
paddyroddy Mar 17, 2023
2e6272a
Change flag to 17 from 11
paddyroddy Mar 17, 2023
1d5b48f
Don't error if can't find
paddyroddy Mar 17, 2023
f546d48
Change wilcard pattern
paddyroddy Mar 17, 2023
1c93940
Download store output
paddyroddy Mar 17, 2023
e8f0d09
v3
paddyroddy Mar 17, 2023
f022c42
Check working directory
paddyroddy Mar 17, 2023
32f671b
Run ls on right section
paddyroddy Mar 17, 2023
1b89e85
Switch to lowercase
paddyroddy Mar 17, 2023
ee665c2
Run uname to see output
paddyroddy Mar 17, 2023
5f6e79a
Check OS output
paddyroddy Mar 17, 2023
6d19ebf
Change back the extension
paddyroddy Mar 17, 2023
5aadb91
Remove the test step
paddyroddy Mar 17, 2023
c63b440
Remove ls step
paddyroddy Mar 17, 2023
31809e5
Don't specify path to library
paddyroddy Mar 17, 2023
a5048c6
Don't fail fast
paddyroddy Mar 17, 2023
a746ca8
Use add_dll_directory
paddyroddy Mar 17, 2023
c1ab890
Fix fail fast
paddyroddy Mar 17, 2023
ee16289
Revert "Use add_dll_directory"
paddyroddy Mar 17, 2023
30919cf
Revert "Revert "Use add_dll_directory""
paddyroddy Mar 17, 2023
994dc51
Adjust DLL directory and specify path manually
paddyroddy Mar 17, 2023
85c7dd6
Fix DLL path
paddyroddy Mar 17, 2023
331728e
Hardcode the path :cry:
paddyroddy Mar 17, 2023
9d0957a
Build windows binary
paddyroddy Mar 20, 2023
b4d021b
Test adding windows binary to CI
paddyroddy Mar 20, 2023
b25f3e0
Fix job
paddyroddy Mar 20, 2023
f4eefe7
Don't download
paddyroddy Mar 20, 2023
16625ec
Fix CI tabs
paddyroddy Mar 20, 2023
70c6450
Removed needs
paddyroddy Mar 20, 2023
e2550ec
Use old binary
paddyroddy Mar 20, 2023
56d72d6
Undo comments
paddyroddy Mar 20, 2023
62fa8c0
Remove the DLL
paddyroddy Mar 20, 2023
48e15da
Remove the flags
paddyroddy Mar 20, 2023
835883b
Check cross-compiling on Windows
paddyroddy Mar 20, 2023
710e1f3
Install dependencies
paddyroddy Mar 20, 2023
6e7972d
Compile on windows too
paddyroddy Mar 20, 2023
94000e1
Remove apt install
paddyroddy Mar 20, 2023
35bea21
Cross compile Windows on Linux
paddyroddy Mar 20, 2023
a5369b6
Reduce jobs from 10 to 5
paddyroddy Mar 20, 2023
eaa9841
Set environment variable
paddyroddy Mar 20, 2023
98f9e5f
Selectively install dependency
paddyroddy Mar 20, 2023
e7e208c
SImplify if
paddyroddy Mar 20, 2023
8132f30
Bump codecov
paddyroddy Mar 20, 2023
1f41f3e
Only install mingw on certain item
paddyroddy Mar 20, 2023
121916a
Forgot matrix.
paddyroddy Mar 20, 2023
fc9a153
Add windows cross compile to name
paddyroddy Mar 20, 2023
70318d9
Wrap the if statements
paddyroddy Mar 20, 2023
c3e893a
Try `if: true`
paddyroddy Mar 21, 2023
b6071a6
Fix whitespace
paddyroddy Mar 21, 2023
d0e4ed2
Update first
paddyroddy Mar 21, 2023
cb58e9a
Try templating the name
paddyroddy Mar 21, 2023
564ca77
Revert "Try templating the name"
paddyroddy Mar 21, 2023
631d9f8
Fail fast == true
paddyroddy Mar 21, 2023
8d31906
Support compilation on Windows
paddyroddy Mar 20, 2023
e4fb653
Remove references to cross compilation
paddyroddy Mar 20, 2023
f9e6d46
Merge branch 'main' into support-windows-compilation
paddyroddy Mar 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 2 additions & 16 deletions .github/workflows/build_wheels_test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,17 @@ on:

jobs:
build_wheels:
name: |
Build wheels on ${{ matrix.os }} with
windows_cross_compile=${{ matrix.windows_cross_compile }}
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
windows_cross_compile: [false, true]
exclude:
- os: macos-latest
windows_cross_compile: true
os: [macos-latest, ubuntu-latest, windows-latest]

steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y mingw-w64
if: matrix.windows_cross_compile

- uses: actions/checkout@v3

- name: Build wheels
run: bash build.sh
env:
WINDOWS_CROSS_COMPILE: ${{ matrix.windows_cross_compile }}

- name: Upload artefacts
uses: actions/upload-artifact@v3
Expand Down
23 changes: 11 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
UNAME := $(shell uname)

ifeq ($(UNAME), Linux)
ifeq ($(WINDOWS_CROSS_COMPILE),true)
# do something Windowsy
CXX = x86_64-w64-mingw32-g++
EXT = DLL
XLDFLAGS = -static-libgcc -static-libstdc++
else
# do something Linux #-fopenmp -static
CXX = g++
EXT = so
XLDFLAGS = -Wl,--no-undefined -Wl,--no-allow-shlib-undefined
#-L/usr/local/cuda/lib64 -lcuda -lcudart
endif
# do something Linux #-fopenmp -static
CXX = g++
EXT = so
XLDFLAGS = -Wl,--no-undefined -Wl,--no-allow-shlib-undefined
#-L/usr/local/cuda/lib64 -lcuda -lcudart
endif
ifeq ($(UNAME), Darwin)
# do something OSX
CXX = clang++ -arch x86_64 -arch arm64
EXT = dylib
XLD_FLAGS = -arch x86_64 -arch arm64
endif
ifeq ($(OS), Windows_NT)
# do something Windowsy
CXX = x86_64-w64-mingw32-g++
EXT = DLL
XLDFLAGS = -static-libgcc -static-libstdc++
endif

NVCC = nvcc

Expand Down