diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5df3735..ce70e8d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,10 +12,10 @@ jobs: strategy: matrix: # We mainly care about hardware rather than OS - # macos-13 is x86. This one doesn't work for some reason. + # macos-13 is x86 # macos-latest is arm64 # ubuntu-latest is x64 - os: [macos-latest, ubuntu-latest] + os: [ubuntu-latest] runs-on: ${{ matrix.os }} @@ -44,9 +44,13 @@ jobs: pytest - name: Make a wheel # https://github.com/pypa/cibuildwheel + # Hit this: https://github.com/pypa/cibuildwheel/discussions/1926 + env: + CIBW_BUILD_VERBOSITY: 1 run: | pip install cibuildwheel bin/make-wheel + - uses: actions/upload-artifact@v4 with: name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} diff --git a/bin/make-wheel b/bin/make-wheel index c394072..d9f5598 100755 --- a/bin/make-wheel +++ b/bin/make-wheel @@ -12,6 +12,7 @@ cp -R $ROOT/interop/nki $WHEEL_DIR/klr/nki cp -R $ROOT/interop/klr $WHEEL_DIR/klr/klr cp $ROOT/LICENSE $WHEEL_DIR cp $ROOT/interop/README.md $WHEEL_DIR +cp $ROOT/interop/noop.c $WHEEL_DIR cp $ROOT/interop/pyproject.toml $WHEEL_DIR cp $ROOT/interop/MANIFEST.in $WHEEL_DIR @@ -23,7 +24,7 @@ if [ -z "${GITHUB_RUN_ID+x}" ]; then else # https://github.com/pypa/cibuildwheel echo "Building wheel via GitHub Actions" - python -m cibuildwheel --output-dir $WHEEL_DIR/wheelhouse + python -m cibuildwheel --output-dir $ROOT/wheelhouse fi # To upload the wheel, with the proper token in ~/.pypirc, run diff --git a/interop/noop.c b/interop/noop.c new file mode 100644 index 0000000..f26b97c --- /dev/null +++ b/interop/noop.c @@ -0,0 +1,6 @@ +#include + +int main() { + printf("Hello, World!\n"); + return 0; +} diff --git a/interop/pyproject.toml b/interop/pyproject.toml index 4fc2c54..dae958a 100644 --- a/interop/pyproject.toml +++ b/interop/pyproject.toml @@ -30,10 +30,13 @@ testpaths = [ # NB: All this setuptools stuff took about 1000 hours to figure out so never delete this. [tool.setuptools] # This makes it ok for there to be both klr and wheelhouse (where we generates wheels on github actions) in the same directory -packages = ["klr"] +#packages = ["klr"] # This tricks setuptools into knowing this is a binary wheel +# The output says this is experimental and likely to change in future releases, but +# we will keep our fingers crossed. Pretty sure we can make a setup.py file that does +# this and it won't be that different. ext-modules = [ - {name = "klr", sources = []} + {name = "klr.noop", sources = ["noop.c"]} ] [tool.setuptools.package-data]