Skip to content

Commit

Permalink
DO NOT MERGE: Testing maturin
Browse files Browse the repository at this point in the history
  • Loading branch information
ia0 committed Oct 21, 2024
1 parent bff562d commit 9c598fe
Show file tree
Hide file tree
Showing 16 changed files with 205 additions and 632 deletions.
87 changes: 0 additions & 87 deletions .github/workflows/codeql.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/github-issue-labeler.yml

This file was deleted.

53 changes: 0 additions & 53 deletions .github/workflows/github-pages.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/js-docs-builder.yml

This file was deleted.

29 changes: 0 additions & 29 deletions .github/workflows/js-publish.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/workflows/js-test.yml

This file was deleted.

121 changes: 121 additions & 0 deletions .github/workflows/maturin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# This file is autogenerated by maturin v1.7.4 and manually modified by ia0.
name: CI

on:
pull_request:

permissions:
contents: read

jobs:
linux:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: ubuntu-latest
target: x86_64
steps:
- uses: actions/checkout@v4
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: rust/onnx/runtime/build/Linux
key: maturin-${{ matrix.platform.target }}-${{ hashFiles('rust/onnx/build.sh') }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out=../dist
before-script-linux: "${{ github.workspace }}/rust/onnx/maturin.sh"
manylinux: 2_28
working-directory: python
- name: Test wheels
run: |
python3 -m pip install dist/*.whl
magika --version
python3 -c 'import magika; print(magika.__version__)'
magika -r tests_data/basic
python3 ./python/scripts/run_quick_test_magika_cli.py
python3 ./python/scripts/run_quick_test_magika_module.py
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-linux-${{ matrix.platform.target }}
path: dist

windows:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: windows-latest
target: x64
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out=../dist
working-directory: python
- name: Test wheels
shell: bash
run: |
python3 -m pip install dist/*.whl
magika --version
python3 -c 'import magika; print(magika.__version__)'
magika -r tests_data/basic
python3 ./python/scripts/run_quick_test_magika_cli.py
python3 ./python/scripts/run_quick_test_magika_module.py
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-windows-${{ matrix.platform.target }}
path: dist

macos:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: macos-14
target: aarch64
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out=../dist
working-directory: python
- name: Test wheels
run: |
python3 -m pip install dist/*.whl
magika --version
python3 -c 'import magika; print(magika.__version__)'
magika -r tests_data/basic
python3 ./python/scripts/run_quick_test_magika_cli.py
python3 ./python/scripts/run_quick_test_magika_module.py
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-macos-${{ matrix.platform.target }}
path: dist

sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# TODO(https://github.com/PyO3/maturin/issues/2244): Remove when released.
- run: rm rust/cli/README.md
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out=../dist
working-directory: python
- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: wheels-sdist
path: dist
Loading

0 comments on commit 9c598fe

Please sign in to comment.