Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmcl committed Feb 7, 2025
1 parent 916b5fc commit fc86871
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: [macos-latest]

runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -44,9 +44,12 @@ jobs:
pytest
- name: Make a wheel
# https://github.com/pypa/cibuildwheel
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 }}
Expand Down
3 changes: 2 additions & 1 deletion bin/make-wheel
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
6 changes: 6 additions & 0 deletions interop/noop.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include <stdio.h>

int main() {
printf("Hello, World!\n");
return 0;
}
4 changes: 2 additions & 2 deletions interop/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ 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
ext-modules = [
{name = "klr", sources = []}
{name = "klr.noop", sources = ["noop.c"]}
]

[tool.setuptools.package-data]
Expand Down

0 comments on commit fc86871

Please sign in to comment.